Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External namespaces insight body. #140

Open
mix911 opened this issue Nov 18, 2020 · 0 comments
Open

External namespaces insight body. #140

mix911 opened this issue Nov 18, 2020 · 0 comments

Comments

@mix911
Copy link

mix911 commented Nov 18, 2020

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant