[ 
https://issues.apache.org/jira/browse/CXF-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563292#action_12563292
 ] 

Marco Piraccini commented on CXF-1407:
--------------------------------------

...mmm..i'dont understand why annotations are invalid (really, can you give me 
a spec reference?), but i think that the real strange point is that the CXF 
behaviour is different after i asked the wsdl. 
Anyway, if i try with:

@XmlAccessorType(XmlAccessType.PROPERTY)
public class ComplexException extends org.omg.CORBA.UserException {

    public String reason;
    
    public 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;
    }

That's different from your example (the variables are public and not private), 
the returned message is correct, but mapped twice. There something wrong in my 
annotations?

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.

Reply via email to