Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
PassoGiau
PassoGiau
1 Post
ACCEPTED ANSWER

Pinned topic JAX-RPC client handelr is not invoked

‏2012-09-05T22:07:44Z |
Greetings,

I have a simple JAX-RPC web service client that needs to insert the username/password elements into the SOAP headers. Unfortunately, the client runs on Websphere 6.1 (on 7.0 I'm using JAX_WS with no problems).

I have tried configuring the handle in in web.xml. Something like

<service-ref>
<description>WSDL Service CustomerInfoService</description>
<service-ref-name>service/CustomerInfoService</service-ref-name>
<service-interface>customer.CustomerInfoService</service-interface>
<wsdl-file>WEB-INF/wsdl/ServiceInfo.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/ServiceInfo_mapping.xml</jaxrpc-mapping-file>
<service-qname xmlns:pfx="http://www.service.com">pfx:ServiceInfo</service-qname>
<port-component-ref>
<service-endpoint-interface>com.services.ServiceInfoIntf</service-endpoint-interface>
</port-component-ref>
<handler>
<handler-name>SoapHeaderHandler</handler-name>
<handler-class>com.services.handler.SoapHeaderHandler</handler-class>
</handler>
</service-ref>

The handler is never invoked.

I tried the programmatic way:

HandlerInfo info = new HandlerInfo(com.services.handler.SoapHeaderHandler, null, null);
List chain = new ArrayList();
chain.add(info);

for(Iterator i = service.getPorts(); i.hasNext();) {
QName qn = (QName) i.next;
service.getHandlerRegistry().setHandlerChain(qn, chain);
}
....

All is in vain. I would very much appreciate some help. TIA

-aaron