Search |
||
Using JAXB RI's "simpler and better" binding mode from JAX-WSPosted by kohsuke on January 23, 2007 at 11:37 AM PST
My favorite feature in the JAXB RI is the simpler and better binding mode, which makes the generated code even easier to use, by ...
My previous entry talks about how to use it from JAXB's xjc tool, but of course you can use it from JAX-WS's wsimport tool, because JAX-WS uses JAXB for the databinding. The following example illustrates how: <wsimport wsdl="http://www.webservicex.com/stockquote.asmx?WSDL"> <binding file="simple-binding.xjb" /> </wsimport> Click the "simple-binding.xjb" link above to download this file, which is pretty short. The binding element can also be an attribute on <wsimport> element if you only have one binding file. In upcoming JAX-WS RI 2.1, you can also specify any XJC command line options through wsimport ant task. This is handy, for example, for you to use one of the JAXB RI plugins. The following example illustrates how: <wsimport wsdl="http://www.webservicex.com/stockquote.asmx?WSDL"> <xjcarg value="-cp"/> <xjcarg file="path/to/fluent-api.jar" /> <xjcarg value="-Xfluent-api"/> </wsimport> The <xjcarg> element follows the command-line argument mechanism in Ant. »
Related Topics >>
Java Web Services and XML Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|