简体   繁体   中英

Spring Integration and SOAP 1.2: setting SOAPAction

I am developing a client app with Spring Integration that needs to call a SOAP 1.2 service. If I set the SOAPAction with int-ws:header-enricher:

<int-ws:header-enricher >
    <int-ws:soap-action value="foo"/>
</int-ws:header-enricher>

I get a weird Content-Type header with the action on a separate line, preceded by a tab char:

>> "Content-Type: application/soap+xml; charset=utf-8; [\r][\n]"
>> "[0x9]action="foo"[\r][\n]"

I tried calling SaajSoapMessage.setSoapAction() in WebServiceMessageCallback.doWithMessage() but the result is the same. If I don't explicitly set the SOAPAction the Content-Type header is all on one line with no tab char, but the action is empty.

>> "Content-Type: application/soap+xml; charset=utf-8; action=""[\r][\n]"

I got used to for the AxiomSoapMessageFactory instead of the default SaajSoapMessageFactory . It always served me well for both SOAP 1.1 and 1.2 and also provides enough help with the large and with the attachment messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM