cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@samsix.com
Subject Re: CXF code & JAXB
Date Sun, 17 Jan 2010 22:34:32 GMT
Quoting Coder One <coder_lol@yahoo.com>:

> 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,
>

Put the following XML fragment in a file (I call mine bindings.xjb).  
Then, run wsdl2java with the "-b bindings.xjb" option.

<jaxb:bindings version="2.0"
         xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
         xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <jaxb:globalBindings generateElementProperty="false"/>
</jxb:bindings>

You may have to do a variation on this, as I'm pulling parts of this  
from memory. But it gets rid of the JAXBElement<String> parts.

- Lucas


Mime
View raw message