Comments (5)
Can you confirm if the issue is similar to the one described here? #17. My comment on it here: #17 (comment)
from gowsdl.
@c4milo I think this is a different problem. In that case, the NRCS web service is rejecting the request created by gowsdl
and returning a SOAP fault due to how the namespaces in the request are specified.
In my case, the problem is with unmarshalling the response returned by the web service. Specifically, the fact that the xmlns:vbox="http://www.virtualbox.org/"
is declared on the Envelope
means that when gowsdl
goes to parse the innerxml
of the Body
tag, it doesn't have the namespace mapping available. This makes it think that vbox
is an undeclared prefix when it parses respEnvelope.Body.Content
here:
Line 133 in 8413716
from gowsdl.
Looks like there's a proposal to expose the namespace bindings in the decoder: golang/go#12406
This could help with this issue, though it doesn't help with Go 1.5.
from gowsdl.
I managed to write some code that I think does the right thing for dynamic unmarshalling: https://github.com/md5/gowsdl-vboxwebsrv-test/blob/0f89b3888adf2c3ccb06b69dceec39c669783e97/unmarshal.go
It's getting late for me here, but I may have some time in the next few days to try to work it into a PR for gowsdl
. In the meantime, have a look.
Please bear in mind that I'm still learning Go, so I may have done some silly things here...
from gowsdl.
hey @md5, thanks for looking into this. I think you are definitely on the right track. We need to parse the whole response in one shoot so namespaces declared at the root of the document are considered.
from gowsdl.
Related Issues (20)
- dump request
- Error when parsing response: Expected param start-info="application/soap+xml", got text/xml HOT 2
- Incorrect namespace handling HOT 5
- Empty strings in enums results in broken code HOT 1
- nodes with multiple namespace are not resolved by the generated code
- Some complex types are missing the namespace
- Separation of generated code into packages HOT 2
- 1511:11: expected type, found '-' (and 3 more errors) HOT 2
- Namespace problem HOT 3
- Cut a new Release v0.6.0 HOT 1
- Failing test TestEPCISWSDL HOT 2
- gowsdl does not respect the targetNamespace value on wsdl definition.
- SOAP Header element not present
- generate code from wsdl HOT 1
- date format: cannot unmarshal into soap.XSDDate
- Any plan to update the go.mod with latest versions. Seeing some vulnerabilities reported with the current versions used
- bad type generation for xs:choice + maxOccurs="unbounded"
- Conflicting XML tags are generated, if a struct with field XMLName is used inside another struct
- Allow for marshalling/unmarshalling of XSDDateTime attributes
- bad type generation if maxOccurs > 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gowsdl.