cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <>
Subject [jira] [Commented] (CXF-5254) Unmarshall exception if a sequence<string> is used in a struct.
Date Thu, 10 Oct 2013 13:03:42 GMT


Grzegorz Grzybek commented on CXF-5254:

Hello - here's a pull request:

All test cases pass, as well as Juergen's example.

The changes were quite complex wrt correct Corba-xml mapping.

Please see if this is right way to do this.

The least clean change is related to handling Corba structs derived from such XSD complex
      <!-- some non-sequence, non-array elements -->
      <xs:element name="x" type="x" minOccurs="0" maxOccurs="not 1" />
because runtime representation is usually this:
   <!-- some elements -->
but may also be this:
   <!-- some elements -->
   <!-- no "x" element at all! -->
while writing to Corba stream there must be a sign that we're sending 0-size collection. The
relevant changes (not so clean) are in {{org.apache.cxf.binding.corba.types.CorbaStructListener.processEndElement(QName)}}.

Grzegorz Grzybek

> Unmarshall exception if a sequence<string> is used in a struct.
> ---------------------------------------------------------------
>                 Key: CXF-5254
>                 URL:
>             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:, 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
> {code}
> Warnung: Interceptor for {}repro.ServiceCORBAService#{}getFirst
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unerwartetes Element (URI:"",
lokal:"item"). Erwartete Elemente sind <{}id>,<{}s1>

> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(
> 	at
> 	at org.apache.cxf.interceptor.BareInInterceptor.handleMessage(
> ...
> {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

View raw message