Class DualProtocolSaajSoapMessageFactory
java.lang.Object
swiss.trustbroker.wstrust.service.DualProtocolSaajSoapMessageFactory
- All Implemented Interfaces:
org.springframework.ws.soap.SoapMessageFactory,org.springframework.ws.WebServiceMessageFactory
public class DualProtocolSaajSoapMessageFactory
extends Object
implements org.springframework.ws.soap.SoapMessageFactory
Workaround to support both SOAP 1.1 and 1.2.
This class determines the SOAP version via content-type header and dispatches to a SaajSoapMessageFactory configured for the matching SOAP version.
The SOAP version from the inbound is stored in a thread local for use in the outbound (where we have no information). If no outbound is sent due to an exception, the thread local is not cleared, but it is always set on the inbound. SOAP 1.2 is used for an outbound without previous inbound.
This class determines the SOAP version via content-type header and dispatches to a SaajSoapMessageFactory configured for the matching SOAP version.
The SOAP version from the inbound is stored in a thread local for use in the outbound (where we have no information). If no outbound is sent due to an exception, the thread local is not cleared, but it is always set on the inbound. SOAP 1.2 is used for an outbound without previous inbound.
-
Constructor Summary
ConstructorsConstructorDescriptionDualProtocolSaajSoapMessageFactory(org.springframework.ws.soap.saaj.SaajSoapMessageFactory messageFactorySoap11, org.springframework.ws.soap.saaj.SaajSoapMessageFactory messageFactorySoap12) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ws.soap.saaj.SaajSoapMessageorg.springframework.ws.soap.saaj.SaajSoapMessagecreateWebServiceMessage(InputStream inputStream) voidsetSoapVersion(org.springframework.ws.soap.SoapVersion version) toString()
-
Constructor Details
-
DualProtocolSaajSoapMessageFactory
public DualProtocolSaajSoapMessageFactory(@Qualifier("wsTrustSoapClient11") org.springframework.ws.soap.saaj.SaajSoapMessageFactory messageFactorySoap11, @Qualifier("wsTrustSoapClient12") org.springframework.ws.soap.saaj.SaajSoapMessageFactory messageFactorySoap12)
-
-
Method Details
-
setSoapVersion
public void setSoapVersion(org.springframework.ws.soap.SoapVersion version) - Specified by:
setSoapVersionin interfaceorg.springframework.ws.soap.SoapMessageFactory
-
createWebServiceMessage
public org.springframework.ws.soap.saaj.SaajSoapMessage createWebServiceMessage()- Specified by:
createWebServiceMessagein interfaceorg.springframework.ws.soap.SoapMessageFactory- Specified by:
createWebServiceMessagein interfaceorg.springframework.ws.WebServiceMessageFactory
-
createWebServiceMessage
public org.springframework.ws.soap.saaj.SaajSoapMessage createWebServiceMessage(InputStream inputStream) throws IOException - Specified by:
createWebServiceMessagein interfaceorg.springframework.ws.soap.SoapMessageFactory- Specified by:
createWebServiceMessagein interfaceorg.springframework.ws.WebServiceMessageFactory- Throws:
IOException
-
toString
-