Interacting with SOAP Service from Go

Hello all,

I have a soap request like

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ope="https://I_REMOVED_THE_URL_HERE/wsdl/v4.0/operator">
    <x:Header/>
    <x:Body>
        <ope:aLogin>
            <ope:login>TESTUSERNAME</ope:login>
            <ope:password>TESTPASSWORD</ope:password>
        </ope:aLogin>
    </x:Body>
</x:Envelope>

And a wsdl url as

How do i make the request and map the response to a struct? Also, how do handle soap fault. I have tried to send the xml as a post request but response from the service is not valid.

Please you can help me with a snippet on go playground.

Thank you in advance

See https://github.com/tgulacsi/mnbarf
It uses a very old (058d360d9c1a25579ff03de5bb6d523afec204d3) version of hooklift/gowsdl, as that worked for me, but first I’d check out the current version from https://github.com/hooklift/gowsdl

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.