Skip to Content
0
Former Member
Feb 20, 2008 at 02:23 PM

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

174 Views

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