You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Adrian Khalili <ak...@pdxinc.com> on 2016/08/10 15:17:49 UTC

Marshal().Jib

Hi Camel users forum,

I am relatively new to Camel. I have couple of questions regarding Jibx. I am trying to marshal an object to Jibx and send it to a webservices endpoint. Please see the code snippet below:

from("what should this be?").marshal().jibx(jibxMock).to("WebsericesEndPoint");

My questions are:


1.       Since this is really not a route and I am only trying to marshal my webservices XML what should go into the "from" part of this route?

2.       We use our own Jibx binding. When marshalling how do I specify the binding file and Java object to use for marshalling the message?


Thank you in advance,

Adrian




This e-mail and its contents (to include attachments) are the property of National Health Systems, Inc., its subsidiaries and affiliates, including but not limited to Rx.com Community Healthcare Network, Inc. and its subsidiaries, and may contain confidential and proprietary or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that any unauthorized disclosure, copying, or distribution of this e-mail or of its attachments, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, please immediately notify the sender by telephone at 800-433-5719 or return e-mail and permanently delete the original e-mail.

Re: Marshal().Jib

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You do not have to use Camel route for everything. If you have some
java code that does the jibx marshalling and also code to call the
webservice, then that is fine.

You can put all that in a bean method, that you can call from Camel if
you eventually have Camel routes.

However in your "from" you can use the direct endpoint and then from
where you want to call this route, send a message to this direct
endpoint using a producer template

http://camel.apache.org/direct
http://camel.apache.org/walk-through-an-example.html



On Wed, Aug 10, 2016 at 5:17 PM, Adrian Khalili <ak...@pdxinc.com> wrote:
> Hi Camel users forum,
>
> I am relatively new to Camel. I have couple of questions regarding Jibx. I am trying to marshal an object to Jibx and send it to a webservices endpoint. Please see the code snippet below:
>
> from("what should this be?").marshal().jibx(jibxMock).to("WebsericesEndPoint");
>
> My questions are:
>
>
> 1.       Since this is really not a route and I am only trying to marshal my webservices XML what should go into the "from" part of this route?
>
> 2.       We use our own Jibx binding. When marshalling how do I specify the binding file and Java object to use for marshalling the message?
>
>
> Thank you in advance,
>
> Adrian
>
>
>
>
> This e-mail and its contents (to include attachments) are the property of National Health Systems, Inc., its subsidiaries and affiliates, including but not limited to Rx.com Community Healthcare Network, Inc. and its subsidiaries, and may contain confidential and proprietary or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that any unauthorized disclosure, copying, or distribution of this e-mail or of its attachments, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, please immediately notify the sender by telephone at 800-433-5719 or return e-mail and permanently delete the original e-mail.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2