cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service Client Generation on 7.10 SP3 - No WSDL URL is specified....

Former Member
0 Kudos

We have a mysterious problem here.

In out ABAP system we had a WebService created. With "New - Web Service Client" we created a web service client on the java side for that one and we were able to invoke it.

We had to recreate this Web service due to wrong naming conventions. And now the problem starts.

In the Main service class we had before something generated by NWDS:

 private static java.net.URL SERVICES_SERVICE_WSDL_LOCATION = null;
static {
    java.net.URL url = null;
    try {
		java.net.URL tmpUrl = Thread.currentThread().getContextClassLoader().getResource("wsdl/com/sap/document/sap/soap/functions/mc_style/sap/bc/srt/wsdl/bndg_001279D063121DECA58AC5F7200DC55D/wsdl11/allinone/ws_policy/document/rootwsdl_SERVICES.wsdl");
		url = new java.net.URL(tmpUrl.getProtocol(), tmpUrl.getHost(), tmpUrl.getPort(), tmpUrl.getFile());
    } catch (java.net.MalformedURLException e) {
      e.printStackTrace();
    }
    SERVICES_SERVICE_WSDL_LOCATION = url;
  }

After the new creation with the new Web Service this static initializer is gone an we see:

 private final static java.net.URL SERVICE_WSDL_LOCATION = null;

This code is ridiculous, to make something static final and set it to Null. And as expected at runtime it results in WebServioceException telling us:

 No WSDL URL is specified for service [class com.sap.document.sap.soap.functions.mc_style.Service] on service creation.

Anyone knows what is going wrong here??

Best regards,

Frank

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello, Frank,

There is a difference in the way NWDI generated the service interface for web services client in SP3.

Until SP3 we used tha SUN RI JAX-WS runtime. In order to deliver the WSDL location packaged with the archive we used ClassLoader.getResource(..).

SP3 uses SAP JAX-WS Runtime which extracts the WSDL Location from annotations in case of deployable client and from static variable when the clients are standalone.

However we made a distinct difference and changed the generation so deployable clients could no be instantiated with "new" and the default constructor.

It should be clarified that deplyable clients should be instantiated using JNDI lookup or injection wuth @WebServiceRef annotation.

So if you need a standalone WS client generate a standalone proxy from the NWDI and it will contain the required code for initialization.

If you are making a java ee application please use the instantiation methods advised by the jave ee specification (lookup or injection).

Best Wishes and Regards,

Chavdar Baikov

(Java Web Services team)

PS: I will remove the leftover "ridiculous" code from the generation.

Former Member
0 Kudos

Same problem here.

From Netweaver dev studio, I'm generating a deployable proxy for a Session Bean that is supposed to access a webservice but I keep getting the exception:

"Caused by: javax.xml.ws.WebServiceException: No WSDL URL is specified for service [class eu.socrades.sap.ServiceMonitorBeanTESTService] on service creation.

at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.<init>(SAPServiceDelegate.java:108)

at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createDelegate(CTSProvider.java:170)

at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createServiceDelegate(CTSProvider.java:151)

at javax.xml.ws.Service.<init>(Service.java:57)

at eu.socrades.sap.ServiceMonitorBeanTESTService.<init>(ServiceMonitorBeanTESTService.java:14)"

I'm injecting the reference to the service with:

@WebServiceRef(wsdlLocation = "rootwsdl_ServiceMonitorBeanTESTService.wsdl")

private ServiceMonitorBeanTESTService service;

I tried changing the location to a URL (where the wsdl can be downloaded from) or to "META-INF/wsdl/eu/socrades/sap/rootwsdl_ServiceMonitorBeanTESTService/rootwsdl_ServiceMonitorBeanTESTService.wsdl" but that did not help.

Any clue?

Thanks a lot,

Dom

Former Member
0 Kudos

Hi,

I am using dependency injection with @WebServiceRef annotation but still getting teh message (name="service")

"JAX-WS deployable proxy is instantiated with 'new' instead of been injected".

I have generated a WebService Client for a SAP ECC WebService. Please let me know what can be the alternate solution

Thanks,

Swaralipi

Answers (2)

Answers (2)

Former Member
0 Kudos

Actually our problem seemed to come for the fact that we did not select the correct configuration when creating the project (i.e. we did not select SAP EJB EE 5 project when creating the project).

Thanks for your help.

0 Kudos

Hi,

When using a deployable proxy which is generated inside EJB Project according to documentation found on:

http://help.sap.com/saphelp_nwpi71/helpdata/en/46/78955dcb496ef0e10000000a1553f6/frameset.htm

You should use the following declaration in your code:

@WebServiceRef (name="ExchangeService") CurrencyExchangeService service;

The name attribute is required by our implementation.

Please do not use the wsdlLocation attribute, it is not required for deployable proxies.

Best Regards, Chavdar

Edited by: Chavdar Baikov on Jun 24, 2008 2:03 PM