Item element with xmlns="" in Exception with arrays of compex objects
---------------------------------------------------------------------
Key: CXF-1407
URL: https://issues.apache.org/jira/browse/CXF-1407
Project: CXF
Issue Type: Bug
Affects Versions: 2.0.4
Environment: Linux, java1.6.0_02
Reporter: Marco Piraccini
Consider an exception with an array of objects. If i send a soap message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://server.hw.demo/">
<soapenv:Header/>
<soapenv:Body>
<ser:sayHi>
<ser:arg0>test</ser:arg0>
</ser:sayHi>
</soapenv:Body>
</soapenv:Envelope>
The answer is:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
(...)
<ns1:ComplexException xmlns:ns1="http://server.hw.demo/">
<reason xmlns:ns2="http://server.hw.demo/">Test</reason>
<beans xsi:type="ns2:myBeanArray"
xmlns:ns2="http://server.hw.demo/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<item>
<ns2:age>0</ns2:age>
<ns2:name>Marco</ns2:name>
</item>
</beans>
</ns1:ComplexException>
(...)
</soap:Envelope>
Notice that the item element is with no namespace (correct).
The problem is that, after the first soap message sent, if i request the
service wsdl (for example pointing the browser at
http://localhost:9000/helloWorld?wsdl), all the subsequent answers are with a
different (and wrong) response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
(...)
<ns1:ComplexException xmlns:ns1="http://server.hw.demo/">
<reason xmlns="http://server.hw.demo/">Test</reason>
<beans xsi:type="myBeanArray" xmlns="http://server.hw.demo/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<item xmlns="" xmlns:ns3="http://server.hw.demo/">
<ns3:age>0</ns3:age>
<ns3:name>Marco</ns3:name>
</item>
</beans>
</ns1:ComplexException>
(...)
</soap:Envelope>
In the attachment there is a simple project to reproduce the problem.
Marco.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.