I'm trying to communicate with a SOAP service from my go program but I'm having difficulties to use the xml package.
Most of the requests I have to send have the following format:
<s:Envelope xmlns="namespace1">
<s:Body>
<FunctionName xmlns=“namespace2”/>
</s:Body>
</s:Envelope>
I feel I have to create one type for each request I want to make, as FunctionName
changes... Here's the code I use so far.
It would be nice if I could have a single type with the FunctionName
as an attribute but I just can't figure out how... To make it clearer, I would like to put a variable instead of FunctionName
inside xml:"s:Body>FunctionName"
.
Thanks a lot for your help!