Hi, 
I am new to Axis Web Service development. I am writing an Axis2 web service 
client code to invoke a web service. 
I generated my client and stubs using wsdl2java tool with ADB binding.I enabled 
2 way SSL(client authentication).
When I  run the client  I get the following error .
org.apache.axis2.AxisFault: org.xml.sax.SAXParseException: Premature end of 
file.

at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:435)

at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)

at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)

at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)

at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

at 
ch.e_dec.www.services.edecservice.v2.EdecServiceStub.goodsDeclarations(EdecServiceStub.java:337)

at ch.e_dec.www.services.edecservice.EdecClient.main(EdecClient.java:249)

I printed the incoming response inside the Catch Block using following 
statments.

org.apache.axis2.context.MessageContext 
responseMessageContext=stub._getServiceClient().getServiceContext().getLastOperationContext().getMessageContext("In");

System.out.println("####In:"+responseMessageContext.getEnvelope().toString()); 

<?xml version='1.0' encoding='utf-8'?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

<soapenv:Body>

<soapenv:Fault><faultcode>soapenv:Server.Exception</faultcode>

<faultstring>org.xml.sax.SAXParseException: Premature end of 
file.</faultstring><detail /></soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

I dont know how to go about this,please help me to get over this issue.

Thanks in Advance.

Regards,
Anish P S
CS-Techno Pvt Ltd
Cochin,India
Mob:9539299747
www.cs-techno.com
  • [Axis2] Anish P S
    • RE: [Axis2] Caristi, Joe
    • org.apache.axis2.AxisFault: org.xml.sax.SAXParseExceptio... Anish P S

Reply via email to