Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was able to replicate the behavior you described (SOAPAction header is "") using an invocation like this:</p> <pre><code>MyPortService service = new MyPortService(); MyPort port = service.getMyPortSoap11(); MyRequest request = new MyRequest(); MyResponse response = port.subscription( request ); </code></pre> <p>Here are the HTTP Headers from TCP Dump using this invocation:</p> <pre><code>POST /MyService/services HTTP/1.1 Content-Type: text/xml; charset=UTF-8 Accept: */* SOAPAction: "" User-Agent: Apache CXF 2.7.6 Cache-Control: no-cache Pragma: no-cache Host: redacted Connection: keep-alive Content-Length: 377 </code></pre> <p>I tried adding an out interceptor and ensuring that the SOAPAction was set as a header, but no matter what I tried that did not cause the SOAPAction to be sent as part of the HTTP request.</p> <p>I then found a lead in this <a href="http://mail-archives.apache.org/mod_mbox/cxf-users/201306.mbox/%3C7896226803095731046@unknownmsgid%3E" rel="nofollow">thread</a> and reformatted my invocation:</p> <pre><code>ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); factory.setServiceClass( MyPort.class ); factory.setAddress( "http://www.host.com/service" ); factory.setServiceName( new QName( targetNamespace, wsdlBindingName ) ); Object myService = factory.create(); org.apache.cxf.endpoint.Client client = ClientProxy.getClient( myService ); Map&lt;String, List&lt;String&gt;&gt; headers = new HashMap&lt;String, List&lt;String&gt;&gt;(); headers.put("SOAPAction", Arrays.asList("mySoapAction")); client.getRequestContext().put(Message.PROTOCOL_HEADERS, headers); client.invoke( operationName, request ); </code></pre> <p>Here are the HTTP Headers from TCP Dump of an invocation in this style:</p> <pre><code>POST /MyService/services HTTP/1.1 Content-Type: text/xml; charset=UTF-8 Accept: */* SOAPAction: mySoapAction User-Agent: Apache CXF 2.7.6 Cache-Control: no-cache Pragma: no-cache Host: redacted Connection: keep-alive Content-Length: 377 </code></pre> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload