Announcement Announcement Module
No announcement yet.
Issue with SOAP xml generated by WebserviceTemplate's API Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with SOAP xml generated by WebserviceTemplate's API

    Hello All

    I am developing a client to send the XML request to webservice using spring webservice client API. I am using following code:

    String xml = createXML();
    StringSource objToXMLSource = new StringSource(xml);
    Writer xmlToObj = new StringWriter();
    StreamResult responseResult = new StreamResult(xmlToObj);
    webServiceTemplate.sendSourceAndReceiveToResult(ob jToXMLSource, responseResult);

    XML is: <SIMPLRequest xmlns=""><RequestIssues><SourceIdentifier>SAD</SourceIdentifier><RequestType>core</RequestType><Exclude>Non-Issue</Exclude></RequestIssues></SIMPLRequest>

    In logs I am seeing that following SOAP xml, which is not correct, is formed out of above xml:

    Received request [<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body><ns1:SIMPLRequest"" xmlns:ns1=""><ns1:RequestIssues><ns1:SourceIdentifier> SAD</ns1:SourceIdentifier><ns1:RequestType>core</ns1:RequestType><ns1:Exclude>Non-Issue</ns1:Exclude></ns1:RequestIssues></ns1:SIMPLRequest></soapenv:Body></soapenv:Envelope>]

    Please tell me why the portion highlighted in bold is forming and how to avoid it. Please respond ASAP.

    Harish Kumar

  • #2
    I have found the solution for it. A library webservices-rt.jar was missing from my classpath.