[
https://issues.apache.org/jira/browse/CXF-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563299#action_12563299
]
Marco Piraccini commented on CXF-1407:
--------------------------------------
I tried with Access type property and private variables:
@XmlAccessorType(XmlAccessType.PROPERTY)
public class ComplexException extends org.omg.CORBA.UserException {
private String reason;
private MyBean[] beans;
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public MyBean[] getBeans() {
return beans;
}
public void setBeans(MyBean[] beans) {
this.beans = beans;
}
}
...but the behaviour is the same: (duplicated) correct response for the first
SOAP message and wrong response after i get the WSDL with the browser. If you
need i can send a new TestCase for that.
Marco.
> 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
> Attachments: TestFault.zip
>
>
> 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.