Skip to main content
Inspiring
June 19, 2017
Question

Issue with SOAP Response Namespaces

  • June 19, 2017
  • 0 replies
  • 440 views

I have a web service built but have a problem getting the response to be sent in the format required by the consumer

Here is a sample response from their docs:

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

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

<soap:Body><SendInspectionRequestTPAResponse xmlns="http://InspectionService/">

<SendInspectionRequestTPAResult xsi:type="xsd:int">244264</SendInspectionRequestTPAResult>

</SendInspectionRequestTPAResponse>

</soap:Body>

</soap:Envelope>

Here is what my web service is sending instead. Notice that the result is given the name result instead of SendInspectionRequestTPAResult and also that

instead of <soap it is using <soapenv. Does anyone have any idea what I am doing wrong?

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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Body>

<ns:SendInspectionRequestTPAResponse xmlns:ns="http://InspectionService/">

<ns:return>123456</ns:return>

</ns:SendInspectionRequestTPAResponse>

</soapenv:Body>

</soapenv:Envelope>

Thanks!

    This topic has been closed for replies.