0 Replies Latest reply: Apr 2, 2012 8:05 AM by Rajnish Kumar RSS

    Client side SOAPHandlers

    Rajnish Kumar Newbie

      Hi,

      My environment details :-

      EnterprisePlatform-4.3.0.GA_CP10

      jdk1.6.0_30

      jbossesb-4.10

       

      I am trying a simple client side SOAP handler. It's not getting called.

       

      Client Side Service (generated using wsconsume). I have added @HandlerChain annotation.

      ...

      ...

      @WebServiceClient(name = "WSSecurityService", targetNamespace = "http://com.fnb.ws.test/pojo/wssecurity", wsdlLocation = "file:/C:/Users/rkumar/workspace/JBOSSWSandESB\\WebContent\\WEB-INF\\wsdl/WSSecurityService.wsdl")

      @HandlerChain(file = "WEB-INF/clienthandler.xml")

      public class WSSecurityService

          extends Service

      {

      ...

      ...

       

      clienthandler.xml :-

      <?xml version="1.0" encoding="UTF-8"?>

      <handler-chains xmlns="http://java.sun.com/xml/ns/javaee"> 
         <handler-chain runAt="client"> 
            <handler> 
               <handler-class>com.fnb.ws.test.myClientSOAPHandler</handler-class> 
            </handler> 
         </handler-chain>
      </handler-chains>

       

      WS client jso code fragment :-

      <%

          try {
         WSSecurityService service = new WSSecurityService();
         WSSecurity proxy = (WSSecurity)service.getWSSecurityPort();
         ((StubExt)proxy).setConfigName("Standard WSSecurity Client");

         // invoke methods
         System.out.println(proxy.testOperation1("Called from jsp Client"));
              } catch (Exception e) {
              out.println("Caught Exception: " + e);
          }
      %>

       

      Call succeeds, I can see the logs from service but client side SOAPHandler is not invoked.

      Can anyone tell me what needs to be changed. any help on reading material about setting up handler on server and client side would be appreciated.

       

      Cheers,

      -Rajnish