You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Dhiego Abrantes de Oliveira Martins <dh...@dhiegoabrantes.com> on 2013/05/17 07:28:06 UTC

[ipojo] Question about exposing cxf endpoint

Hi all,

I have a problem with CXF. I'm trying to develop a WebService as a Bundle
OSGi and I'm using iPOJO + Maven. So, I included 'cxf-rt-transports-http'
and 'cxf-rt-frontend-jaxws' as dependencies. Both on version 2.6.5.

What seem is that when I start the bundle, an specific instance of jetty is
created according to properties. The main problem is that I cant access the
service from another computer, for example, using real ip address. I just
can access from localhost.

There are some way to expose webservice through real ip address?

Thanks in advance!

Some properties (metadata.xml):
<instance component="br.com.appService.impl.ApplicationServiceImpl">
    <property name="service.exported.interfaces" value="*"/>
      <property name="service.exported.configs " value="org.apache.cxf.ws"
/>
      <property name="org.apache.cxf.ws.address" value="
http://localhost:9090/appService" />
  </instance>

Bundles:
START LEVEL 1

   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (4.0.3)
[   1] [Active     ] [    1] Distributed OSGi Distribution Software
Single-Bundle Distribution (1.3.1)
[   2] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
[   3] [Active     ] [    1] Apache Felix Configuration Admin Service
(1.2.6)
[   4] [Active     ] [    1] Apache Felix EventAdmin (1.2.2)
[   5] [Active     ] [    1] Apache Felix iPOJO (1.6.0)
[   6] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
[   7] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   8] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[   9] [Active     ] [    1] Apache Felix File Install (3.2.6)
[ 100] [Active     ] [    1] OSGi OBR Service API (1)
[ 134] [Active     ] [    1] Activation 1.1 (1.1)
[ 135] [Active     ] [    1] Apache ServiceMix :: Specs :: Stax API 1.0
(1.8.0)
[ 136] [Active     ] [    1] Apache ServiceMix Specs :: JAXB API 2.1 (1.1.0)
[ 137] [Active     ] [    1] Apache ServiceMix Bundles: jaxb-impl-2.1.6
(2.1.6.1)
[ 222] [Active     ] [    1] osgi.cmpn (4.2.0.200908310645)
[ 231] [Active     ] [    1] Apache Log4J (1.2.15)
[ 446] [Active     ] [    1] Apache Felix Http Api (2.2.0)
[ 447] [Active     ] [    1] Apache Felix Http Base (2.2.0)
[ 448] [Active     ] [    1] Apache Felix Http Bridge (2.2.0)
[ 449] [Active     ] [    1] Apache Felix Http Bundle (2.2.0)
[ 450] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
[ 451] [Active     ] [    1] Apache Felix Http Proxy (2.2.0)
[ 452] [Active     ] [    1] Apache Felix Http Whiteboard (2.2.0)

__
*Dhiego** **Abrantes*

Re: [ipojo] Question about exposing cxf endpoint

Posted by Dhiego Abrantes de Oliveira Martins <dh...@dhiegoabrantes.com>.
Hi,

The problem was solved. The main problem was the version of single-dogsi
and the value of property 'org.apache.cxf.ws.address'.

We were using the single-dosgi version 1.3.1, so, we changed this version
to 1.4.*.
About the 'org.apache.cxf.ws.address' property, if we declare as
'localhost', the service just can be accessible by my pc. If we want to
allow access by outside, we have to declare '0.0.0.0' as ip address.
Indeed, using version 1.4.* of single-dosgi, we can just declare
'/appService' and configure the port using normal pax web config.

Best regards,
__
*Dhiego** **Abrantes*


2013/5/18 Clement Escoffier <cl...@gmail.com>

> Hi,
>
> Which port are you using ? Also check if you don't have two http service
> deployed.
>
> Regards,
>
> Clement
>
>
> On 17 mai 2013, at 07:28, Dhiego Abrantes de Oliveira Martins <
> dhiego@dhiegoabrantes.com> wrote:
>
> > Hi all,
> >
> > I have a problem with CXF. I'm trying to develop a WebService as a Bundle
> > OSGi and I'm using iPOJO + Maven. So, I included 'cxf-rt-transports-http'
> > and 'cxf-rt-frontend-jaxws' as dependencies. Both on version 2.6.5.
> >
> > What seem is that when I start the bundle, an specific instance of jetty
> is
> > created according to properties. The main problem is that I cant access
> the
> > service from another computer, for example, using real ip address. I just
> > can access from localhost.
> >
> > There are some way to expose webservice through real ip address?
> >
> > Thanks in advance!
> >
> > Some properties (metadata.xml):
> > <instance component="br.com.appService.impl.ApplicationServiceImpl">
> >    <property name="service.exported.interfaces" value="*"/>
> >      <property name="service.exported.configs " value="org.apache.cxf.ws
> "
> > />
> >      <property name="org.apache.cxf.ws.address" value="
> > http://localhost:9090/appService" />
> >  </instance>
> >
> > Bundles:
> > START LEVEL 1
> >
> >   ID   State         Level  Name
> > [   0] [Active     ] [    0] System Bundle (4.0.3)
> > [   1] [Active     ] [    1] Distributed OSGi Distribution Software
> > Single-Bundle Distribution (1.3.1)
> > [   2] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> > [   3] [Active     ] [    1] Apache Felix Configuration Admin Service
> > (1.2.6)
> > [   4] [Active     ] [    1] Apache Felix EventAdmin (1.2.2)
> > [   5] [Active     ] [    1] Apache Felix iPOJO (1.6.0)
> > [   6] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
> > [   7] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> > [   8] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> > [   9] [Active     ] [    1] Apache Felix File Install (3.2.6)
> > [ 100] [Active     ] [    1] OSGi OBR Service API (1)
> > [ 134] [Active     ] [    1] Activation 1.1 (1.1)
> > [ 135] [Active     ] [    1] Apache ServiceMix :: Specs :: Stax API 1.0
> > (1.8.0)
> > [ 136] [Active     ] [    1] Apache ServiceMix Specs :: JAXB API 2.1
> (1.1.0)
> > [ 137] [Active     ] [    1] Apache ServiceMix Bundles: jaxb-impl-2.1.6
> > (2.1.6.1)
> > [ 222] [Active     ] [    1] osgi.cmpn (4.2.0.200908310645)
> > [ 231] [Active     ] [    1] Apache Log4J (1.2.15)
> > [ 446] [Active     ] [    1] Apache Felix Http Api (2.2.0)
> > [ 447] [Active     ] [    1] Apache Felix Http Base (2.2.0)
> > [ 448] [Active     ] [    1] Apache Felix Http Bridge (2.2.0)
> > [ 449] [Active     ] [    1] Apache Felix Http Bundle (2.2.0)
> > [ 450] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
> > [ 451] [Active     ] [    1] Apache Felix Http Proxy (2.2.0)
> > [ 452] [Active     ] [    1] Apache Felix Http Whiteboard (2.2.0)
> >
> > __
> > *Dhiego** **Abrantes*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: [ipojo] Question about exposing cxf endpoint

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

Which port are you using ? Also check if you don't have two http service deployed.

Regards,

Clement


On 17 mai 2013, at 07:28, Dhiego Abrantes de Oliveira Martins <dh...@dhiegoabrantes.com> wrote:

> Hi all,
> 
> I have a problem with CXF. I'm trying to develop a WebService as a Bundle
> OSGi and I'm using iPOJO + Maven. So, I included 'cxf-rt-transports-http'
> and 'cxf-rt-frontend-jaxws' as dependencies. Both on version 2.6.5.
> 
> What seem is that when I start the bundle, an specific instance of jetty is
> created according to properties. The main problem is that I cant access the
> service from another computer, for example, using real ip address. I just
> can access from localhost.
> 
> There are some way to expose webservice through real ip address?
> 
> Thanks in advance!
> 
> Some properties (metadata.xml):
> <instance component="br.com.appService.impl.ApplicationServiceImpl">
>    <property name="service.exported.interfaces" value="*"/>
>      <property name="service.exported.configs " value="org.apache.cxf.ws"
> />
>      <property name="org.apache.cxf.ws.address" value="
> http://localhost:9090/appService" />
>  </instance>
> 
> Bundles:
> START LEVEL 1
> 
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (4.0.3)
> [   1] [Active     ] [    1] Distributed OSGi Distribution Software
> Single-Bundle Distribution (1.3.1)
> [   2] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   3] [Active     ] [    1] Apache Felix Configuration Admin Service
> (1.2.6)
> [   4] [Active     ] [    1] Apache Felix EventAdmin (1.2.2)
> [   5] [Active     ] [    1] Apache Felix iPOJO (1.6.0)
> [   6] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
> [   7] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   8] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   9] [Active     ] [    1] Apache Felix File Install (3.2.6)
> [ 100] [Active     ] [    1] OSGi OBR Service API (1)
> [ 134] [Active     ] [    1] Activation 1.1 (1.1)
> [ 135] [Active     ] [    1] Apache ServiceMix :: Specs :: Stax API 1.0
> (1.8.0)
> [ 136] [Active     ] [    1] Apache ServiceMix Specs :: JAXB API 2.1 (1.1.0)
> [ 137] [Active     ] [    1] Apache ServiceMix Bundles: jaxb-impl-2.1.6
> (2.1.6.1)
> [ 222] [Active     ] [    1] osgi.cmpn (4.2.0.200908310645)
> [ 231] [Active     ] [    1] Apache Log4J (1.2.15)
> [ 446] [Active     ] [    1] Apache Felix Http Api (2.2.0)
> [ 447] [Active     ] [    1] Apache Felix Http Base (2.2.0)
> [ 448] [Active     ] [    1] Apache Felix Http Bridge (2.2.0)
> [ 449] [Active     ] [    1] Apache Felix Http Bundle (2.2.0)
> [ 450] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
> [ 451] [Active     ] [    1] Apache Felix Http Proxy (2.2.0)
> [ 452] [Active     ] [    1] Apache Felix Http Whiteboard (2.2.0)
> 
> __
> *Dhiego** **Abrantes*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org