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

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


      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



      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();



      Usuario usuario = new Usuario();


      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