0
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMessageResponse>
         <GetMessageResult>
            <head xmlns="">
               <body>
                  <Inner>welcome</Inner>
                  <Outer>Bye</Outer>
               </body>
            </head>
         </GetMessageResult>
      </GetMessageResponse>
   </soap:Body>
</soap:Envelope>

This is generated by WCF. the response XML as above. I would like to change the XML prefix from <soap:Body> to <soapenv:Body>
Anyone has this solution?

lee jason
  • 1
  • 1
  • When I use soapUI to test my wcf service, my request is a message starting with soapenv. – Theobald Du Jan 26 '21 at 08:46
  • Is there a requirement that the prefix should be soapenv instead of soap? Because the xml tooling does not care how the prefix looks like as long as it is defined and points to the correct url. The prefix is nothing more than a placeholder for the actual url that helps users when reading the message. – martijn Jan 27 '21 at 06:44
  • @TheobaldDu, by default, the request is soapenv. The soap response always in soap instead of soapenv. – lee jason Jan 27 '21 at 07:10
  • @martijn, the project's requirement is during the response, the soap prefix must , otherwise the legacy system cannot support it. Do you have any advice so far? thanks in advance. – lee jason Feb 02 '21 at 03:05
  • I've never done it myself but a quick round of googling got me here. https://stackoverflow.com/questions/36230835/wcf-client-forcing-global-namespaces/36368162#36368162 I think this is what you need. – martijn Feb 02 '21 at 06:25

0 Answers0