Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 15647 invoked from network); 12 Jul 2008 14:36:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2008 14:36:21 -0000 Received: (qmail 59685 invoked by uid 500); 12 Jul 2008 14:36:21 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 59666 invoked by uid 500); 12 Jul 2008 14:36:21 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 59625 invoked by uid 99); 12 Jul 2008 14:36:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jul 2008 07:36:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jul 2008 14:35:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 514DC234C16B for ; Sat, 12 Jul 2008 07:36:00 -0700 (PDT) Message-ID: <1265846811.1215873360318.JavaMail.jira@brutus> Date: Sat, 12 Jul 2008 07:36:00 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-709) CXF - Easier use for end-user to retreive POJO data In-Reply-To: <1666488375.1215873120289.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-709: ------------------------------ Attachment: camel_709.patch The patch > CXF - Easier use for end-user to retreive POJO data > --------------------------------------------------- > > Key: CAMEL-709 > URL: https://issues.apache.org/activemq/browse/CAMEL-709 > Project: Apache Camel > Issue Type: Improvement > Components: camel-cxf > Affects Versions: 1.4.0 > Reporter: Claus Ibsen > 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.