Axis2 issue when setting HTTP SOAPAction header

I am trying to connect to the 3rd party SOAP web service. It seems that the service can work when the HTTP SOAPAction header is an empty string (""). This is a wsdl snippet:

<wsdl:binding name="detailsRequestMessage" type="tns:UssdPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="details">
        <soap:operation soapAction=""/>
        <wsdl:input>
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>

Where do you see soapAction = ""

I created stubusing Axis2 (1.5) wsdl2java.

I was hoping to get the following (successful output when working with SoapUI ):

POST /details HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: some.host
Content-Length: 323

But instead I get:

POST /details HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://some.url/wsussd/ussdtypes/UssdPortType/detailsRequest"
User-Agent: Axis2
Host: some.host
Content-Length: 300

Does anyone know what the problem is or how to set soapAction in the program.

Thanks Ronen

+5
source share
2 answers

rperez . https://issues.apache.org/jira/browse/AXIS2-4264, , ​​ 1.6.0, 1.6.2

:

stub._getServiceClient().getOptions().setProperty(org.apache.axis2.Constants.Configuration.DISABLE_SOAP_ACTION, true);
+4

... .

, , ( API):

serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
options.setAction("");

, - SOAP. :

options.setSoapVersionURI(
    org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

( SOAP12).

, .

+1

All Articles