none
How to update the SOAP Envelope RRS feed

  • Question

  • Hi,

        I am new to web service and the product that I am supporting is using a WCF web service developed by a third party. I want to change the below SOAP Envelope in the request from

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:tem="http://tempuri.org/" 
    xmlns:max="http://schemas.datacontract.org/2004/07/Wyndham.Newyork.Jack.Core.Common">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>

      To

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:tem="http://tempuri.org/" 
    xmlns:max="http://schemas.datacontract.org/2004/07/Jack.Core.Common">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>

       I am not sure whether the solution is a change in DLL or change in code.

    Thanks,
    Gopal

    Friday, March 25, 2016 6:56 PM

Answers

  • Hi Gopal,

    In order to update the SOAP Envelope while sending the request, we can create a custom IClientMessageInspector implementation. In this way we can access the full SOAP message and change it as we need.

    For more information, please try to refer to the following article:
    https://cmatskas.com/changing-soap-message-data-and-namespaces-with-c/ .

    Best Regards,
    Amy Peng

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 28, 2016 10:07 AM
    Moderator