Since the "message" element both has minOccurs="0" and
nillable="true", JAXB uses a JAXBElement<String> so that it can
distinguish between document instances with zero occurrences of the
element and instances with one occurence, but with nil=true. If the
schema is under your control, remove the nillable="true".

Andreas

On Sat, Jan 16, 2010 at 18:31, Coder One <[email protected]> wrote:
> Hi,
>
> The generated code refers to a JAXBEElement<String> which is a bit "ugly".  
> How can I get the 2.2.5 codegen to generate a pure "String" rather than 
> JAXBElement<String> ?
>
> Thanks,
>
>
>
>     /**
>      * Gets the value of the message property.
>      *
>      * @return
>      *     possible object is
>      *     {...@link JAXBElement }...@code <}...@link String }...@code >}
>      *
>      */
>     public JAXBElement<String> getMessage() {
>         return message;
>     }
>
>
>
> <xs:complexTypename="ProcessingResponse">
> - <xs:sequence>
>   <xs:element minOccurs="0"name="message"nillable="true"type="xs:string"/>
>   <xs:element minOccurs="0"name="value"type="xs:int"/>
>   </xs:sequence>
>   </xs:complexType>
>
>
>
>

Reply via email to