External namespaces insight body.
Created by: mix911
Hello!
I'm not sure that my question is correct but is it possible to generate code for this type of requests:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<exp:getRef xmlns:exp="http://exportservice.ws.service.scc.com/">
<userLogin>OTKR1</userLogin>
<refId>102227</refId>
<position>1</position>
<recordsPerFile>1</recordsPerFile>
</exp:getRef>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Please notice exp:getRef xmlns:exp="http://exportservice.ws.service.scc.com/". If I'm right generated code should be something like:
type GetRef struct {
.....
Ext string `xml:"xmlns:exp,attr"`
.....
}
type OperationGetRef struct {
GetRef *GetRef `xml:"exp:getRef,omitempty" json:"getRef,omitempty" yaml:"getRef,omitempty"`
}
func (p *exportService) GetRef(GetRef *GetRef) (*GetRefResponse, error) {
GetRef.Ext = "http://exportservice.ws.service.scc.com/"
.....
return γ.GetRefResponse, nil
}