JAX-WS modifying handler chain programmatically? PortInfo?
Posted
by wuntee
on Stack Overflow
See other posts from Stack Overflow
or by wuntee
Published on 2010-04-01T18:11:09Z
Indexed on
2010/04/01
18:13 UTC
Read the original article
Hit count: 940
I have a JAX-WS client that needs to have a modified handler-chain. I am currently doing it by binding this XML when generated the WSDL stubs:
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
<jws:handler-chain>
<jws:handler>
<jws:handler-name>ServiceRequestServiceClientHandler</jws:handler-name>
<jws:handler-class>blah.ServiceRequestServiceClientHandler</jws:handler-class>
</jws:handler>
</jws:handler-chain>
</jws:handler-chains>
</jaxws:bindings>
I was looking that the ServiceRequestService_Service object, and it seems like this could be done programmatically (easier in my opinion - less configuration files).
new ServiceRequestService_Service().getHandlerResolver().getHandlerChain(PORTINFO).add(HANDLER);
But, I do not know what the PortInfo object is, or how to obtain it in relation to the specific service. Has anyone done this?
© Stack Overflow or respective owner