aspose file tools*
The moose likes Web Services and the fly likes JAX-WS handlerchain annotaion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS handlerchain annotaion" Watch "JAX-WS handlerchain annotaion" New topic
Author

JAX-WS handlerchain annotaion

Maheshwari Kirthi
Greenhorn

Joined: Jan 24, 2011
Posts: 18
Hello,
I'm generating java client proxy classes in IRAD(7.0)
Project->New->WebServiceClient
from an already created WSDL to generate the JAX-WS web service client classes.
As a part of the process is there a way to specify any options to automatically generate the @HandlerChain annotaion in the service class .
Along with the WSDL I'm also adding the following bind.xml to specify the request-response packages.

<jaxws:bindings wsdlLocation="wsdl/TESTWS01.wsdl" version="2.0"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
<jaxws:bindings node="wsdl:definitions">
<jaxws:package name="com.test.webservice"/>
</jaxws:bindings>
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://www.TESTWS01.TESTWS01.Request.com']"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<jxb:schemaBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
<jxb:package name="com.test.webservice.Request"/>
</jxb:schemaBindings>
</jaxws:bindings> http://www.coderanch.com/forums/jforum?module=posts&action=insert&forum_id=51
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://www.TESTWS01.TESTWS01.Response.com']"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<jxb:schemaBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
<jxb:package name="com.test.webservice.Response"/>
</jxb:schemaBindings>
</jaxws:bindings>
</jaxws:bindings>

Currently after the classes are generated I add the @HandlerChain(file="handler-chain.xml") manually to the generated service class

handler-chain.xml

<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>
<handler>
<handler-class>com.test.handlers.WSHandler</handler-class>
</handler>
</handler-chain>
</handler-chains>

where WSHandler is of type SoapHandler

Thank you and Regards,
Kani.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-WS handlerchain annotaion