Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3293

Handler not invoked in WS call on the client side when using dispatch and creating service without WSDL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None
    • jbossws-native
    • None

      Anil Saldhana wrote:

      Hi,

      In PicketLink, we are creating a Dispatch without considering the WSDL
      as follows:

      =============
      Service jaxwsService = Service.create(service);
      jaxwsService.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
      config.getEndPointAddress());
      Dispatch<Source> dispatch = jaxwsService.createDispatch(portName,
      Source.class, Mode.PAYLOAD);
      ==========

      Now, I want to inject one of my Jaxws handlers:

      ===========
      Binding binding = dispatch.getBinding();
      BinaryTokenHandler binaryTokenHandler = new BinaryTokenHandler();
      handlers.add(binaryTokenHandler);
      binding.setHandlerChain(handlers);
      ============

      But the outgoing WS call does not go through my handler.

      But, if the Dispatch was created with the knowledge of WSDL something like:
      ============
      Service service = Service.create(wsdl, serviceName);
      WSTest port = service.getPort(new
      QName("http://ws.trust.test.picketlink.org/", "WSTestBeanPort"),
      WSTest.class);
      BindingProvider bp = (BindingProvider)port;

      bp.getRequestContext().put(SAML2Constants.SAML2_ASSERTION_PROPERTY,
      assertion);
      List<Handler> handlers = bp.getBinding().getHandlerChain();
      handlers.add(new SAML2Handler());
      bp.getBinding().setHandlerChain(handlers);
      ===============

      Then I see that the handler is invoked during the WS call on the client
      side.

      Any thoughts? This is driving me nuts for 10 days now.

      Regards,
      Anil

            ropalka Richard Opalka
            ropalka Richard Opalka
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: