camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjay Bhattacharya <san...@gmail.com>
Subject Re: call a cxf service from camel that accepts multiple paramter
Date Mon, 13 Jan 2014 14:50:29 GMT
In CreateAddressRequestProcesor::process() you can try to use a
MessageContentsList to add parameters that you'll pass to createAddres
service like this:

MessageContentsList msgContentsList =
exchange.getOut().getBody(MessageContentsList.class);
msgContentsList.add(addressInfo);
msgContentsList.add(addressDomain);
exchange.getOut().setBody(msgContentsList);

Thanks,
Sanjay


On Mon, Jan 13, 2014 at 6:53 PM, reena upadhyay <reena2485@outlook.com>wrote:

> I want to call a cxf service from camel that accepts multiple paramter:
> My cxf service which I want to invoke through camel after calling camel
> processor looks like:
> @WebMethodpublic Address  createAddress(Address addressInfo ,String
> adressDomain)
>
> I want to invoke createAddress service through camel after calling camel
> processor:     <route>                 <from
> uri="quoteCamelEntryServicePoint" />                      <process
> ref="createNotebookRequestProcesor"/>                  <to
> uri="bean:notebookClient?method=createNoteBook"/>
>                         <process ref="createAddressRequestProcesor"/>
>                     <to uri="bean:locationClient?method=createAddress"/>
> </route>
>
> public class CreateAddressRequestProcesor implements Processor {
>         @Override       public void process(Exchange exchange) throws
> Exception {
>                   Address addressInfo  = (Address )
> exchange.getProperty("addressInfo ");                   String adressDomain
> = "test 123";
>                    exchange.getIn().setBody(addressInfo );      }
> }
> createAddress service accept two paramter i.e. addressInfo   and
> adressDomain , I am facing issue in passing the two parameter in soap
> exchange.If the web service accept a single parameter addressInfo  then
>  doing exchange.getIn().setBody(addressInfo ) in
> CreateAddressRequestProcesor works fine. Now I want to pass two parameter
> through camel processor in exchange.
> Any idea how to do it?
> Thanks in advance.
>
>
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message