问题
I have deployed a WSO2 ESB Proxy Service that works well: it sends a request for a dataset, in the outSequence of the proxy service I send response in a file (I set a sequence for doing it) and i can also visualize response in SOAP UI (or in the "try this service" page of the ESB).
If I set a scheduled task it doesn't work: i set message (my xml right-working message in SOAP UI), injectTo (proxy), proxyName (my proxy name), format (my format) and SoapAction...
I'm sure that the name of SoapAction is correct, but the response of the server is "HTTP header value is not recognized by the server SOAPAction: xxxx" where xxxx is the right soap action name.
This happens with another task i've tried using another simpler proxy service, everything is correct until I use the proxy service within a scheduled task.
I can't understand.
回答1:
Check whether you receive this error in the insequence or the outsequence..
Plus, when you send a response back are you using <send/>
or providing a specific endpoint.
回答2:
You must be add "soapAction" header like this:
<property name="Code" value="1234"/>
<header name="soapAction" scope="transport" value="http://tempuri.org/MyService/GetAddress"/>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:GetAddress>
<tem:Code>$1</tem:Code>
</tem:GetAddress>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="get-property('Code')"/>
</args>
</payloadFactory>
<send>
<endpoint>
<address format="soap11" uri="http://192.168.1.1/Services/ShakouriService.svc?wsdl"/>
</endpoint>
</send>
来源:https://stackoverflow.com/questions/31385456/soap-action-error-in-wso2-esb-task-configuration