title: Apache CXF - javax.xml.ws.soap.SOAPFaultException: No security action was defined
body: <p>Despite I have set the <code>username</code>, <code>password</code>, <code>action</code>, and <code>WS Security Password Type (which is PasswordText)</code>, getting this exception when I try to call a service of the web service: <code>No security action was defined</code>. The web service I try to communicate uses <code>Basic Authentication</code> with using <code>PasswordText</code> WS Security Password Type.</p>
  
  <p>Here is what I have tried:</p>
  
  <pre><code>    Map&lt;String, Object&gt; ctx = ((BindingProvider) basicHttpBindingIDeneme).getRequestContext();
      ctx.put("ws-security.username", USERNAME);
      ctx.put("ws-security.password", PASSWORD);
  
      Map&lt;String,Object&gt; inProps = new HashMap&lt;String,Object&gt;();
      inProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
      inProps.put(WSHandlerConstants.ACTION, "UsernameToken");
      WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
  
      org.apache.cxf.endpoint.Client client = ClientProxy.getClient(basicHttpBindingIDeneme);
      org.apache.cxf.endpoint.Endpoint cxfEndpoint = client.getEndpoint();
      cxfEndpoint.getInInterceptors().add(wssIn);
  
      Map&lt;String,Object&gt; outProps = new HashMap&lt;String,Object&gt;();
      // how to configure the properties is outlined below;
  
      WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
      cxfEndpoint.getOutInterceptors().add(wssOut);
  </code></pre>
  
  <p>What else do I need to configure in order to define security action?</p>
  
  <p>p.s. Using <code>Apache CXF 3.1.12</code> which is the latest version available.</p>