camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-709) CXF - Easier use for end-user to retreive POJO data
Date Sun, 13 Jul 2008 12:45:01 GMT


Claus Ibsen commented on CAMEL-709:

Willem, with the patch its possible for me to have this route.
InputReportIncident  and OutputReportIncident are generate by wsdl2java (contract first)

public class ReportIncidentRouteBuilder extends RouteBuilder {

    private static OutputReportIncident OK = new OutputReportIncident();

    public void configure() {




> CXF - Easier use for end-user to retreive POJO data
> ---------------------------------------------------
>                 Key: CAMEL-709
>                 URL:
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.0
>         Attachments: camel_709.patch
> I am working on a web app example that uses CXF to expose a webservice.
> During the process I thought that getting my POJO object (InputReportIncident) was a
bit clumsy as I had to do;
> {code}
>                 MessageContentsList list = exchange.getIn().getBody(MessageContentsList.class);
>                 InputReportIncident in = (InputReportIncident) list.get(0);
> {code}
> So I have created a patch that improves the getBody to be more end-user friendly.
> You can now do, as you always do in Camel:
> {code}
>                 InputReportIncident in = exchange.getIn().getBody(InputReportIncident.class);
> {code}
> Just cast it to what you expect and want to work with.
> InputReportIncident is a POJO object generated by the CXF wsdl2java generator.
> *Willem could you take a look?* Maybe I have misunderstood the CXF and there is a easier
way already. But I don't like the need to get the List and then get (0) to get my POJO.
> Sending the response is already supported nicely:
> {code}
>                 // the response
>                 OutputReportIncident out = new OutputReportIncident();
>                 out.setCode("Bye Claus");
>                 exchange.getOut().setBody(out);
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message