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
*
* @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.
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-set-Content-type-for-the-response-in-CXF-Endpoint-tp5750792.html
Sent from the cxf-user mailing list archive at Nabble.com.