Hi All,
There is a .NET web service and I am sending below types of soap
request messages to the service.
Message1
------------------------------------------
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetLR xmlns="http://rm.com/services/">
<s0:request xmlns="http://tempuri.org/"
xmlns:s0="http://rm.com/services/">
<ClientID>1000</ClientID>
<CardProduct>TV</CardProduct>
</s0:request>
</GetLR>
</soapenv:Body>
</soapenv:Envelope>
Message2
---------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetLR xmlns="http://rm.com/services/">
<request>
<ns1:ClientID xmlns:ns1="http://tempuri.org/">100</ns1:ClientID>
<ns2:CardProduct
xmlns:ns2="http://tempuri.org/">TV</ns2:CardProduct>
</request>
</GetLR>
</soapenv:Body>
</soapenv:Envelope>
The Message2 is successfully consumed by the service but if I send Message1
then .NET is complaining with below AxisFault :
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Document root element is missing.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException:
Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
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:424)
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:2754)
at org.apache.axis.client.Call.invoke(Call.java:2737)
at org.apache.axis.client.Call.invoke(Call.java:2413)
at org.apache.axis.client.Call.invoke(Call.java:2336)
at org.apache.axis.client.Call.invoke(Call.java:1793)
Now my question is, although the 2 messages look identical why .NET
complains for Message1. Can anyone please
suggest ?
Thanks & Regards,
Kumar.