Jim,

This is JIRA issue:

https://issues.apache.org/jira/browse/CXF-2193

It's one of those things that could technically go either way.   If you are 
SUPER LITERAL with item iv:

(iv) The elements referred to by the input and output message parts 
(henceforth referred to as wrapper elements) are both complex types defined 
using the xsd:sequence compositor 

then you could say RegistrationContext is a complexType defined using a 
complexContent, not a sequence.    That said, we likely could allow unwrapping 
it.

HOWEVER, it's a non-trivial thing to do and would be quite a bit of work to 
implement which is one of the reasons no-one has really picked it up.   The 
generation part of it is relatively minor in the grand scheme of things.   The 
bigger issue will likely be the wrapper helper things used at runtime.   The 
reflection version  may not be too hard.  You'd need to walk parent classes to 
get the right fields and such, but not huge.  The ASM version will be harder 
mostly cause messing with ASM sucks and is error prone.  :-)


Dan









On Thursday, May 05, 2011 1:15:15 AM Jim Ma wrote:
> Hi all ,
> Can not remember if we talked about this before, raise this question
> again if we did.
> If the schema element's type is RegistrationContext which contains an
> extension ,should we map it to wrapped ?
>    <complexType name="RegistrationContext">
> 
>       <complexContent>
> 
>          <extension base="types:RegistrationState">
> 
>             <sequence>
> 
>                <element name="registrationHandle" type="xsd:string"/>
> 
>             </sequence>
> 
>          </extension>
> 
>       </complexContent>
> 
>    </complexType>
> 
>    <complexType name="RegistrationState">
> 
>       <sequence>
> 
>          <element name="registrationState" type="xsd:base64Binary"
> minOccurs="0"/>
> 
>          <element name="scheduledDestruction" type="types:Lifetime"
> minOccurs="0"/>
> 
>          <element name="extensions" type="types:Extension"
> minOccurs="0" maxOccurs="unbounded"/>
> 
>       </sequence>
> 
>    </complexType>
> 
> 
> There is no clue in jaxws spec to find out how this should be
> processed. But I think it can be mapped to wrapped since
> its base type does not break this two rules :
> (iv) The elements referred to by the input and output message parts
> (henceforth referred to as wrapper
>      elements) are both complex types defined using the xsd:sequence
> compositor (v) The wrapper elements only contain child elements, they must
> not contain other structures such as
>      wildcards (element or attribute), xsd:choice, substitution groups
> (element references are not per-
>      mitted) or attributes; furthermore, they must not be nillable.
> 
> RI maps it to wrapped , we also need to fix this problem and map it to
> wrapped too ?
> 
> Thanks
> Jim

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to