Affects Version/s: 1.6.5
Fix Version/s: None
Component/s: XML Processing
Environment:Groovy 1.6.5 / Linux
Number of attachments :
I have a SOAP request containing the following stanza :
<filterValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">gaucho</filterValue>
However, XMLNodePrinter outputs :
I looked in the source of XMLNodePrinter, and it seems that, since an element/attribute with the prefix 'xs' is never encountered, the corresponding call to printNamespace is never done.
The processed xml give me an Unmarshalling Exception from the web service because the namespace 'xs' is then not bound. I understand that usually, namespaces that are not used in the XML don't have to be outputted, but still I do not feel comfortable with XMLNodePrinter removing some of my declarations.
You will find in attachment the raw SOAP request and a sample Groovy script to test it (this is not a unit test).
Thanks in advance