0

My requirement is to create a java client for webservice written in SAP and has to be deployed in weblogic. And the web methods taking complex types as input parameters.

I have created stub classes using clientgen. And written a stand alone client for testing.

Also added the below jars in classpath xmlbeans-1.0.jar wlfullclient.jar webserviceclient.jar webservice.jar

Instead of giving the wsdl url to the Impl object I am using the static wsdl. When I run the application it is giving the below error. Using the same wsdl I am cerating the client.

javax.xml.rpc.ServiceException: Failed to parse WSDL file:/C:/xxx-LPMS/trunk/build/classes/com/xxx/xxx/webservice/client/TestService_wsdl.wsdl weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Invalid index
        at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:169)
        at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:477)
        at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:114)
        at com.xxx.xxx.webservice.client.TestService_Impl.<init>(TestService_Impl.java:23)
        at com.xxx.xxx.webservice.client.TestService_Impl.<init>(TestService_Impl.java:13)
        at com.xxx.xxx.schnittstellen.util.StdQmCreateWSClientUtil.initServicePort(StdQmCreateWSClientUtil.java:77)
        at com.xxx.xxx.schnittstellen.util.StdQmCreateWSClientUtil.getStdQmCreateCrServiceport(StdQmCreateWSClientUtil.java:70)
        at com.xxx.xxx.schnittstellen.util.StdQmCreateWSClientUtil.StdQmCreateCr(StdQmCreateWSClientUtil.java:30)
        at com.xxx.xxx.schnittstellen.util.StdQmCreateWSClientUtil.main(StdQmCreateWSClientUtil.java:91)
    Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Invalid index
        at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)
        at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:402)
        at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:388)
        at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:78)
        at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:65)
        at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:468)
        ... 7 more
    Caused by: java.io.IOException: Invalid index
        at weblogic.xml.domimpl.Loader.load(Loader.java:38)
        at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:168)
        at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:58)
        at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
        ... 12 more
    Caused by: javax.xml.stream.XMLStreamException: Invalid index
        at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:80)
        at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:103)
        at weblogic.xml.stax.RecyclingFactory.createXMLStreamReader(RecyclingFactory.java:35)
        at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:49)
        at weblogic.xml.domimpl.Loader.createXMLStreamReader(Loader.java:60)
        at weblogic.xml.domimpl.Loader.load(Loader.java:34)
        ... 15 more
    Caused by: sun.misc.InvalidJarIndexException: Invalid index
        at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:766)
        at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:679)
        at sun.misc.URLClassPath.getResource(URLClassPath.java:158)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at weblogic.xml.babel.scanner.ScannerState.<init>(ScannerState.java:86)
        at weblogic.xml.babel.scanner.Scanner.<init>(Scanner.java:75)
        at weblogic.xml.babel.baseparser.BaseParser.baseScanner(BaseParser.java:172)
        at weblogic.xml.babel.baseparser.BaseParser.createScanner(BaseParser.java:164)
        at weblogic.xml.babel.baseparser.BaseParser.init(BaseParser.java:213)
        at weblogic.xml.babel.baseparser.BaseParser.<init>(BaseParser.java:84)
        at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:56)
        ... 20 more

1 Answers1

0

I'm looking at something vaguely similar. In my case, something connected to ClassLoader is building an invalid URL that looks like yours. Specifically, file:/C:/blah/blah/blah is incorrect syntax; it should be file:///C:/blah/blah/blah instead. source

I'm curious if you've solved your problem in a way that's relevant to mine.

Chris Jones
  • 4,815
  • 6
  • 34
  • 28