1 Reply Latest reply on Dec 4, 2018 9:54 AM by Crispin Quizo

    org.apache.cxf.ws.policy.PolicyException: No username available

    Crispin Quizo Newbie

      Hello everybody,

      I have an exception when I try to consume a service Web (like this Web service client with Username token authentication problem )

      <<I am deploying in Wildfly14>>

       

      I attach two classes that I use in the next code:

      Fist I inject the Web service client

       

      @WebServiceRef(BICService.class)

      private IIndividualReportServiceContract webService;

       

      Then, I try to consume

       

      String url = "https://tempuri.org/IIndividualReportServiceContract/GetIndividualReport5";

      WebserviceCaller.configureService(webService, url, new SOAPHandler("BUNWEBSERVICE2", "8uni0nWS2"));

      Titular titular = new Titular();

      titular.setTipoDocumento(1001);

      titular.setDocumento("2696504");

      Usuario usuario = new Usuario();

      usuario.setDocumento("35555553");

      usuario.setNombreCompleto("Mauricio Limarino Alcazar");

      String wsResponse = webService.getIndividualReport5(titular, usuario);

      System.out.println("------wsResponse----->" + wsResponse);

       

      The server logger shows the expected XML. It works well if I copy this to soapUI.

       

      Please help me to solve this issue