I am using axis1. While applying command cryptic for my soap I am getting an exception like below. Below are the details.
[ERROR] 2011-05-06 09:23:56,073 [MyAmeadeusTest] (MyAmeadeusTest.java:crypticCommand:278)
11|Session|
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: 11|Session|
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: 11|Session|
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:601)
Help would be appreciated.
You need to do one of two things:
1) Look on the web server that your SOAP requests are going to. In those logs you'll probably find the Exception being thrown on that side that is turning into the AxisFault.
2) Use something like WireShark to trace the HTTP traffic. Although this won't give you a lot of information beyond what you already have, it will prove that the AxisFault is basically a client-side representation of an Exception thrown on the server side.
The stack trace you get in this instance (i.e., from SoapFaultBuilder) is entirely misleading, as it's the stack trace of the code that is creating a client-side representation of the server error rather than the server-side stack trace showing the actual problem.
Related
I have created a java client to make web service call to a remote axis2 service deployed. I generated the client stubs with the WSDL file downloaded from the remote server's "/?wsdl" endpoint and tested a sample call for one of the exposed operations. It failed with the AxisFault error:
org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method "sample operation"
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
The above error appears quite generic and doesn't help much in knowing the actual reason. Please suggest a way of getting more detailed error reason. Is there any attribute of AxisFault entity that is populated with a detailed error description which I can log or there is some other way?
My company runs an old application built in ColdFusion MX7.0.2, running Java 1.4.2. I can't upgrade ColdFusion because CyberSource doesn't support anything higher than MX7.
When calling the CyberSource Simple Order API (https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor/) I get an error:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: Certificate signature
validation failed
and also at the bottom of the output:
java.security.NoSuchAlgorithmException: 1.2.840.113549.1.1.11
Signature not available
I've checked to see that CyberSource's certs are in the keystore, and they are. Someone told me I need to upgrade the version of java. I installed jdk1.6.045 and pointed ColdFusion to it but it errors as well:
Error: Cannot perform web service invocation runTrans.
Details: The fault returned when invoking the web service operation
is: AxisFault faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode: faultString: (500)Internal Server Error faultActor:
faultNode: faultDetail: {}:return code: 500
The page cannot be displayed because an internal server error has
occurred.
I'm at a loss. Any help would be great.
Chris
I wish I had some golden ticket. This issue resolved itself! CyberSource said it couldn't be anything on their end, but I changed nothing. Draw your own conclusion.
I wrote a web service and web client was generated using Eclipse wizard.
And my client application is requesting a String and also an Object.
The string can be retrieved successfully and when I tried to retrieve the object it gives the following exception (I'm using JBoss 5):
Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at se.cambio.cimonitor.ws.implmnt.GetDataStub.retrieveDetails(GetDataStub.java:203)
at se.cambio.cimonitor.ws.client.WebServiceClient.main(WebServiceClient.java:44)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:560)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
I cannot find a way out, please help me.
I can only provide help from the only exception stack trace you've place.
The root cause of the exception is:
Caused by: java.net.SocketTimeoutException: Read timed out
It means that a timeout has occurred when the socket tried to read or accept. In your case there was a read timeout.
You need to figure out what is your socket timeout to the service server box and if you can, make it live indefinitely.
I ran into this error on a project, and the root cause was a proxy server setting. I had to modify the proxy to allow the communication to the service I was trying to hit. My code was running as part of a custom application that used its own proxy. So this may also be something to try.
Finally I could overcome the problem. My object was an object which contains another objects inside that. Then I construct a one object with String and int and could send successfully.
Thank you...
We faced similar issue and we were getting Read Time Out while trying to invoke a secured webservice, after a long analysis we found out that there was a mismatch in the transport protocol version. Web-service was servicing on http1.0 and we were invoking it using http1.1. We modified the protocol version in our client code which resolves this issue:
Below is the code to specify http version-1.0 options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION, org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10);
I have a java SE client trying to talk to a J2EE web service. We are using Axis 1.4, so when I try to make a call I get the error below:
'- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.'
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)
Here is the call:
JRD_ServiceLocator jserv = new JRD_ServiceLocator();
Object arc[] = jserv.getserviceport( new URL("http://vpnl3-4102.fi.com:7110/jrds/services?WSDL")).getRefDataByQuery("MDS", "FX", "CCY", "CCY='A'");
What a PITA. The web service itself was having problems. I would have thought I would have got a different error, probably not forming the fault right on the server side. Such is life when you are still using Weblogic 9.2.
I have deployed a webservice using servletexec configured with IIS and i can successfully access webservice using anonymous account. But when I enable Windows Integrated Authentication I am getting following error.
- ntlm authentication scheme selected
- Discarding unexpected response: HTTP/1.1 100 Continue
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Premature end of file.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:akvm
org.xml.sax.SAXParseException: Premature end of file.
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)
It looks like that the Axis client does not like the NTLM authentication challenge. See error message at the top:
Discarding unexpected response: HTTP/1.1 100 Continue
After which there is no XML for Axis to parse, which is why you're getting premature end of file.
In order to use NTLM with Axis (1.4), you'll have to use the CommonsHTTPSender instead of the standard transport:
<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender">
</transport>
in your client-config.wsdd and then set up the NTLM username and password through the Stub object.
The "premature end of file" type errors from the xerces SAX implementation usually indicates that the SAX parser expected data, but got none (not null, but an initialized empty InputSource). From the stack trace, it looks as if the axis SOAP handler expects a SOAP xml message to arrive, but the message is empty. My knowledge of ISS and its infrastructure is close to nil, can you get any log messages from the server?