camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amitmahesh <>
Subject Unable to route Rest webservice Json response to SOAP service via camel route
Date Wed, 02 Mar 2016 15:56:36 GMT
We are calling a thirdparty SOAP service (without WSDL) from a REST service.
We created a intermediate proxy cxf webservice to invoke the final third
party webservice. The JSON request is not getting converted to SOAP
parameters correctly and we getting Exception that "Expecting 3 parameters
but getting 1 , Pls check your data format" .  When we change the SOAP
interface to accept 1 parameter, and remove @Webparam annotation from
interface then it is working fine. How do we correctly map the JSON string
to SOAP request parameters , such that all 3 parameters from JSON string are
correctly mapped. 

*Rest Server config below :
	/<cxf:rsServer id="GetCustomerService" address="/getCustomer">
			<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />

			<entry key="dataFormat" value="POJO" />

*Proxy webservice to third party service :
/	<cxf:cxfEndpoint id="getOSBCustomerClient"  
      <entry key="dataFormat" value="POJO"/>

*Camel route :
/<route id="CustomerRoute">
			<from uri="cxfrs://bean://GetCustomerService" />
			<setExchangePattern pattern="InOut" />
			 <camel:bean ref="getMortgageAccountResquestProcessor"
				method="process" />
			<setHeader headerName="operationName">
			<to uri="cxf:bean:getOSBCustomerClient"/>

JSON message as seen from Request Processor before invoking the proxy :
Exchange[Message: {"customerId":"0000104","systemId":"POR","brandId":"KRS"}]

Web param definition of SOAP service proxy :
	@WebMethod public Customer
brandId,@WebParam(name="customerId")String customerId) throws
JsonParseException, JsonMappingException, IOException ;

Pls suggest how to map JSON elements to each web params??

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message