[ 
https://issues.apache.org/jira/browse/GROOVY-3905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher updated GROOVY-3905:
--------------------------------------
    Fix Version/s:     (was: 2.5.0-beta-1)

> XMLNodePrinter doesn't keep namespace required for attribute value
> ------------------------------------------------------------------
>
>                 Key: GROOVY-3905
>                 URL: https://issues.apache.org/jira/browse/GROOVY-3905
>             Project: Groovy
>          Issue Type: Bug
>          Components: XML Processing
>    Affects Versions: 1.6.5
>         Environment: Groovy 1.6.5 / Linux
>            Reporter: Nicolas Nobelis
>         Attachments: NameSpaceTest.groovy, TableReportSimpleRequest.xml
>
>
> 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 :
> <filterValue xsi:type="xs:string">gaucho</filterValue>
> 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
> N.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to