We are working with service provider's wsdl which is not discoverable due to security reason and they provide us a bunch of files including wsdl ,xsd etc.We need to access the provider's api. For these reason we have done these following things:
- We have generated a web service client using netbean 8.0 form desktop location (Local File )
- Using generated client code we have called the api using these following code
URL url = new URL("http://serverip:port/payment/services/MgrService"); MgrService svc = new MgrService(url); Response response = svc.getMgrServicePort().apiRequest(request);
but getting these exception
com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
java.io.IOException: Server returned HTTP response code: 500 for URL: http://serviceip:port/payment/services/MgrService
java.io.IOException: Server returned HTTP response code: 500 for URL: http://serviceip:port/payment/services/MgrService?wsdl
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:260)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:231)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:194)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:163)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:348)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:306)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:215)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:196)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:192)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:77)
By Wireshark, we have noticed that it is calling a get method with no soap body, where it should call only post method . We have tested the api using soapUI , service is ok . We also getting successful response using raw xml soap request.
Is it possible to work with generated client both for JAX-WS and Spring WS when WSDL is not discoverable ? or it only work with JAX-WS's wsdl file. If so then do we need to edit wsdl? or some other approach