You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2010/10/21 16:49:15 UTC

[jira] Resolved: (CXF-3071) CXF to .NET ArrayOfXXX interop issue

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

Daniel Kulp resolved CXF-3071.
------------------------------

       Resolution: Invalid
    Fix Version/s: Invalid


The problem is in the test code:
        parent.setCompositeTypes(new org.datacontract.schemas._2004._07.testservice.ObjectFactory().createArrayOfSomeCompositeType(array));

should be:
        parent.setCompositeTypes(new org.datacontract.schemas._2004._07.testservice.ObjectFactory().createCompositeTypeParentCompositeTypes(array));

as the element name you need/want is in the createCompositeTypeParentCompositeTypes.   This is purely a JAXB thing, not CXF.


> CXF to .NET ArrayOfXXX interop issue
> ------------------------------------
>
>                 Key: CXF-3071
>                 URL: https://issues.apache.org/jira/browse/CXF-3071
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>         Environment: windows / solaris, CXF 2.3.0, 
>            Reporter: tom mckiernan
>             Fix For: Invalid
>
>         Attachments: java_ref_project.zip, wsdl.zip
>
>
> This is an interop issue when working with Java CXF --> .NET service.
> The .NET service defines a complex type - SomeCompositeType
> Then the service defines a parent complex type that itself contains an array of SomeCompositeType : this parent type is called CompositeTypeParent
> The problem is that the SOAP msg produced seems to ignore the field name and instead uses the type name.
> The WSDL and XSDs are attached to this ticket.
> The Java was produced using CXF 2.3.0.
> A rough MVN Java project is also attached that can be used to see the problem.
> An example of the SOAP msg produced is seen below. The parent object is defined as having a sub field called "compositeTypes'.
> However, the SOAP produced has called this field "ArrayOfSomeCompositeTypes' i.e. is using the field type instead of the field name.
> This is not acceptable to .NET - the .NET service ignores this section.
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>   <soap:Body>
>     <ns2:CreateSomeCompositeTypes xmlns="http://schemas.datacontract.org/2004/07/TestService"
>     xmlns:ns2="http://tempuri.org/"
>     xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
>       <ns2:parent>
>         <ArrayOfSomeCompositeType>			<!-- This should be called 'compositeTypes', not 'ArrayOfSomeCompositeType' -->
>           <SomeCompositeType>
>             <BoolValue>true</BoolValue>
>             <StringValue>hello world!</StringValue>
>           </SomeCompositeType>
>         </ArrayOfSomeCompositeType>
>       </ns2:parent>
>     </ns2:CreateSomeCompositeTypes>
>   </soap:Body>
> </soap:Envelope>
> At a guess I would imagine that the .NET service's use of ArrayOfXXX is confusing the client. I appreicate that WS-I profile recommends not to use this construct, but unfortunately .NET does.
> I also believe this issue exists on previous versions of CXF too.
> Many thanks!
> Thomas

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.