You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by hiyer <iy...@hotmail.com> on 2006/08/07 16:43:44 UTC
Running multiple jsr181 webservices on the same port
Hi,
I have 2 webservices and I need them to run on the same port. But with the
attached spring configuration I get the error 'java.net.BindException:
Address already in use: bind'. If I change the port number of
DirectoryService to 8193 then it works. How can I run multiple webservices
on the same port?
Cheers,
Hari.
<sm:container
id="jbi"
monitorInstallationDirectory="false">
<sm:activationSpecs>
<sm:activationSpec>
<sm:component>
<jsr181:component>
<jsr181:endpoints>
<jsr181:endpoint
annotations="jsr181"
service="xfire:OrderService"
endpoint="OrderService"
pojo="#orderService">
</jsr181:endpoint>
</jsr181:endpoints>
</jsr181:component>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<http:component>
<http:endpoints>
<http:endpoint
service="xfire:OrderService"
endpoint="OrderService"
targetService="xfire:OrderService"
role="consumer"
locationURI="http://localhost:8192/OrderService/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"/>
</http:endpoints>
</http:component>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<jsr181:component>
<jsr181:endpoints>
<jsr181:endpoint
annotations="jsr181"
service="xfire:DirectoryService"
endpoint="DirectoryService"
pojo="#directoryService">
</jsr181:endpoint>
</jsr181:endpoints>
</jsr181:component>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<http:component>
<http:endpoints>
<http:endpoint
service="xfire:DirectoryService"
endpoint="DirectoryService"
targetService="xfire:DirectoryService"
role="consumer"
locationURI="http://localhost:8192/DirectoryService/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"/>
</http:endpoints>
</http:component>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
--
View this message in context: http://www.nabble.com/Running-multiple-jsr181-webservices-on-the-same-port-tf2064026.html#a5686205
Sent from the ServiceMix - User forum at Nabble.com.
Re: Running multiple jsr181 webservices on the same port
Posted by Guillaume Nodet <gn...@gmail.com>.
I think you mean the wsdl is not generated.
Yes, the target endpoint need to be activated before the http endpoint.
On 8/7/06, hiyer <iy...@hotmail.com> wrote:
>
>
> That worked. Thanks!
> But there seems to be a dependency between the jsr181 endpoint definition
> and the http endpoint definition. If I specified the jsr181 after the http
> then I cannot access the service.
> --
> View this message in context:
> http://www.nabble.com/Running-multiple-jsr181-webservices-on-the-same-port-tf2064026.html#a5690953
> Sent from the ServiceMix - User forum at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Running multiple jsr181 webservices on the same port
Posted by hiyer <iy...@hotmail.com>.
That worked. Thanks!
But there seems to be a dependency between the jsr181 endpoint definition
and the http endpoint definition. If I specified the jsr181 after the http
then I cannot access the service.
--
View this message in context: http://www.nabble.com/Running-multiple-jsr181-webservices-on-the-same-port-tf2064026.html#a5690953
Sent from the ServiceMix - User forum at Nabble.com.
Re: Running multiple jsr181 webservices on the same port
Posted by Guillaume Nodet <gn...@gmail.com>.
In your configuration, each http component will try to start an http server
on port 8192.
You need to put both http endpoints inside the same http component.
On 8/7/06, hiyer <iy...@hotmail.com> wrote:
>
>
> Hi,
> I have 2 webservices and I need them to run on the same port. But with the
> attached spring configuration I get the error 'java.net.BindException:
> Address already in use: bind'. If I change the port number of
> DirectoryService to 8193 then it works. How can I run multiple webservices
> on the same port?
> Cheers,
> Hari.
>
> <sm:container
> id="jbi"
> monitorInstallationDirectory="false">
>
> <sm:activationSpecs>
> <sm:activationSpec>
> <sm:component>
> <jsr181:component>
> <jsr181:endpoints>
> <jsr181:endpoint
> annotations="jsr181"
> service="xfire:OrderService"
> endpoint="OrderService"
> pojo="#orderService">
> </jsr181:endpoint>
> </jsr181:endpoints>
> </jsr181:component>
> </sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec>
> <sm:component>
> <http:component>
> <http:endpoints>
> <http:endpoint
> service="xfire:OrderService"
> endpoint="OrderService"
> targetService="xfire:OrderService"
> role="consumer"
> locationURI="http://localhost:8192/OrderService/"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> soap="true"/>
> </http:endpoints>
> </http:component>
> </sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec>
> <sm:component>
> <jsr181:component>
> <jsr181:endpoints>
> <jsr181:endpoint
> annotations="jsr181"
> service="xfire:DirectoryService"
> endpoint="DirectoryService"
> pojo="#directoryService">
> </jsr181:endpoint>
> </jsr181:endpoints>
> </jsr181:component>
> </sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec>
> <sm:component>
> <http:component>
> <http:endpoints>
> <http:endpoint
> service="xfire:DirectoryService"
> endpoint="DirectoryService"
> targetService="xfire:DirectoryService"
> role="consumer"
> locationURI="http://localhost:8192/DirectoryService/"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> soap="true"/>
> </http:endpoints>
> </http:component>
> </sm:component>
> </sm:activationSpec>
> </sm:activationSpecs>
>
> </sm:container>
> --
> View this message in context:
> http://www.nabble.com/Running-multiple-jsr181-webservices-on-the-same-port-tf2064026.html#a5686205
> Sent from the ServiceMix - User forum at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet