Hi Dan - Thank you so much for the reply. It is working now. Ranvesha.
On Thu, Nov 6, 2014 at 11:30 AM, Daniel Kulp [via CXF] < [email protected]> wrote: > If you enable MTOM for the service, it will always respond with an MTOM > response. > > However, if you know none of the responses need MTOM, then I would not > enable MTOM. CXF will always (even if MTOM is not enabled) process > requests that come in as MTOM. The MTOM enabled stuff is just for whether > it will generate MTOM messages or not. Thus, by disabling it, you can get > the requests fine, but not generate MTOM responses. > > Dan > > > > > On Nov 6, 2014, at 11:31 AM, ranvesha20 <[hidden email] > <http://user/SendEmail.jtp?type=node&node=5750800&i=0>> wrote: > > > > 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. > > -- > Daniel Kulp > [hidden email] <http://user/SendEmail.jtp?type=node&node=5750800&i=1> - > http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://cxf.547215.n5.nabble.com/How-to-set-Content-type-for-the-response-in-CXF-Endpoint-tp5750792p5750800.html > To unsubscribe from How to set Content-type for the response in CXF > Endpoint, click here > <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5750792&code=cmFudmVzaGEuYnVybGFAZ21haWwuY29tfDU3NTA3OTJ8OTgyMjUzNQ==> > . > NAML > <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://cxf.547215.n5.nabble.com/How-to-set-Content-type-for-the-response-in-CXF-Endpoint-tp5750792p5750813.html Sent from the cxf-user mailing list archive at Nabble.com.
