2 Replies Latest reply on Sep 23, 2008 11:16 AM by gllambi

    Missing WS-BA SOAP headers when calling WS

    gllambi

      Hi, watching the taxi, restaurant, theatre example I made my own service with WS-BA, but I'm having problems when propagating the transaction context in the SOAP header from the client.

      Here's the client's code. Am I missing something?

      Thanks
      Guzman

       ServicioSNIS_Service snis = new ServicioSNIS_Service();
       ServicioSNIS port = snis.getServicioSNISPort();
      
       //Colocar el handler del cliente WS-BA
       Handler handler = new JaxWSHeaderContextProcessor();
       List<Handler> handlers = Collections.singletonList(handler);
       bindingProvider.getBinding().setHandlerChain(handlers);
      
       System.out.println("CLIENT: obtaining userTransaction...");
      
       UserBusinessActivity uba =
       UserBusinessActivityFactory.userBusinessActivity();
      
       System.out.println("CLIENT: starting the transaction...");
      
       uba.begin();
      
       System.out.println("CLIENT WS-BA: transaction ID= " +
       uba.toString());
      
       ConfirmacionFormulario conf = port.completarFormulario(declarante,
       empresa);
      
       uba.close();
      


        • 1. Re: Missing WS-BA SOAP headers when calling WS
          adinn

           


          Here's the client's code. Am I missing something?


          Hmm, well apart form any description of the actual error you are seeing . . . your variable bindingProvider is magicked out of thin air. Where is it assigned? You should have a line like this

           BindingProvider bindingProvider = (BindingProvider)port;
          


          Also, make sure this is the JaxWSHeaderContextProcessorfrom the client package and that the server has installed the JaxWSHeaderContextProcessor from the server package.


          • 2. Re: Missing WS-BA SOAP headers when calling WS
            gllambi

             


            Hmm, well apart form any description of the actual error you are seeing . . . your variable bindingProvider is magicked out of thin air. Where is it assigned? You should have a line like this


            Sorry I forgot to paste it.


            Also, make sure this is the JaxWSHeaderContextProcessorfrom the client package and that the server has installed the JaxWSHeaderContextProcessor from the server package.


            Know the code is working right. Maybe I've got some configuration issues.

            Thank you very much and sorry for wasting your time

            Guzman