How to map a SOAP Fault 1.2 message to SOAP Fault 1.1 in SwitchYard ?
Issue
-
Imagine that in a
SwitchYardapplication there is aService Componentnamed which exposes aSOAP 1.1compliant interface in form of aSOAP Bindingto acceptSOAP 1.1messages and the same service has aComposite Referencethat exposes aSOAP 1.2compliant interface to send outSOAP 1.2compliant messages to aJAX-WSwebservice endpoints. -
In the happy path everything works fine but when the end webservice returns a soapfault (in
SOAP 1.2format) to theSwitchYardservice 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
