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

Grzegorz Grzybek edited comment on CXF-5254 at 10/4/13 8:30 AM:
----------------------------------------------------------------

There's one more problem with:
{code:xml}
            <!-- anonymous unwrapped, non-primitive sequence -->
            <element maxOccurs="unbounded" minOccurs="0" name="array9">
                <complexType>
                    <sequence>
                        <element name="item" type="string" />
                    </sequence>
                </complexType>
            </element>
            <!-- anonymous unwrapped, non-primitive array -->
            <element maxOccurs="3" minOccurs="3" name="array10">
                <complexType>
                    <sequence>
                        <element name="item" type="string" />
                    </sequence>
                </complexType>
            </element>
{code}

I'm working on 
{{org.apache.cxf.tools.corba.processors.wsdl.WSDLToCorbaHelper.processLocalElement()}}
 to handle every possible combination.

In the above case WSDL2IDL generates wrong corba binding:
{code:xml}
...
<corba:struct xmlns:x1="http://apache.org/type_test/types1"; name="array10Array" 
qualified="true" repositoryID="IDL:array10:1.0" type="x1:array10">
  <corba:member idltype="corba:string" name="item" qualified="true"/>
</corba:struct>

<corba:array xmlns:ns1="http://apache.org/type_test/doc/corba/typemap/"; 
xmlns:x1="http://apache.org/type_test/types1"; bound="3" elemname="x1:array10" 
elemtype="ns1:array10" name="array10Array" repositoryID="IDL:array10Array:1.0" 
type="x1:array10" wrapped="false"/>

<corba:struct xmlns:x1="http://apache.org/type_test/types1"; name="MixedArray" 
repositoryID="IDL:MixedArray:1.0" type="x1:MixedArray">
  ...
  <corba:member xmlns:ns1="http://apache.org/type_test/doc/corba/typemap/"; 
idltype="ns1:array10Array" name="array10" qualified="true"/>
</corba:struct>

...
    <corba:struct xmlns:x1="http://apache.org/type_test/types1"; 
name="array9Array" qualified="true" repositoryID="IDL:array9:1.0" 
type="x1:array9"> 
...
    <corba:struct xmlns:x1="http://apache.org/type_test/types1"; 
name="array9Array" qualified="true" repositoryID="IDL:array9:1.0" 
type="x1:array9"> 
...
    <corba:struct xmlns:x1="http://apache.org/type_test/types1"; 
name="array9Array" qualified="true" repositoryID="IDL:array9:1.0" 
type="x1:array9"> 
...
{code}

the member "array10" has type "array10Array" which should map to sequence, but 
is (multiple times) being overriden by struct...


was (Author: gzres):
There's one more problem with:
{code:xml}
            <!-- anonymous unwrapped, non-primitive sequence -->
            <element maxOccurs="unbounded" minOccurs="0" name="array9">
                <complexType>
                    <sequence>
                        <element name="item" type="string" />
                    </sequence>
                </complexType>
            </element>
            <!-- anonymous unwrapped, non-primitive array -->
            <element maxOccurs="3" minOccurs="3" name="array10">
                <complexType>
                    <sequence>
                        <element name="item" type="string" />
                    </sequence>
                </complexType>
            </element>
{code}

I'm working on 
{{org.apache.cxf.tools.corba.processors.wsdl.WSDLToCorbaHelper.processLocalElement()}}
 to handle every possible combination.

> Unmarshall exception if a sequence<string> is used in a struct.
> ---------------------------------------------------------------
>
>                 Key: CXF-5254
>                 URL: https://issues.apache.org/jira/browse/CXF-5254
>             Project: CXF
>          Issue Type: Bug
>          Components: CORBA Binding
>    Affects Versions: 2.7.5, 2.7.6
>         Environment: JAVA7 / Windows 7
>            Reporter: Juergen Bockhorn
>            Priority: Blocker
>         Attachments: CorbaBugRepro.zip, CXF-5254.diff, patch.txt
>
>
> A server function returns a struct. This struct contains another struct which 
> contains a sequence<string>. Calling this method with a CXF/Corba-Client 
> leads to an unmarshall exception:
> {code}
> Warnung: Interceptor for 
> {http://cxf.apache.org/bindings/corba/idl/repro}repro.ServiceCORBAService#{http://cxf.apache.org/bindings/corba/idl/repro}getFirst
>  has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unerwartetes Element 
> (URI:"", lokal:"item"). Erwartete Elemente sind 
> <{http://cxf.apache.org/bindings/corba/idl/repro}id>,<{http://cxf.apache.org/bindings/corba/idl/repro}s1>
>  
>       at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:808)
>       at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:629)
>       at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:157)
>       at 
> org.apache.cxf.interceptor.BareInInterceptor.handleMessage(BareInInterceptor.java:138)
> ...
> {code}
> (sorry for german).
> Using a pure CORBA-client works.
> I will attach a repro project to this issue if I have figured out how it 
> works :-)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to