-
Notifications
You must be signed in to change notification settings - Fork 115
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
Referenced node has no explicit xmlns namespace when marshalling #83
Comments
Thanks for the report. The problem appears to be that the root element, regardless of what it is, doesn't get a namespace. This could be fixed in the code generation by adding an
|
Actually, looking at this closer, the fact that the I recall a previous issue where the code failed to preserve namespaces when importing types across namespace boundaries (as your schema does), but I thought I fixed that. The fact that this schema does not declare a |
Thanks for the fast respone.
and adjusted the namespace flag to
and in this case it seems to use the target namespace but in my case I would expect that Signautre would have the namespace of xmldsig?
the xml output is now
Did I do something wrong? I am not sure if this was what you thought about. What I forgot to mention is that I am using the omitempty-structs branch but I merged the latest master into it. I also tried it with the master with the same result. |
It looks like setting the targetNamespace did not fix the issue and this is a variation of #65 ; elements in another namespace mistakenly get labelled with the targetNamespace of the schema containing the reference. |
Hi, I am trying to include the external xmldsig schema into my schema and to generate the structs. This steps works and this is great!
In the next step I use xmlsec1 to sign the marshalled XML but then it complains that it can't find the Signature node.
Error: failed to find default node with name="Signature"
It seems that xmlsec1 expects that the marshalled XML contains a Signaute node with its explicit xmlns namespace/
When I am marshalling the XML I get a Signature node without its namespace but all its child nodes contain it. Is it somehow possible to achieve that the Signature node also has its namespace explicitly when marshalled?
Result:
Schema:
Generated code:
The text was updated successfully, but these errors were encountered: