none
Remove SOAP-ENC when serializing xml object to SOAP? RRS feed

  • Question

  • <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/> <SOAP-ENV:Body> <SOAP-ENC:string id="ref-1"><?xml version="1.0"?> <serelizedObject> </serelizedObject > </SOAP-ENC:string> </SOAP-ENV:Body> </SOAP-ENV:Envelope>


    How to remove the "<SOAP-ENC:string id="ref-1"><?xml version="1.0"> and corresponding

    end tag <SOAP-ENC:string> from the soap message because it's causing issue while

    sending the soap request to service.

    Above soap message is serelized from xml to soap using

    soapfomatter.

    Any help please...



    • Edited by ismek Thursday, April 28, 2016 12:37 AM
    Thursday, April 28, 2016 12:30 AM

All replies

  • Any ideas how to remove  "<SOAP-ENC:string id="ref-1"><?xml version="1.0"?>"

    from soap body message

    Thursday, April 28, 2016 5:21 PM


    • Edited by ismek Saturday, April 30, 2016 6:17 AM
    Friday, April 29, 2016 7:23 PM
  • Hi ismek,

    >>How to remove the "<SOAP-ENC:string id="ref-1"><?xml version="1.0">  andcorresponding endtag <SOAP-ENC:string>   fromthe soap message because it's causing issue while sending the soap request to service.

    I will recommend you use the MessageInspector to modify your message header or body before sending the request. The message inspector is an extensibility object that can be used in the service model’s client runtime and dispatch runtime programmatically or through configuration and that can inspect and alter messages after they are received or before they are sent.

    For more information, please try to refer to the following blog:
    https://blogs.msdn.microsoft.com/stcheng/2009/02/21/wcfhow-to-inspect-and-modify-wcf-message-via-custom-messageinspector/ .

    Best Regards,
    Amy Peng


    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.

    • Proposed as answer by Fang Peng Sunday, May 8, 2016 2:35 PM
    Thursday, May 5, 2016 2:58 AM
    Moderator