Jump to content
We've recently updated our Privacy Statement, available here ×

Do I format the SOAP request message correctly?


jbchurn

Recommended Posts

Hi,

My JasperServer is running fine.

I'm testing on its webservices using SOAPUI.

Below is SOAP Request and Response Message. I'm getting an error for the SOAP Response Message.

Can someone please advise if the SOAP Request Message is correct? If it's correct, what could be the possible reason of JasperServer web service reply with such response?

Thanks.

 

Code:
SOAP Request Message=====================<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2.ws.jasperserver.jaspersoft.com">   <soapenv:Header/>   <soapenv:Body>      <axis:list soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">         <requestXmlString xsi:type="xsd:string">            <request operationName="list" locale="en">               <resourceDescriptor name="" wsType="folder" uriString="/" isNew="false">                  <label>null</label>               </resourceDescriptor>            </request>         </requestXmlString>      </axis:list>   </soapenv:Body></soapenv:Envelope>SOAP Response Message=====================<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>      <soapenv:Fault>         <faultcode>soapenv:Server.userException</faultcode>         <faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>         <detail>            <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">jbchurn</ns1:hostname>         </detail>      </soapenv:Fault>   </soapenv:Body></soapenv:Envelope>
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I found the answer already.

I should have added <![CDATA[<   .....   ]]> to enclose the value of requestXmlString.

Code:
Corrected SOAP request====================== <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2.ws.jasperserver.jaspersoft.com">   <soapenv:Header/>   <soapenv:Body>      <axis:list soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">         <requestXmlString xsi:type="xsd:string">            <![CDATA[<request operationName="list" locale="en">               <resourceDescriptor name="" wsType="folder" uriString="/" isNew="false">                  <label>null</label>               </resourceDescriptor>            </request>]]>         </requestXmlString>      </axis:list>   </soapenv:Body></soapenv:Envelope>
Link to comment
Share on other sites

  • 4 years later...

Hello, jbchurn

 

Thank you so much for your comment. It helped me a lot when I started to work with soap web services.

Below I want to quote my LIST request that should return the contents of the public folder:

 

<request operationName="list" locale="en"></p><p> <resourceDescriptor name="" wsType="folder" uriString="/public" isNew="false"></p><p> <label>null</label></p><p> </resourceDescriptor></p><p> </request>

Link to comment
Share on other sites

  • 3 years later...

Following was the Request1 in SoapUI. Tried to put in my request (mutiple actially) inside the worked only after I enclosed it within ]]</p><p>&nbsp;</p><p> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://interfaces.hub.ml.com"></p><p> <soapenv:Header/></p><p> <soapenv:Body></p><p> <int:getHairCut></p><p> <sXML></p><p> <![CDATA[ </p><p> <MHRequests> </p><p> <MHRequest RequestID="20170425150456"></MHRequest> </p><p> <MHRequest RequestID="20170425150457"></MHRequest> </p><p> </MHRequests></p><p>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...