You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mferris <mf...@skire.com> on 2011/01/08 02:46:00 UTC
General Camel WS client concern
Hello everyone,
I recently came across Camel in my attempt to identify an integration
framework for use by my employer. I'm hoping Camel can help me more quickly
develop standalone WS clients that integrate easily with our Web Service.
For example, csv (or xls) files may contain data that is 'camel-routed and
enriched' and ultimately a camel producer makes a call to our remote web
service. The beauty of Camel for me is its flexibility in obtaining and
tweaking data by use of various Camel components; and this includes error
handling!
At the moment, I'm struggling with concern as to whether Camel is the right
framework for my needs. I wonder simply because of the difficulties I'm
experiencing and my inability to identify examples that I can cascade in a
route. I have the recent 'Camel in Action' book and would like to use the
CXF component. I'm looking for standalone Java applications but the Spring
use in the examples (another nice feature) appear to require a container.
Before I post more details as to my attempts, I wanted to confirm whether
I'm really marching down a possible solution and, if so, ask if one can
steer me towards good examples or tutorials relative to my goal.
Some more info: I'm new to CXF and still clumsy with Spring. I have a
'document-literal' WSDL and generated Java source without incident. I'm
happy to answer more questions; please forgive any newbie mistakes.
Looking forward to any assistance,
Mark
--
View this message in context: http://camel.465427.n5.nabble.com/General-Camel-WS-client-concern-tp3332742p3332742.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: General Camel WS client concern
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
I just had a chance to check your project.
As there are some complex WS interactions in your WS client, I suggest
you to wrap the client into a customer bean and camel can call the
bean[1] method in the route.
[1]http://camel.apache.org/bean.html
On 2/3/11 8:06 AM, mferris wrote:
>
> Willem (or other gurus),
>
> Can you show me an example with the attached Eclipse project using a Camel
> route?
> I want to call an external web service (I think this WS will suffice for my
> understanding) and I'm struggling to make my endpoint a camel producer for
> moving significant data into and out of my remote environment (via its web
> service).
>
> My voluminous thank you in advance,
>
> Mark
>
> http://camel.465427.n5.nabble.com/file/n3368666/weather-client.zip
> weather-client.zip
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: General Camel WS client concern
Posted by mferris <mf...@skire.com>.
Willem (or other gurus),
Can you show me an example with the attached Eclipse project using a Camel
route?
I want to call an external web service (I think this WS will suffice for my
understanding) and I'm struggling to make my endpoint a camel producer for
moving significant data into and out of my remote environment (via its web
service).
My voluminous thank you in advance,
Mark
http://camel.465427.n5.nabble.com/file/n3368666/weather-client.zip
weather-client.zip
--
View this message in context: http://camel.465427.n5.nabble.com/General-Camel-WS-client-concern-tp3332742p3368666.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: General Camel WS client concern
Posted by mferris <mf...@skire.com>.
Willem,
Thank you for your coaching. I will post my failed example using this
com.cdyne.ws.weatherws WS later.
There appear to be 4 ports (endpointNames?) to this 'Weather' service (and 3
w/ my corp WS)
<wsdl:service name="Weather">
<wsdl:port name="WeatherSoap" binding="tns:WeatherSoap">
<soap:address location="http://ws.cdyne.com/WeatherWS/Weather.asmx" />
</wsdl:port>
<wsdl:port name="WeatherSoap12" binding="tns:WeatherSoap12">
<soap12:address location="http://ws.cdyne.com/WeatherWS/Weather.asmx"
/>
</wsdl:port>
<wsdl:port name="WeatherHttpGet" binding="tns:WeatherHttpGet">
<http:address location="http://ws.cdyne.com/WeatherWS/Weather.asmx" />
</wsdl:port>
<wsdl:port name="WeatherHttpPost" binding="tns:WeatherHttpPost">
<http:address location="http://ws.cdyne.com/WeatherWS/Weather.asmx" />
</wsdl:port>
</wsdl:service>
so I must use endpointName and serviceName according to CIA book.
Hope to post some code much later today.
Mark
--
View this message in context: http://camel.465427.n5.nabble.com/General-Camel-WS-client-concern-tp3332742p3337166.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: General Camel WS client concern
Posted by Willem Jiang <wi...@gmail.com>.
On 1/11/11 10:36 AM, mferris wrote:
>
> Thank you all for squashing my overall fear. I move forward with more
> confidence.
>
> I believe I found an example that may be faster than my specific upload and
> iteration (less XML) ...
> If I could ask, can one look at
> http://logicsector.wordpress.com/2008/10/19/how-to-create-a-wsdl-first-soap-client-in-java-with-cxf-and-maven/
> (I wasn't able to download the zipped source but there's only 3 files)
>
> I'm trying to create a camel route now (cxfEndpoint bean) but can't seem to
> avoid a 'serviceClass' requirement at the moment (must have endpointName and
> serviceName)
>
If you try out the camel 2.6-SNAPSHOT and there is only one service and
port in the wsdl, you don't need to specify the endpointName and
serviceName for the cxfEndpoint. camel-cxf will take care of it :)
> Would it be too much trouble to see a Camel example using CXF with this
> weather WS? (So many examples with local service rather than remote;
> perhaps I can "contribute" to this in the future)
>
Not worry, if you find something wrong, please just shoot. The community
will help you.
> Thanks in advance,
>
> Mark
>
>
>
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: General Camel WS client concern
Posted by mferris <mf...@skire.com>.
Thank you all for squashing my overall fear. I move forward with more
confidence.
I believe I found an example that may be faster than my specific upload and
iteration (less XML) ...
If I could ask, can one look at
http://logicsector.wordpress.com/2008/10/19/how-to-create-a-wsdl-first-soap-client-in-java-with-cxf-and-maven/
(I wasn't able to download the zipped source but there's only 3 files)
I'm trying to create a camel route now (cxfEndpoint bean) but can't seem to
avoid a 'serviceClass' requirement at the moment (must have endpointName and
serviceName)
Would it be too much trouble to see a Camel example using CXF with this
weather WS? (So many examples with local service rather than remote;
perhaps I can "contribute" to this in the future)
Thanks in advance,
Mark
--
View this message in context: http://camel.465427.n5.nabble.com/General-Camel-WS-client-concern-tp3332742p3335851.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: General Camel WS client concern
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
Camel can run within the container or not. It really dependents on what
you want.
BTW, you can configure the camel-cxf endpoint without touching the
Spring configuration file.
Willem
On 1/8/11 9:46 AM, mferris wrote:
>
> Hello everyone,
>
> I recently came across Camel in my attempt to identify an integration
> framework for use by my employer. I'm hoping Camel can help me more quickly
> develop standalone WS clients that integrate easily with our Web Service.
>
> For example, csv (or xls) files may contain data that is 'camel-routed and
> enriched' and ultimately a camel producer makes a call to our remote web
> service. The beauty of Camel for me is its flexibility in obtaining and
> tweaking data by use of various Camel components; and this includes error
> handling!
>
> At the moment, I'm struggling with concern as to whether Camel is the right
> framework for my needs. I wonder simply because of the difficulties I'm
> experiencing and my inability to identify examples that I can cascade in a
> route. I have the recent 'Camel in Action' book and would like to use the
> CXF component. I'm looking for standalone Java applications but the Spring
> use in the examples (another nice feature) appear to require a container.
>
> Before I post more details as to my attempts, I wanted to confirm whether
> I'm really marching down a possible solution and, if so, ask if one can
> steer me towards good examples or tutorials relative to my goal.
>
> Some more info: I'm new to CXF and still clumsy with Spring. I have a
> 'document-literal' WSDL and generated Java source without incident. I'm
> happy to answer more questions; please forgive any newbie mistakes.
>
> Looking forward to any assistance,
>
> Mark
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: General Camel WS client concern
Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jan 8, 2011 at 2:46 AM, mferris <mf...@skire.com> wrote:
>
> Hello everyone,
>
> I recently came across Camel in my attempt to identify an integration
> framework for use by my employer. I'm hoping Camel can help me more quickly
> develop standalone WS clients that integrate easily with our Web Service.
>
Welcome to the community. Yeah that is definitely possible.
> For example, csv (or xls) files may contain data that is 'camel-routed and
> enriched' and ultimately a camel producer makes a call to our remote web
> service. The beauty of Camel for me is its flexibility in obtaining and
> tweaking data by use of various Camel components; and this includes error
> handling!
>
> At the moment, I'm struggling with concern as to whether Camel is the right
> framework for my needs. I wonder simply because of the difficulties I'm
> experiencing and my inability to identify examples that I can cascade in a
> route. I have the recent 'Camel in Action' book and would like to use the
> CXF component. I'm looking for standalone Java applications but the Spring
> use in the examples (another nice feature) appear to require a container.
>
Camel is container agnostic so you can run it standalone, war, j2ee,
osgi, jbi, cloud or whatever.
See chapter 13 in the book.
And in camel-spring there is a Main class which you can use to run
Camel standalone and easily let it bootup a Spring XML file.
There is also a Main class in camel-core, but it need a bit more work
to make it easier to use OOTB. There is a ticket for that:
https://issues.apache.org/jira/browse/CAMEL-3339
But I suggest to read chapter 13 in the book which explains how Camel
startup and covers some of the deployment options you have.
> Before I post more details as to my attempts, I wanted to confirm whether
> I'm really marching down a possible solution and, if so, ask if one can
> steer me towards good examples or tutorials relative to my goal.
>
> Some more info: I'm new to CXF and still clumsy with Spring. I have a
> 'document-literal' WSDL and generated Java source without incident. I'm
> happy to answer more questions; please forgive any newbie mistakes.
>
> Looking forward to any assistance,
>
> Mark
> --
> View this message in context: http://camel.465427.n5.nabble.com/General-Camel-WS-client-concern-tp3332742p3332742.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: General Camel WS client concern
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Mark,
what you want to do should be very well possible with the combination of
Camel and Spring.
You can use Camel standalone with spring and cxf. For your case you can
define a cxf client and a camelcontext in spring. The easiest way to
start is probably the wsdl first example from the cxf distro. There in
the spring context of the client you add the camel context and a route.
The route can be like this:
<from uri="file:..."/>
<to uri="bean:id of another spring bean"/>
Then in the spring bean you can define your logic to parse the file. You
also can inject the webservide proxy into thiss bean and call your
service. The class should have one public method that takes a String or
a InputStream. Then camel will automatically call this method with the
content of the file. (See camel bean component)
The wsdl_first example already contains a starter class.
If you get into trouble you can always post your current project here.
Best regards
Christian
Am 08.01.2011 02:46, schrieb mferris:
> Hello everyone,
>
> I recently came across Camel in my attempt to identify an integration
> framework for use by my employer. I'm hoping Camel can help me more quickly
> develop standalone WS clients that integrate easily with our Web Service.
>
> For example, csv (or xls) files may contain data that is 'camel-routed and
> enriched' and ultimately a camel producer makes a call to our remote web
> service. The beauty of Camel for me is its flexibility in obtaining and
> tweaking data by use of various Camel components; and this includes error
> handling!
>
> At the moment, I'm struggling with concern as to whether Camel is the right
> framework for my needs. I wonder simply because of the difficulties I'm
> experiencing and my inability to identify examples that I can cascade in a
> route. I have the recent 'Camel in Action' book and would like to use the
> CXF component. I'm looking for standalone Java applications but the Spring
> use in the examples (another nice feature) appear to require a container.
>
> Before I post more details as to my attempts, I wanted to confirm whether
> I'm really marching down a possible solution and, if so, ask if one can
> steer me towards good examples or tutorials relative to my goal.
>
> Some more info: I'm new to CXF and still clumsy with Spring. I have a
> 'document-literal' WSDL and generated Java source without incident. I'm
> happy to answer more questions; please forgive any newbie mistakes.
>
> Looking forward to any assistance,
>
> Mark
--
----
http://www.liquid-reality.de