Hi - I am using CXF endpoint and enabled MTOM for that. It is working as expected for request (content-type is application/xop+xml, which is expected) . But for the response also I am getting content-type as application/xop+xml .Is there a way to set content-type as application/soap+xml for the response?
Below are the details.
CXF service in spring
<cxf:cxfEndpoint id="webserviceEndpoint" address="/bulkupload"
serviceClass="com.demo.DemoService">
<cxf:inInterceptors>
<ref bean="authenticationInterceptor"/>
</cxf:inInterceptors>
<cxf:properties>
<entry key="mtom-enabled" value="true" />
</cxf:properties>
</cxf:cxfEndpoint>
And I defined interface like below
@MTOM(enabled = true, threshold = 0)
@BindingType(value = SOAPBinding.SOAP12HTTP_MTOM_BINDING)
@WebService(name = "DemoService")
public interface DemoService{
/**
* This method exposes a web service end point to upload a zip file at a url
* http://<<hostname>>:8181/bulkupload<http://%3c%3chostname%3e%3e:8181/bulkupload>
* @param ClinicalDocumentRequest
* Expects an Object of ClinicalDocumentRequest type
* {@link ClinicalDocumentRequest }
* @return Returns an Object of ClinicalDocumentResponse type
* {@link ClinicalDocumentResponse }
*/
@WebMethod
@WebResult(name = "ClinicalDocumentResponse")
@RequestWrapper(localName = "BulkUploadRequest", className = "com.demo.DemoServiceRequest")
@ResponseWrapper(localName = "BulkUploadResponse", className = "com.demo.DemoServiceResponse")
ClinicalDocumentResponse uploadZipFile(
@WebParam(name = "ClinicalDocumentRequest") ClinicalDocumentRequest ClinicalDocumentRequest);
Thanks,
Ranvesha.
Below are the details.
CXF service in spring
<cxf:cxfEndpoint id="webserviceEndpoint" address="/bulkupload"
serviceClass="com.demo.DemoService">
<cxf:inInterceptors>
<ref bean="authenticationInterceptor"/>
</cxf:inInterceptors>
<cxf:properties>
<entry key="mtom-enabled" value="true" />
</cxf:properties>
</cxf:cxfEndpoint>
And I defined interface like below
@MTOM(enabled = true, threshold = 0)
@BindingType(value = SOAPBinding.SOAP12HTTP_MTOM_BINDING)
@WebService(name = "DemoService")
public interface DemoService{
/**
* This method exposes a web service end point to upload a zip file at a url
* http://<<hostname>>:8181/bulkupload<http://%3c%3chostname%3e%3e:8181/bulkupload>
* @param ClinicalDocumentRequest
* Expects an Object of ClinicalDocumentRequest type
* {@link ClinicalDocumentRequest }
* @return Returns an Object of ClinicalDocumentResponse type
* {@link ClinicalDocumentResponse }
*/
@WebMethod
@WebResult(name = "ClinicalDocumentResponse")
@RequestWrapper(localName = "BulkUploadRequest", className = "com.demo.DemoServiceRequest")
@ResponseWrapper(localName = "BulkUploadResponse", className = "com.demo.DemoServiceResponse")
ClinicalDocumentResponse uploadZipFile(
@WebParam(name = "ClinicalDocumentRequest") ClinicalDocumentRequest ClinicalDocumentRequest);
Thanks,
Ranvesha.