tiaguinho / gosoap

šŸ¦‰SOAP package for Go
MIT License
515 stars 179 forks source link

composite header params #31

Closed ejosvp closed 5 years ago

ejosvp commented 5 years ago

Hello

I need to send a complex header param:

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <A xmlns="http://foo.org">
            <B>
                <D>foo</D>
                <E>bar</E>
            </B>
        </A>
    </soap:Header>
    <soap:Body>
        <A xmlns="http://bar.org">
            <B>foo</B>
            <C>bar</C>
        </A>
    </soap:Body>
</soap:Envelope>

I think https://github.com/tiaguinho/gosoap/pull/4 is related to this

can this be done by changing headerParams from map[string]string to map[string]interface{}, and some other changes in the encoder? https://github.com/tiaguinho/gosoap/blob/master/soap.go#L19-L22 https://github.com/tiaguinho/gosoap/blob/master/encode.go#L40