Java Reference
In-Depth Information
Example6-20.Custom JAX-WS binding to enable asynchronous operations
<bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocaption="http://localhost:8080/soaCookbookWS/
SoaCookbookService?wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws">
<bindings node="wsdl:definitions">
<package name="com.soacookbook.ch03"/>
<enableAsyncMapping>true</enableAsyncMapping>
</bindings>
</bindings>
In this file, you're using the binding customizations available in the http://java.sun.com/
xml/ns/jaxws namespace to indicate what nodes you want to adapt.
When you include binding customizations in wsimport , you must create a child element of
the wsimport task that points to your binding file, like this:
<binding dir="..." includes="..." />
So you will need to update your build.xmlfile to include this code. The new wsimport task
looks like Example 6-21 .
Example6-21.The wsimport Ant task including binding customizations
<wsimport
wsdl="${wsdl.url}"
destdir="${gen.classes.dir}"
sourcedestdir="${src.gen.dir}"
keep="true"
extension="false"
verbose="true" >
<binding dir="${binding.dir}" includes="${binding.file}" />
</wsimport>
You can use a wildcard to specify all files with a given extension if you have multiple binding
customization files in the given directory. If you want to point to multiple directories, you can
use more than one <binding> element.
Search WWH ::




Custom Search