You can use Spring to configure the CXF endpoint like this

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:cxf="http://camel.apache.org/schema/cxf";
       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/cxf 
http://camel.apache.org/schema/cxf/camel-cxf.xsd
       http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
    ">
 
   <http-conf:conduit name="*.http-conduit">
                <http-conf:client ContentType="application/soap+xml"/>
   </http-conf:conduit>

   <cxf:cxfEndpoint id="springEndpoint" 
address="http://localhost:9000/CxfTimeoutTest/SoapContext/SoapPort";
                serviceClass="org.apache.hello_world_soap_http.Greeter”/>


</beans>

The camel route can be 
from(“dirt:start”).to(“cxf:bean:sprintEndpoint”)

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 11:36:36 AM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi Willem,
>
>If i use the client program example from camel cxf examples and set the
>content type in HTTPClientPolicy,
>but could you please tell me how to set the same in Exchange type when
>calling the webservice by creating a CXFendpoint
>
>
>*CLient Program:-*
>
>JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>.
>.
>.
>Client client = ClientProxy.getClient(port);
>HTTPConduit http = (HTTPConduit) client.getConduit();
>HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>* httpClientPolicy.setContentType("application/soap+xml");*
>http.setClient(httpClientPolicy);
>....
>...
>..
>client.retrieve(arg1,arg2,arg3);
>
>
>
>*Cxf Endpoint:-*
>
>from("direct:test").process(new Processor(){
>public void processor(Exchange exchange)
>{
>Object[] objectarray=new Object[3];
>.
>.
>.
>exchange.getOut().setBody(objarry);
>}
>}).to("cxf://http://10.103.91.55:5555/FinEdge-General/xrmServices/2011/Organization.svc?serviceClass=com.hcl.flsl.integration.msdn.crmwcf.IOrganizationService&defaultOperationName=Retrieve";)
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Passing-multiple-parameters-to-CXF-endpoint-tp5744345p5744416.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to