hooklift / gowsdl

WSDL2Go code generation as well as its SOAP proxy
Mozilla Public License 2.0
1.14k stars 390 forks source link

Allow call with SOAP envelope #266

Open yousuf-particle opened 6 months ago

yousuf-particle commented 6 months ago

soap.call method takes request argument and embeds the request in SOAPEnvelope.

/ /SOAP envelope capable of namespace prefixes
        soapEnvelope := SOAPEnvelope{
            XmlNS: XmlNsSoapEnv,
        }
        soapEnvelope.Headers = s.headers
        soapEnvelope.Body.Content = request
        envelope = soapEnvelope

This generates the message of the form :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <Headers>
        ............
 </Headers>
  </soap:Header>
  <soap:Body>
    <Content xmlns="">
     ......
    </Content>
  </soap:Body>
</soap:Envelope>

This PR allows the option to override this by passing in an envelope. Which would allow for removing and tags.