-
Notifications
You must be signed in to change notification settings - Fork 159
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
Missing namespace directive #118
Comments
I have the same issue and do not see an option on wsdl2go to produce a different result. |
The issue is that xmlns:ns is being added as the NSAttr. Envelope has struct tag Replacing it with Fixes the problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used WSDL2GO to create a template from a WSDL for Ivanti Service Manager at https://portal.flycastpartners.com/HEAT/ServiceAPI/FRSHEATIntegration.asmx?WSDL.
The resulting calls failed because the parameters have no namespace and there is no default namespace directive in the envelope...
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="SaaS.Services" xmlns:tns="SaaS.Services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
SOAP-ENV:Body
User
Password
TenantId
Role
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Either prefixing each tag with ns: or adding ' xmlns="SaaS.Services"' to the envelope attributes solves the problem but I could no see how to get WSDL2GO to do this without altering the code. In the end I modified the Envelope struct definition and the doRoundTrip function in client.go to add the default namespace to the envelope attributes using the same namespace as the NSAttr attribute.
Am I missing something here?
The text was updated successfully, but these errors were encountered: