You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by nvijayak <nv...@cs.indiana.edu> on 2008/01/25 09:32:21 UTC
Binding component for an external servlet
Hi,
I want to create a http endpoint in servicemix for an external servlet. I am
using the following in a servicemix-http-consumer-service-unit's xbean.xml.
The location of the servlet is http://localhost:8080/test/foo.
<http:endpoint service="foows:FooServlet"
endpoint="fooServlet"
role="provider"
locationURI="http://localhost:8080/test/foo/">
</http:endpoint>
<http:endpoint service="foows:FooServletProxy" endpoint="proxy"
role="consumer" locationURI="http://0.0.0.0:8192/foo/"
targetService="foows:FooServlet" targetEndpoint="fooServlet"/>
Is this the correct approach? I just want to invoke this servlet from within
an NMR SE and send the data to it.
Thanks,
Nithya
--
View this message in context: http://www.nabble.com/Binding-component-for-an-external-servlet-tp15083336s12049p15083336.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Binding component for an external servlet
Posted by Freeman Fang <fr...@gmail.com>.
Hi Nithya,
If you wanna invoke external servlet from an NMR SE, I think a http
provider endpoint is enough
Best Regards
Freeman
nvijayak wrote:
> Hi,
>
> I want to create a http endpoint in servicemix for an external servlet. I am
> using the following in a servicemix-http-consumer-service-unit's xbean.xml.
> The location of the servlet is http://localhost:8080/test/foo.
>
> <http:endpoint service="foows:FooServlet"
> endpoint="fooServlet"
> role="provider"
> locationURI="http://localhost:8080/test/foo/">
> </http:endpoint>
>
> <http:endpoint service="foows:FooServletProxy" endpoint="proxy"
> role="consumer" locationURI="http://0.0.0.0:8192/foo/"
> targetService="foows:FooServlet" targetEndpoint="fooServlet"/>
>
> Is this the correct approach? I just want to invoke this servlet from within
> an NMR SE and send the data to it.
>
> Thanks,
> Nithya
>
>
Re: Binding component for an external servlet
Posted by nvijayak <nv...@cs.indiana.edu>.
Hi,
I have a http-provider and a http-consumer module. The http-provider creates
an endpoint to expose an external servlet. The xbean.xml for this is as
follows:
<beans xmlns:http="http://servicemix.apache.org/http/1.0">
<http:endpoint service="http:FOOServlet"
endpoint="fooServlet"
role="provider"
locationURI="http://localhost:8080/test/foo/" > <!--jetty servlet -->
</http:endpoint>
</beans>
The http-consumer exposes the notification broker, pullpoint and a
jsr-servlet. The xbean.xml is as follows:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:wsn="http://servicemix.org/wsnotification"
xmlns:foows="http://servicemix.apache.org/examples/foows">
<http:endpoint service="foows:FOOWS"
endpoint="Soap"
role="consumer"
targetService="foows:FOOWS"
locationURI="http://localhost:8492/FOOWS/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
<http:endpoint service="wsn:NotificationBroker"
endpoint="http-binding"
targetService="wsn:NotificationBroker"
targetEndpoint="Broker"
role="consumer"
locationURI="http://localhost:8492/Broker/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"/>
<http:endpoint service="wsn:CreatePullPoint"
endpoint="http-binding2"
targetService="wsn:CreatePullPoint"
targetEndpoint="Broker"
role="consumer"
locationURI="http://localhost:8492/CreatePullPoint/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"/>
</beans>
I send a request from the servlet's doGet method to subscribe the servlet as
a wsn-consumer by invokng the notification broker. the request is as
follows:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Body>
<wsnt:Subscribe>
<wsnt:ConsumerReference>
<wsa:Address> endpoint:http://localhost:8080/test/foo/ </wsa:Address>
</wsnt:ConsumerReference>
<wsnt:Filter>
<wsnt:TopicExpression Dialect="http://docs.oasis-op
en.org/wsn/t-1/TopicExpression/Simple">myTopic </wsnt:TopicExpression>
</wsnt:Filter>
</wsnt:Subscribe>
</env:Body>
</env:Envelope>
When I invoke the servlet's doGet method it sends the subscription request
the notif-broker but get a "Unable to resolve consumer endpoint" error.
I will be very grateful if you can help figure out where the problem is.
Thanks,
Nithya
marco.mistroni wrote:
>
> hello
> can u post ur xbean.xml? have you forgotten some namespaces?
> regards
> marco
>
>
>
> Internet
> nvijayak@cs.indiana.edu
>
> 25/01/2008 16:18
> Please respond to
> users@servicemix.apache.org
>
>
> To
> users
> cc
>
> Subject
> Re: Binding component for an external servlet
>
>
>
>
>
>
>
>
> thanks. I tried with a provider endpoint, but when I register this
> endpoint
> to ws-notif broker in servicemix as a consumer of messages I get "Unable
> to
> resolve consumer endpoint error". Do you have any suggestion/examples for
> the same?
>
> Thanks,
> Nithya
>
>
> nvijayak wrote:
>>
>> Hi,
>>
>> I want to create a http endpoint in servicemix for an external servlet.
> I
>> am using the following in a servicemix-http-consumer-service-unit's
>> xbean.xml. The location of the servlet is http://localhost:8080/test/foo
> ..
>>
>> <http:endpoint service="foows:FooServlet"
>> endpoint="fooServlet"
>> role="provider"
>> locationURI="http://localhost:8080/test/foo/">
>> </http:endpoint>
>>
>> <http:endpoint service="foows:FooServletProxy" endpoint="proxy"
>> role="consumer" locationURI="http://0.0.0.0:8192/foo/"
>> targetService="foows:FooServlet"
> targetEndpoint="fooServlet"/>
>>
>> Is this the correct approach? I just want to invoke this servlet from
>> within an NMR SE and send the data to it.
>>
>> Thanks,
>> Nithya
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Binding-component-for-an-external-servlet-tp15083336s12049p15091232.html
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>
> This communication is confidential, may be privileged and is meant only
> for the intended recipient. If you are
> not the intended recipient, please notify the sender by reply and delete
> this message from your system. Any
> unauthorised dissemination, distribution or copying hereof is prohibited.
>
> BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> Limited, BNP Paribas UK Limited,
> BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are
> authorised and regulated by
> the Financial Services Authority.
>
> BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank
> are authorised by the CECEI
> and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> London Branch and BNP Paribas
> Private Bank London Branch are regulated by the Financial Services
> Authority for the conduct of their UK
> business. BNP Paribas Securities Services London Branch is also a member
> of the London Stock Exchange.
>
>
>
--
View this message in context: http://www.nabble.com/Binding-component-for-an-external-servlet-tp15083336s12049p15096495.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Binding component for an external servlet
Posted by ma...@uk.bnpparibas.com.
hello
can u post ur xbean.xml? have you forgotten some namespaces?
regards
marco
Internet
nvijayak@cs.indiana.edu
25/01/2008 16:18
Please respond to
users@servicemix.apache.org
To
users
cc
Subject
Re: Binding component for an external servlet
thanks. I tried with a provider endpoint, but when I register this
endpoint
to ws-notif broker in servicemix as a consumer of messages I get "Unable
to
resolve consumer endpoint error". Do you have any suggestion/examples for
the same?
Thanks,
Nithya
nvijayak wrote:
>
> Hi,
>
> I want to create a http endpoint in servicemix for an external servlet.
I
> am using the following in a servicemix-http-consumer-service-unit's
> xbean.xml. The location of the servlet is http://localhost:8080/test/foo
..
>
> <http:endpoint service="foows:FooServlet"
> endpoint="fooServlet"
> role="provider"
> locationURI="http://localhost:8080/test/foo/">
> </http:endpoint>
>
> <http:endpoint service="foows:FooServletProxy" endpoint="proxy"
> role="consumer" locationURI="http://0.0.0.0:8192/foo/"
> targetService="foows:FooServlet"
targetEndpoint="fooServlet"/>
>
> Is this the correct approach? I just want to invoke this servlet from
> within an NMR SE and send the data to it.
>
> Thanks,
> Nithya
>
>
--
View this message in context:
http://www.nabble.com/Binding-component-for-an-external-servlet-tp15083336s12049p15091232.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: Binding component for an external servlet
Posted by nvijayak <nv...@cs.indiana.edu>.
thanks. I tried with a provider endpoint, but when I register this endpoint
to ws-notif broker in servicemix as a consumer of messages I get "Unable to
resolve consumer endpoint error". Do you have any suggestion/examples for
the same?
Thanks,
Nithya
nvijayak wrote:
>
> Hi,
>
> I want to create a http endpoint in servicemix for an external servlet. I
> am using the following in a servicemix-http-consumer-service-unit's
> xbean.xml. The location of the servlet is http://localhost:8080/test/foo.
>
> <http:endpoint service="foows:FooServlet"
> endpoint="fooServlet"
> role="provider"
> locationURI="http://localhost:8080/test/foo/">
> </http:endpoint>
>
> <http:endpoint service="foows:FooServletProxy" endpoint="proxy"
> role="consumer" locationURI="http://0.0.0.0:8192/foo/"
> targetService="foows:FooServlet" targetEndpoint="fooServlet"/>
>
> Is this the correct approach? I just want to invoke this servlet from
> within an NMR SE and send the data to it.
>
> Thanks,
> Nithya
>
>
--
View this message in context: http://www.nabble.com/Binding-component-for-an-external-servlet-tp15083336s12049p15091232.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.