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: Need Help In Camel CXF
Date Tue, 01 Jun 2010 07:17:14 GMT
You don't need to put your response into a ArrayList, camel-cxf 
converter will take care of it.

BTW, which version of Camel are you using?

Willem


Carlo Camerino wrote:
> Hi,
> 
> I seem to be getting this problem in which I'm getting a blank reply comin
> gfrom the cxf web service.
> i use cxf:bean and cxf://address component
> 
> What can i be doing wrong?
> thanks
> carlo
> 
> Client Configuration
> 
> @Override
>     public void configure() throws Exception {
>         from("direct:carlo").inOut("cxf://
> http://localhost:9090/override/override?serviceClass=com.ccti.luminous.override.OverrideServer").process(new
> Processor() {
> 
>             @Override
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 LOG.info("Class Is: " +
> exchange.getIn().getBody().getClass());
> // at this point message content list is empty
>                 List messageContentsList = (List)exchange.getIn().getBody();
>                 System.out.println(exchange.getOut());
> 
>             }
>         });
> 
>     }
> 
> Server Configuration
> 
> @Override
>     public void configure() throws Exception {
>         from("cxf:bean:overrideServerEndpoint").process(new Processor() {
>             @Override
>             public void process(Exchange exchange) throws Exception {
>                 System.out.println("Trial.");
>                 System.out.println(exchange.getIn());
>                 System.out.println(exchange.getIn().getClass());
>                 System.out.println(exchange.getIn().getBody().getClass());
>                 List requestList = (List) exchange.getIn().getBody();
>                 List messageContentsList = new ArrayList();
> 
> messageContentsList.add(overrideServer.getActiveUsers((OverrideRequestor)requestList.get(0),
> (OverrideTransaction) requestList.get(1)));
> // using this method to send reply
>                 exchange.getOut().setBody(messageContentsList);
>             }
>         });
> 
>     }
> 


Mime
View raw message