5
votes

I am trying to invoke a web-service through stub. It is wsdl web-service

But I am getting following error while invoking it.

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.net.SocketTimeoutException: Read timed out
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:java.net.SocketTimeoutException: Read timed out
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.vtech.external.implementation.qantas.QantasServices.DistributorPortSoapBindingStub.getAccommodationAvailability(DistributorPortSoapBindingStub.java:1675)
    at com.vtech.external.implementation.tripAdvisor.bizaction.Test.main(Test.java:68)

    {http://xml.apache.org/axis/}hostname:vibpj160
2
Is the service really available and if yes, is it accepting your request? Could there be some gateway in front of service which is preventing your call to reach the webservice ? - Gaurav
Yes Web-service is available... - mevada.yogesh
If I try to invoke same service through xml request It gives me desired response back. - mevada.yogesh
I am not sure if you are using any tool to send the message, but check if some "timeout" property needs to be increased. - Gaurav
I have done with increasing timeout property up to 2 minutes. - mevada.yogesh

2 Answers

2
votes

As

at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

shows that your request is not getting de-serialized on your web-service provider side.

Just check the request protocol type.

1
votes

your web service call occurred with time out, you have to increase time out with following code:

((Stub) [your-port or service]).setTimeout(timeout);

this code set time out for a web service call.