-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Milestone
Description
Govinda Reddy opened SWS-855 and commented
Spring WS isnot generating raw message as below mentioned
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action="urn:ihe:iti:2007:RetrieveDocumentSet"
Content-Length: 1566
Host: 192.168.6.158:9080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<!--The following header applies for a Synchronous Web Services Exchange Request
Please note that a soap message can only have one header section. -->
<s:Header>
Any client accessing this web service expects Content-Type as application/xop+xml.
Due to this content type mismatch client is not receiving the response ant throwing error as below mentioned
System.ServiceModel.ProtocolException: The content type application/xop+xml;type="application/soap+xml" of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.”
XSD
<xs:element name="DocumentContent" type="xs:base64Binary"/>
Spring config
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
<description>A message factory to support SOAP 1.2</description>
<!-- <constructor-arg ref="soapMessageFactory" /> -->
<property name="soapVersion">
<util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12" />
</property>
</bean>
<bean id="messageReceiver"
class="org.springframework.ws.soap.server.SoapMessageDispatcher">
<property name="endpointAdapters">
<bean
class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
<property name="marshaller" ref="marshaller" />
<property name="unmarshaller" ref="marshaller" />
</bean>
</property>
<property name="endpointMappings" ref="endpointMapping" />
</bean>
<bean id="endpointMapping"
class="org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping">
<!-- <property name="messageSenders">
<bean
class="org.springframework.ws.transport.http.HttpUrlConnectionMessageSender" />
</property> -->
<property name="postInterceptors">
<list>
<ref bean="soapEnvelopePayloadInterceptorRef" />
</list>
</property>
</bean>
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="contextPaths">
<list>
<value>package1</value>
<value> package2</value>
</list>
</property>
<property name="mtomEnabled" value="true" />
Please let me know how to fix this issue.
Affects: 2.1.3