camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: How to invoke CXF webservice from processor bean
Date Fri, 20 Jul 2012 03:14:42 GMT
Hi,

I think you didn't specify a right operation name.
Can I have a look at your SEI (Service Endpoint Interface) ?

On Fri Jul 20 09:34:22 2012, jeyaseelan78 wrote:
> Hi,
> I have processor bean using which i would like to invoke an external
> webservice. I need to pass the operation name as well as parameters. If I
> pass the parameter in header then its ignored and if i send it via uri then
> I am getting error as invalid parameter name.
>
> public void process(Exchange exchange) throws Exception {
> 		List<String> params = new ArrayList<String>();
> 		params.add((String)exchange.getIn().getBody());
> 		exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "processClient");
> 		try{		
> 		String reply =
> exchange.getContext().createProducerTemplate().requestBody("cxf:bean:PASLIEndpoint",params,String.class);
	
> 		System.out.println("Reply ---> : "+reply);
> 		exchange.getOut().setBody(reply);
> 		}catch(Exception ex){
> 			ex.printStackTrace();
> 		}
> 		
>
> 	}
> If I use the above code then the operation name is ignored and camel calls
> only the first operation in the webservice.
> If I use
> String reply =
> exchange.getContext().createProducerTemplate().requestBody("cxf:bean:PASLIEndpoint?operationName=processClient",params,String.class);
> then the parameter operationName is not identified and I get an exception.
> can you please tell me how should I be able to use the operation name and
> parameters using processor bean.
>
> Thanks a lot.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-invoke-CXF-webservice-from-processor-bean-tp5716272.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Mime
View raw message