How to map a SOAP Fault 1.2 message to SOAP Fault 1.1 in SwitchYard ?
Issue
-
Imagine that in a
SwitchYard
application there is aService Component
named which exposes aSOAP 1.1
compliant interface in form of aSOAP Binding
to acceptSOAP 1.1
messages and the same service has aComposite Reference
that exposes aSOAP 1.2
compliant interface to send outSOAP 1.2
compliant messages to aJAX-WS
webservice endpoints. -
In the happy path everything works fine but when the end webservice returns a soapfault (in
SOAP 1.2
format) to theSwitchYard
service this results in a SOAP Fault from the same service which looks like this.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
<soap:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>SWITCHYARD035453: Invalid response SOAPMessage construction. The associated SwitchYard Exchange is in a FAULT state, but the SOAPMessage is not a Fault message. The MessageComposer implementation in use ("org.switchyard.component.soap.composer.SOAPMessageComposer") must generate the SOAPMessage instance properly as a Fault message.</faultstring>
</SOAP-ENV:Fault>
</soap:Body>
</soap:Envelope>
This is how the server.log
reports this issue.
SWITCHYARD035453: Invalid response SOAPMessage construction. The associated SwitchYard Exchange is in a FAULT state, but the SOAPMessage is not a Fault message. The MessageComposer implementation in use ("org.switchyard.component.soap.composer.SOAPMessageComposer") must generate the SOAPMessage instance properly as a Fault message
- How to resolve this kind of issue?
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.