You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nmsrinm <nm...@gmail.com> on 2012/12/04 13:36:59 UTC

Redirecting a soap request to external webservice

Hi

We need to redirect the SOAP request body received from the client side to
the external web service(External server). Can anyone suggest which camel
component to be used and is it possible to implement in JAVA DSL?
Suggest/Mention some suitable example for the same

Here i attached a sample code image which we are implementing.

<http://camel.465427.n5.nabble.com/file/n5723605/Image.jpg> 






--
View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Redirecting a soap request to external webservice

Posted by Willem jiang <wi...@gmail.com>.
Hi

Using the payload should work for you, as camel-cxf is try to understand the request.
I'm not sure how do you configure the ws-security on the camel-cxf endpoint, but it could easy to configure a generic ws-security interceptor[1] if you don't relay on wssecurity-policy[2].

[1]http://cxf.apache.org/docs/ws-security.html
[2]http://cxf.apache.org/docs/ws-securitypolicy.html


-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Tuesday, December 4, 2012 at 10:05 PM, David Karlsen wrote:

> I see that this one refers to a wsdl in the configuration.
> Would it be feasable to build a generic one that do not need to
> configure the wsdl.
> I'd like to build a generic soap router and route based on the
> contents of a soap header.
> I tried using CXF in payload and/or message mode, but it either fails
> because it can't get the service descriptions (wsdl needed) - or it
> fails me because the CXF interceptor chain tries to parse and figure
> out the soap action.
> 
> What I'd like to do is to build a camel ws proxy which handles
> ws-security using the ws-security support in CXF/WSS4j and then route
> it to some backend service which does not utilize wssec - so that I
> can keep all the security handling in the camel/cxf proxy.
> 
> Any pointers for such a use-case?
> 
> 2012/12/4 Willem jiang <willem.jiang@gmail.com (mailto:willem.jiang@gmail.com)>:
> > Hi,
> > 
> > Please take a look at this example[1]
> > [1]http://camel.apache.org/cxf-proxy-example.html
> > 
> > 
> > --
> > Willem Jiang
> > 
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Web: http://www.fusesource.com | http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
> > http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
> > Twitter: willemjiang
> > Weibo: willemjiang
> > 
> > 
> > 
> > 
> > 
> > On Tuesday, December 4, 2012 at 8:36 PM, nmsrinm wrote:
> > 
> > > Hi
> > > 
> > > We need to redirect the SOAP request body received from the client side to
> > > the external web service(External server). Can anyone suggest which camel
> > > component to be used and is it possible to implement in JAVA DSL?
> > > Suggest/Mention some suitable example for the same
> > > 
> > > Here i attached a sample code image which we are implementing.
> > > 
> > > <http://camel.465427.n5.nabble.com/file/n5723605/Image.jpg>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --
> > > View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605.html
> > > Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
> > 
> 
> 
> 
> 
> 
> -- 
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen




Re: Redirecting a soap request to external webservice

Posted by David Karlsen <da...@gmail.com>.
I see that this one refers to a wsdl in the configuration.
Would it be feasable to build a generic one that do not need to
configure the wsdl.
I'd like to build a generic soap router and route based on the
contents of a soap header.
I tried using CXF in payload and/or message mode, but it either fails
because it can't get the service descriptions (wsdl needed) - or it
fails me because the CXF interceptor chain tries to parse and figure
out the soap action.

What I'd like to do is to build a camel ws proxy which handles
ws-security using the ws-security support in CXF/WSS4j and then route
it to some backend service which does not utilize wssec - so that I
can keep all the security handling in the camel/cxf proxy.

Any pointers for such a use-case?

2012/12/4 Willem jiang <wi...@gmail.com>:
> Hi,
>
> Please take a look at this example[1]
> [1]http://camel.apache.org/cxf-proxy-example.html
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
>           http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>
>
>
>
>
> On Tuesday, December 4, 2012 at 8:36 PM, nmsrinm wrote:
>
>> Hi
>>
>> We need to redirect the SOAP request body received from the client side to
>> the external web service(External server). Can anyone suggest which camel
>> component to be used and is it possible to implement in JAVA DSL?
>> Suggest/Mention some suitable example for the same
>>
>> Here i attached a sample code image which we are implementing.
>>
>> <http://camel.465427.n5.nabble.com/file/n5723605/Image.jpg>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605.html
>> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>
>
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Redirecting a soap request to external webservice

Posted by nmsrinm <nm...@gmail.com>.
Hi

We tried by changing the port and it didn't work. So can you please suggest
which parameters to change for calling external web service.

We are using "Camel-example-cxf-proxy" example. 

We have highlighted the two parameters we are changing(with the external web
Service path) in camel-config.xml. Can you specify any other parameters we
need to change?


<http://camel.465427.n5.nabble.com/file/n5724341/camel_Image.jpg> 



--
View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605p5724341.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Redirecting a soap request to external webservice

Posted by Willem jiang <wi...@gmail.com>.
Can you change the port?
It looks like the Jetty server can not use the port of 1102?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Wednesday, December 5, 2012 at 9:06 PM, nmsrinm wrote:

> As per the example we are able to simulate in the same JVM,but we are not not
> able to simulate in external JVM.
>  
> *Error:*
>  
> FAILED SelectChannelConnector@0.0.0.0 (mailto:SelectChannelConnector@0.0.0.0):1102 FAILED: java.net.BindException:
> Cannot assign requested address: bind
>  
> It is not able to connect to external IP Address.
> What modifications should we need to do in order to rectify this error?
>  
> <http://camel.465427.n5.nabble.com/file/n5723656/Error.jpg>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605p5723656.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: Redirecting a soap request to external webservice

Posted by nmsrinm <nm...@gmail.com>.
As per the example we are able to simulate in the same JVM,but we are not not
able to simulate in external JVM.

*Error:*

FAILED SelectChannelConnector@0.0.0.0:1102 FAILED: java.net.BindException:
Cannot assign requested address: bind

It is not able to connect to external IP Address.
What modifications should we need to do in order to rectify this error?

<http://camel.465427.n5.nabble.com/file/n5723656/Error.jpg> 



--
View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605p5723656.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Redirecting a soap request to external webservice

Posted by Willem jiang <wi...@gmail.com>.
Hi,

Please take a look at this example[1]
[1]http://camel.apache.org/cxf-proxy-example.html


-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Tuesday, December 4, 2012 at 8:36 PM, nmsrinm wrote:

> Hi
> 
> We need to redirect the SOAP request body received from the client side to
> the external web service(External server). Can anyone suggest which camel
> component to be used and is it possible to implement in JAVA DSL?
> Suggest/Mention some suitable example for the same
> 
> Here i attached a sample code image which we are implementing.
> 
> <http://camel.465427.n5.nabble.com/file/n5723605/Image.jpg> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Redirecting-a-soap-request-to-external-webservice-tp5723605.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).