You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by chandraprabha <ch...@gmail.com> on 2011/08/04 20:52:31 UTC
camel-example-cxf-proxy need help
Hi All,
Please help .
I am using the camel-example-cxf-proxy profile with fuse camel .
I deployed it as it on servicemix 4 and it works fine . Now i want to modify
it to call my external webservice.
Changes i did are :
1. Modified camel-config.xml to realwebservice url with my external
webservice url
2.Modified the wsdl
3.Modified RealWebServiceBean with my real service url
4.Modiffied this ReportIncidentEndpointService to implement the my SEI
when i run i get
Starting real webservice
Fatal Error :-1:-1: Premature end of file.
--
View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4667517.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-example-cxf-proxy need help
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You posted here as well
http://fusesource.com/forums/thread.jspa?threadID=3214&tstart=0
Its generally best practice to not double posts, and if you do, refer
to where you have posted also.
On Fri, Aug 5, 2011 at 6:06 AM, chandraprabha <ch...@gmail.com> wrote:
> Thanks
>
> I am able to call external webservice.
>
> Now i want to call different webservice based on different operation .I have
> modified the route as below ..but not working :(
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>
> <route>
>
> <from uri="cxf:bean:reportIncident?dataFormat=Message" />
> <choice>
> <when>
> <simple>${in.header.operationName}=="GetSupportTopics"</simple>
> <to
>
> uri="http://stage-esb01.myCom.net:8092/Service/CommunicationWs/?throwExceptionOnFailure=false"
> />
> </when>
> <otherwise>
> <to
>
> uri="http://stage-esb01.myCom.net:8092/Service/MemberWs/?throwExceptionOnFailure=false"
> />
> </otherwise>
> </choice>
>
> <to uri="bean:enrichBean" />
> <to uri="log:input" />
>
> <to uri="log:output" />
> </route>
> </camelContext>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4668643.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, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: camel-example-cxf-proxy need help
Posted by chandraprabha <ch...@gmail.com>.
Thanks. Can i do using dataformat as payload.
i went to expose a wsdl with some operation and based on operation it will
call external webservices.
--
View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4669898.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-example-cxf-proxy need help
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
You are using the Message data format which means there is no
interceptor will take a look at the under layer message. You can not do
any routing which is based on the operation name.
I suggest you use POJO data format and cxf producer to send the request.
BTW, it is important for you to take a look at the camel-cxf wiki page[1]
[1]http://camel.apache.org/cxf.html
On 8/5/11 12:06 PM, chandraprabha wrote:
> Thanks
>
> I am able to call external webservice.
>
> Now i want to call different webservice based on different operation .I have
> modified the route as below ..but not working :(
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>
> <route>
>
> <from uri="cxf:bean:reportIncident?dataFormat=Message" />
> <choice>
> <when>
> <simple>${in.header.operationName}=="GetSupportTopics"</simple>
> <to
>
> uri="http://stage-esb01.myCom.net:8092/Service/CommunicationWs/?throwExceptionOnFailure=false"
> />
> </when>
> <otherwise>
> <to
>
> uri="http://stage-esb01.myCom.net:8092/Service/MemberWs/?throwExceptionOnFailure=false"
> />
> </otherwise>
> </choice>
>
> <to uri="bean:enrichBean" />
> <to uri="log:input" />
>
> <to uri="log:output" />
> </route>
> </camelContext>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4668643.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: camel-example-cxf-proxy need help
Posted by chandraprabha <ch...@gmail.com>.
Thanks
I am able to call external webservice.
Now i want to call different webservice based on different operation .I have
modified the route as below ..but not working :(
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:reportIncident?dataFormat=Message" />
<choice>
<when>
<simple>${in.header.operationName}=="GetSupportTopics"</simple>
<to
uri="http://stage-esb01.myCom.net:8092/Service/CommunicationWs/?throwExceptionOnFailure=false"
/>
</when>
<otherwise>
<to
uri="http://stage-esb01.myCom.net:8092/Service/MemberWs/?throwExceptionOnFailure=false"
/>
</otherwise>
</choice>
<to uri="bean:enrichBean" />
<to uri="log:input" />
<to uri="log:output" />
</route>
</camelContext>
--
View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4668643.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-example-cxf-proxy need help
Posted by Willem Jiang <wi...@gmail.com>.
Do you need to implement the real webservices server ?
If not, you can skip the RealWebServiceBean part and just change the
route to be
<route>
<!-- cxf consumer using MESSAGE format -->
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
<!-- send proxied request to real web service -->
<to
uri="http://REAL_SERVICE_ADDRESS/real-webservice?throwExceptionOnFailure=false"/>
<!-- log answer from real web service -->
<to uri="log:output"/>
</route>
On Fri Aug 5 03:46:34 2011, chandraprabha wrote:
> Thanks for reply.
>
> One question in RealWebServiceBean class
>
>
> i have the url set to http://stage-esb01.test.net:8092/Service/MemberWs/
>
> So in example they pass the service object which is the implementation of
> SEI but in my case i just want the request to be forwarded to real service
> and get the response back.
> endpoint = Endpoint.publish(url, service);
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4667708.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: camel-example-cxf-proxy need help
Posted by chandraprabha <ch...@gmail.com>.
Thanks for reply.
One question in RealWebServiceBean class
i have the url set to http://stage-esb01.test.net:8092/Service/MemberWs/
So in example they pass the service object which is the implementation of
SEI but in my case i just want the request to be forwarded to real service
and get the response back.
endpoint = Endpoint.publish(url, service);
--
View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4667708.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-example-cxf-proxy need help
Posted by Jon Anstey <ja...@gmail.com>.
Some more context from the logs would help like maybe the full stack trace
so we can see which bit is failing.
Cheers,
Jon
On Thu, Aug 4, 2011 at 4:22 PM, chandraprabha <ch...@gmail.com>wrote:
> Hi All,
>
> Please help .
>
> I am using the camel-example-cxf-proxy profile with fuse camel .
>
> I deployed it as it on servicemix 4 and it works fine . Now i want to
> modify
> it to call my external webservice.
>
> Changes i did are :
> 1. Modified camel-config.xml to realwebservice url with my external
> webservice url
> 2.Modified the wsdl
> 3.Modified RealWebServiceBean with my real service url
> 4.Modiffied this ReportIncidentEndpointService to implement the my SEI
>
> when i run i get
> Starting real webservice
> Fatal Error :-1:-1: Premature end of file.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4667517.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Cheers,
Jon
---------------
FuseSource
Email: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen