You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jason Pell <ja...@pellcorp.com> on 2010/12/15 14:24:46 UTC
Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean
and Address ever since upgrading to 2.3.X
Hi,
Prior to 2.3.0 this all worked fine...
I have a mixture of java first web services I am deploying using both
jaxws:endpoint and more directly using
org.apache.cxf.jaxws.JaxWsServerFactoryBean
When I use a jaxws:endpoint and specify an address of for example:
http://localhost:9449/SomeService
The service is available on ALL network interfaces because CXF seems
to deploy it to 0.0.0.0. However when I manually construct a service
using springs beans and JaxWsServerFactoryBean (a subset is included
here):
<bean id="ServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
<property name="serviceBean" ref="ServiceImpl" />
<property name="start" value="false" />
<property name="http://localhost:9448/SomeOtherService">
</bean>
It only gets deployed to localhost.
The logs from jetty are different too:
org.eclipse.jetty.util.log - Started SelectChannelConnector@localhost:9448
org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:9449
Any ideas why this is so. At the moment I have modified my spring
beans to specify
<property name="http://0.0.0.0:9448/SomeOtherService">
but its nasty, especially as the WSDL now contains this 0.0.0.0
address which looks particularly nasty and causes real problems for
those trying to load the WSDL into soapui on a remote server.
Ideally the wsdl should contain the address of the network interface
it was requested from.
But if I can just get it so that it deploys to all network interfaces
without me having to specify 0.0.0.0 in the address that would be
ideal.
I have reasons why I cannot use jaxws:endpoint so please don't suggest
that :-) I just need to know what jaxws:endpoint is doing differently
and replicate that in my spring contexts
Thanks
Jason
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Jason Pell <ja...@gmail.com>.
Hi,
Your thinking was correct :-) I set the httpj config to have the services bind to 0.0.0.0 but then specified the eth0 ip address in the jaxws:endpoint / jaxws factory and the services are available on localhost as well but the wsdl location is set to the eth0 ip - awesome thanks
Sent from my iPhone
On Dec 18, 2010, at 8:49, Daniel Kulp <dk...@apache.org> wrote:
> On Thursday 16 December 2010 7:37:39 pm Jason Pell wrote:
>> Hi,
>>
>> I discovered if I disabled the following in the applicationContext.xml
>>
>> <httpj:engine-factory>
>> <httpj:engine port="9449">
>> </httpj:engine>
>> </httpj:engine-factory>
>>
>> Then the service would no longer be bound to 0.0.0.0, I now get:
>>
>> SelectChannelConnector@localhost:9449
>
> Ah. OK. Now I understand what's happening. :-)
>
> When you configure an engine for a port, there is a "host" attribute that you
> can set to tell it which host to bind to. If unset, it uses "all".
>
> If there is NOT a configuration, it uses the host specified by the URL that is
> passed in at publish.
>
> I THINK you can configure the engine like above, but then pass in pretty much
> any hostname (like the "public" host name of the machine) and the service
> would start up on all IP's, but the returned wsdl would contain the public
> URL/name.
>
>
> Dan
>
>
>>
>> On Fri, Dec 17, 2010 at 7:31 AM, Jason Pell <ja...@gmail.com> wrote:
>>> I could see binding to 0.0.0.0 automatically as a security issue I guess?
>>>
>>> Sent from my iPhone
>>>
>>> On Dec 17, 2010, at 7:20, Daniel Kulp <dk...@apache.org> wrote:
>>>> On Thursday 16 December 2010 3:04:52 pm Jason Pell wrote:
>>>>> So your tests if I understand it - none of the services are available
>>>>> on any network interface except the local loop back?
>>>>
>>>> That's what I'm seeing with both 2.2.12 and 2.3.1 (and trunk) if the
>>>> address is set to http://localhost:8080.
>>>>
>>>>> So should I be using two endpoints for each service - one for localhost
>>>>> and one for the external network interface
>>>>
>>>> Look like it, yea.
>>>>
>>>>> My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is
>>>>> unexpected?
>>>>
>>>> Well, to be honest, I had THOUGHT that that deploying to 0.0.0.0 was the
>>>> default behavior unless a spring config configured the port to ONLY go
>>>> on a certain host. I'm not sure why it's NOT doing that, but it
>>>> doesn't seem to be for me with 2.2.12 so it doesn't seem to be a
>>>> "regression", but I'm also not sure if its working as designed. I
>>>> could actually go either way with it. :-)
>>>>
>>>> Dan
>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
>>>>>> Well, I'm not able to reproduce the jaxws:endpoint behavior you
>>>>>> describe. I
>>>>>>
>>>>>> updated a test to have:
>>>>>> <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
>>>>>> <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
>>>>>>
>>>>>> address="http://localhost:9000/Cxf1332" />
>>>>>>
>>>>>> <bean id="ServiceFactory"
>>>>>>
>>>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
>>>>>>
>>>>>> <property name="serviceBean" ref="ServiceImpl" />
>>>>>> <property name="start" value="true" />
>>>>>> <property name="address" value="http://localhost:9001/Cxf1332"/>
>>>>>>
>>>>>> </bean>
>>>>>>
>>>>>> and then started the factory. I see:
>>>>>>
>>>>>> INFO: Started SelectChannelConnector@localhost:9000
>>>>>> .....
>>>>>> INFO: Started SelectChannelConnector@localhost:9001
>>>>>>
>>>>>>
>>>>>>
>>>>>> Now, I CAN reproduce your issue of the above then only being available
>>>>>> on localhost. However, I don't think this is any different than
>>>>>> with 2.2.x? I just ran the java_first_jaxws with 2.2.12 server and I
>>>>>> get:
>>>>>>
>>>>>> INFO: Started SelectChannelConnector@localhost:9000
>>>>>> and a netstat -an showed it only on localhost and trying to do a get
>>>>>> on non- localhost doesn't work.
>>>>>>
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>> On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Prior to 2.3.0 this all worked fine...
>>>>>>>
>>>>>>> I have a mixture of java first web services I am deploying using both
>>>>>>> jaxws:endpoint and more directly using
>>>>>>> org.apache.cxf.jaxws.JaxWsServerFactoryBean
>>>>>>>
>>>>>>> When I use a jaxws:endpoint and specify an address of for example:
>>>>>>>
>>>>>>> http://localhost:9449/SomeService
>>>>>>>
>>>>>>> The service is available on ALL network interfaces because CXF seems
>>>>>>> to deploy it to 0.0.0.0. However when I manually construct a service
>>>>>>> using springs beans and JaxWsServerFactoryBean (a subset is included
>>>>>>> here):
>>>>>>>
>>>>>>> <bean id="ServiceFactory"
>>>>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
>>>>>>> name="serviceBean" ref="ServiceImpl" />
>>>>>>>
>>>>>>> <property name="start" value="false" />
>>>>>>>
>>>>>>> <property name="http://localhost:9448/SomeOtherService">
>>>>>>>
>>>>>>> </bean>
>>>>>>>
>>>>>>> It only gets deployed to localhost.
>>>>>>>
>>>>>>> The logs from jetty are different too:
>>>>>>>
>>>>>>> org.eclipse.jetty.util.log - Started
>>>>>>> SelectChannelConnector@localhost:9448 org.eclipse.jetty.util.log -
>>>>>>> Started SelectChannelConnector@0.0.0.0:9449
>>>>>>>
>>>>>>> Any ideas why this is so. At the moment I have modified my spring
>>>>>>> beans to specify
>>>>>>> <property name="http://0.0.0.0:9448/SomeOtherService">
>>>>>>>
>>>>>>> but its nasty, especially as the WSDL now contains this 0.0.0.0
>>>>>>> address which looks particularly nasty and causes real problems for
>>>>>>> those trying to load the WSDL into soapui on a remote server.
>>>>>>> Ideally the wsdl should contain the address of the network interface
>>>>>>> it was requested from.
>>>>>>>
>>>>>>> But if I can just get it so that it deploys to all network interfaces
>>>>>>> without me having to specify 0.0.0.0 in the address that would be
>>>>>>> ideal.
>>>>>>>
>>>>>>> I have reasons why I cannot use jaxws:endpoint so please don't
>>>>>>> suggest that :-) I just need to know what jaxws:endpoint is doing
>>>>>>> differently and replicate that in my spring contexts
>>>>>>>
>>>>>>> Thanks
>>>>>>> Jason
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org
>>>> http://dankulp.com/blog
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 16 December 2010 7:37:39 pm Jason Pell wrote:
> Hi,
>
> I discovered if I disabled the following in the applicationContext.xml
>
> <httpj:engine-factory>
> <httpj:engine port="9449">
> </httpj:engine>
> </httpj:engine-factory>
>
> Then the service would no longer be bound to 0.0.0.0, I now get:
>
> SelectChannelConnector@localhost:9449
Ah. OK. Now I understand what's happening. :-)
When you configure an engine for a port, there is a "host" attribute that you
can set to tell it which host to bind to. If unset, it uses "all".
If there is NOT a configuration, it uses the host specified by the URL that is
passed in at publish.
I THINK you can configure the engine like above, but then pass in pretty much
any hostname (like the "public" host name of the machine) and the service
would start up on all IP's, but the returned wsdl would contain the public
URL/name.
Dan
>
> On Fri, Dec 17, 2010 at 7:31 AM, Jason Pell <ja...@gmail.com> wrote:
> > I could see binding to 0.0.0.0 automatically as a security issue I guess?
> >
> > Sent from my iPhone
> >
> > On Dec 17, 2010, at 7:20, Daniel Kulp <dk...@apache.org> wrote:
> >> On Thursday 16 December 2010 3:04:52 pm Jason Pell wrote:
> >>> So your tests if I understand it - none of the services are available
> >>> on any network interface except the local loop back?
> >>
> >> That's what I'm seeing with both 2.2.12 and 2.3.1 (and trunk) if the
> >> address is set to http://localhost:8080.
> >>
> >>> So should I be using two endpoints for each service - one for localhost
> >>> and one for the external network interface
> >>
> >> Look like it, yea.
> >>
> >>> My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is
> >>> unexpected?
> >>
> >> Well, to be honest, I had THOUGHT that that deploying to 0.0.0.0 was the
> >> default behavior unless a spring config configured the port to ONLY go
> >> on a certain host. I'm not sure why it's NOT doing that, but it
> >> doesn't seem to be for me with 2.2.12 so it doesn't seem to be a
> >> "regression", but I'm also not sure if its working as designed. I
> >> could actually go either way with it. :-)
> >>
> >> Dan
> >>
> >>> Sent from my iPhone
> >>>
> >>> On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
> >>>> Well, I'm not able to reproduce the jaxws:endpoint behavior you
> >>>> describe. I
> >>>>
> >>>> updated a test to have:
> >>>> <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
> >>>> <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
> >>>>
> >>>> address="http://localhost:9000/Cxf1332" />
> >>>>
> >>>> <bean id="ServiceFactory"
> >>>>
> >>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
> >>>>
> >>>> <property name="serviceBean" ref="ServiceImpl" />
> >>>> <property name="start" value="true" />
> >>>> <property name="address" value="http://localhost:9001/Cxf1332"/>
> >>>>
> >>>> </bean>
> >>>>
> >>>> and then started the factory. I see:
> >>>>
> >>>> INFO: Started SelectChannelConnector@localhost:9000
> >>>> .....
> >>>> INFO: Started SelectChannelConnector@localhost:9001
> >>>>
> >>>>
> >>>>
> >>>> Now, I CAN reproduce your issue of the above then only being available
> >>>> on localhost. However, I don't think this is any different than
> >>>> with 2.2.x? I just ran the java_first_jaxws with 2.2.12 server and I
> >>>> get:
> >>>>
> >>>> INFO: Started SelectChannelConnector@localhost:9000
> >>>> and a netstat -an showed it only on localhost and trying to do a get
> >>>> on non- localhost doesn't work.
> >>>>
> >>>>
> >>>> Dan
> >>>>
> >>>> On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
> >>>>> Hi,
> >>>>>
> >>>>> Prior to 2.3.0 this all worked fine...
> >>>>>
> >>>>> I have a mixture of java first web services I am deploying using both
> >>>>> jaxws:endpoint and more directly using
> >>>>> org.apache.cxf.jaxws.JaxWsServerFactoryBean
> >>>>>
> >>>>> When I use a jaxws:endpoint and specify an address of for example:
> >>>>>
> >>>>> http://localhost:9449/SomeService
> >>>>>
> >>>>> The service is available on ALL network interfaces because CXF seems
> >>>>> to deploy it to 0.0.0.0. However when I manually construct a service
> >>>>> using springs beans and JaxWsServerFactoryBean (a subset is included
> >>>>> here):
> >>>>>
> >>>>> <bean id="ServiceFactory"
> >>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
> >>>>> name="serviceBean" ref="ServiceImpl" />
> >>>>>
> >>>>> <property name="start" value="false" />
> >>>>>
> >>>>> <property name="http://localhost:9448/SomeOtherService">
> >>>>>
> >>>>> </bean>
> >>>>>
> >>>>> It only gets deployed to localhost.
> >>>>>
> >>>>> The logs from jetty are different too:
> >>>>>
> >>>>> org.eclipse.jetty.util.log - Started
> >>>>> SelectChannelConnector@localhost:9448 org.eclipse.jetty.util.log -
> >>>>> Started SelectChannelConnector@0.0.0.0:9449
> >>>>>
> >>>>> Any ideas why this is so. At the moment I have modified my spring
> >>>>> beans to specify
> >>>>> <property name="http://0.0.0.0:9448/SomeOtherService">
> >>>>>
> >>>>> but its nasty, especially as the WSDL now contains this 0.0.0.0
> >>>>> address which looks particularly nasty and causes real problems for
> >>>>> those trying to load the WSDL into soapui on a remote server.
> >>>>> Ideally the wsdl should contain the address of the network interface
> >>>>> it was requested from.
> >>>>>
> >>>>> But if I can just get it so that it deploys to all network interfaces
> >>>>> without me having to specify 0.0.0.0 in the address that would be
> >>>>> ideal.
> >>>>>
> >>>>> I have reasons why I cannot use jaxws:endpoint so please don't
> >>>>> suggest that :-) I just need to know what jaxws:endpoint is doing
> >>>>> differently and replicate that in my spring contexts
> >>>>>
> >>>>> Thanks
> >>>>> Jason
> >>
> >> --
> >> Daniel Kulp
> >> dkulp@apache.org
> >> http://dankulp.com/blog
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean
and Address ever since upgrading to 2.3.X
Posted by Jason Pell <ja...@pellcorp.com>.
Hi,
I discovered if I disabled the following in the applicationContext.xml
<httpj:engine-factory>
<httpj:engine port="9449">
</httpj:engine>
</httpj:engine-factory>
Then the service would no longer be bound to 0.0.0.0, I now get:
SelectChannelConnector@localhost:9449
On Fri, Dec 17, 2010 at 7:31 AM, Jason Pell <ja...@gmail.com> wrote:
> I could see binding to 0.0.0.0 automatically as a security issue I guess?
>
> Sent from my iPhone
>
> On Dec 17, 2010, at 7:20, Daniel Kulp <dk...@apache.org> wrote:
>
>> On Thursday 16 December 2010 3:04:52 pm Jason Pell wrote:
>>> So your tests if I understand it - none of the services are available on
>>> any network interface except the local loop back?
>>
>> That's what I'm seeing with both 2.2.12 and 2.3.1 (and trunk) if the address
>> is set to http://localhost:8080.
>>
>>> So should I be using two endpoints for each service - one for localhost and
>>> one for the external network interface
>>
>> Look like it, yea.
>>
>>> My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is
>>> unexpected?
>>
>> Well, to be honest, I had THOUGHT that that deploying to 0.0.0.0 was the
>> default behavior unless a spring config configured the port to ONLY go on a
>> certain host. I'm not sure why it's NOT doing that, but it doesn't seem to
>> be for me with 2.2.12 so it doesn't seem to be a "regression", but I'm also
>> not sure if its working as designed. I could actually go either way with
>> it. :-)
>>
>> Dan
>>
>>
>>>
>>> Sent from my iPhone
>>>
>>> On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
>>>> Well, I'm not able to reproduce the jaxws:endpoint behavior you describe.
>>>> I
>>>>
>>>> updated a test to have:
>>>> <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
>>>> <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
>>>>
>>>> address="http://localhost:9000/Cxf1332" />
>>>>
>>>> <bean id="ServiceFactory"
>>>>
>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
>>>>
>>>> <property name="serviceBean" ref="ServiceImpl" />
>>>> <property name="start" value="true" />
>>>> <property name="address" value="http://localhost:9001/Cxf1332"/>
>>>>
>>>> </bean>
>>>>
>>>> and then started the factory. I see:
>>>>
>>>> INFO: Started SelectChannelConnector@localhost:9000
>>>> .....
>>>> INFO: Started SelectChannelConnector@localhost:9001
>>>>
>>>>
>>>>
>>>> Now, I CAN reproduce your issue of the above then only being available on
>>>> localhost. However, I don't think this is any different than with
>>>> 2.2.x? I just ran the java_first_jaxws with 2.2.12 server and I get:
>>>>
>>>> INFO: Started SelectChannelConnector@localhost:9000
>>>> and a netstat -an showed it only on localhost and trying to do a get on
>>>> non- localhost doesn't work.
>>>>
>>>>
>>>> Dan
>>>>
>>>> On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
>>>>> Hi,
>>>>>
>>>>> Prior to 2.3.0 this all worked fine...
>>>>>
>>>>> I have a mixture of java first web services I am deploying using both
>>>>> jaxws:endpoint and more directly using
>>>>> org.apache.cxf.jaxws.JaxWsServerFactoryBean
>>>>>
>>>>> When I use a jaxws:endpoint and specify an address of for example:
>>>>>
>>>>> http://localhost:9449/SomeService
>>>>>
>>>>> The service is available on ALL network interfaces because CXF seems
>>>>> to deploy it to 0.0.0.0. However when I manually construct a service
>>>>> using springs beans and JaxWsServerFactoryBean (a subset is included
>>>>> here):
>>>>>
>>>>> <bean id="ServiceFactory"
>>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
>>>>> name="serviceBean" ref="ServiceImpl" />
>>>>>
>>>>> <property name="start" value="false" />
>>>>>
>>>>> <property name="http://localhost:9448/SomeOtherService">
>>>>>
>>>>> </bean>
>>>>>
>>>>> It only gets deployed to localhost.
>>>>>
>>>>> The logs from jetty are different too:
>>>>>
>>>>> org.eclipse.jetty.util.log - Started
>>>>> SelectChannelConnector@localhost:9448 org.eclipse.jetty.util.log -
>>>>> Started SelectChannelConnector@0.0.0.0:9449
>>>>>
>>>>> Any ideas why this is so. At the moment I have modified my spring
>>>>> beans to specify
>>>>> <property name="http://0.0.0.0:9448/SomeOtherService">
>>>>>
>>>>> but its nasty, especially as the WSDL now contains this 0.0.0.0
>>>>> address which looks particularly nasty and causes real problems for
>>>>> those trying to load the WSDL into soapui on a remote server.
>>>>> Ideally the wsdl should contain the address of the network interface
>>>>> it was requested from.
>>>>>
>>>>> But if I can just get it so that it deploys to all network interfaces
>>>>> without me having to specify 0.0.0.0 in the address that would be
>>>>> ideal.
>>>>>
>>>>> I have reasons why I cannot use jaxws:endpoint so please don't suggest
>>>>> that :-) I just need to know what jaxws:endpoint is doing differently
>>>>> and replicate that in my spring contexts
>>>>>
>>>>> Thanks
>>>>> Jason
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://dankulp.com/blog
>
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Jason Pell <ja...@gmail.com>.
I could see binding to 0.0.0.0 automatically as a security issue I guess?
Sent from my iPhone
On Dec 17, 2010, at 7:20, Daniel Kulp <dk...@apache.org> wrote:
> On Thursday 16 December 2010 3:04:52 pm Jason Pell wrote:
>> So your tests if I understand it - none of the services are available on
>> any network interface except the local loop back?
>
> That's what I'm seeing with both 2.2.12 and 2.3.1 (and trunk) if the address
> is set to http://localhost:8080.
>
>> So should I be using two endpoints for each service - one for localhost and
>> one for the external network interface
>
> Look like it, yea.
>
>> My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is
>> unexpected?
>
> Well, to be honest, I had THOUGHT that that deploying to 0.0.0.0 was the
> default behavior unless a spring config configured the port to ONLY go on a
> certain host. I'm not sure why it's NOT doing that, but it doesn't seem to
> be for me with 2.2.12 so it doesn't seem to be a "regression", but I'm also
> not sure if its working as designed. I could actually go either way with
> it. :-)
>
> Dan
>
>
>>
>> Sent from my iPhone
>>
>> On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
>>> Well, I'm not able to reproduce the jaxws:endpoint behavior you describe.
>>> I
>>>
>>> updated a test to have:
>>> <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
>>> <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
>>>
>>> address="http://localhost:9000/Cxf1332" />
>>>
>>> <bean id="ServiceFactory"
>>>
>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
>>>
>>> <property name="serviceBean" ref="ServiceImpl" />
>>> <property name="start" value="true" />
>>> <property name="address" value="http://localhost:9001/Cxf1332"/>
>>>
>>> </bean>
>>>
>>> and then started the factory. I see:
>>>
>>> INFO: Started SelectChannelConnector@localhost:9000
>>> .....
>>> INFO: Started SelectChannelConnector@localhost:9001
>>>
>>>
>>>
>>> Now, I CAN reproduce your issue of the above then only being available on
>>> localhost. However, I don't think this is any different than with
>>> 2.2.x? I just ran the java_first_jaxws with 2.2.12 server and I get:
>>>
>>> INFO: Started SelectChannelConnector@localhost:9000
>>> and a netstat -an showed it only on localhost and trying to do a get on
>>> non- localhost doesn't work.
>>>
>>>
>>> Dan
>>>
>>> On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
>>>> Hi,
>>>>
>>>> Prior to 2.3.0 this all worked fine...
>>>>
>>>> I have a mixture of java first web services I am deploying using both
>>>> jaxws:endpoint and more directly using
>>>> org.apache.cxf.jaxws.JaxWsServerFactoryBean
>>>>
>>>> When I use a jaxws:endpoint and specify an address of for example:
>>>>
>>>> http://localhost:9449/SomeService
>>>>
>>>> The service is available on ALL network interfaces because CXF seems
>>>> to deploy it to 0.0.0.0. However when I manually construct a service
>>>> using springs beans and JaxWsServerFactoryBean (a subset is included
>>>> here):
>>>>
>>>> <bean id="ServiceFactory"
>>>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
>>>> name="serviceBean" ref="ServiceImpl" />
>>>>
>>>> <property name="start" value="false" />
>>>>
>>>> <property name="http://localhost:9448/SomeOtherService">
>>>>
>>>> </bean>
>>>>
>>>> It only gets deployed to localhost.
>>>>
>>>> The logs from jetty are different too:
>>>>
>>>> org.eclipse.jetty.util.log - Started
>>>> SelectChannelConnector@localhost:9448 org.eclipse.jetty.util.log -
>>>> Started SelectChannelConnector@0.0.0.0:9449
>>>>
>>>> Any ideas why this is so. At the moment I have modified my spring
>>>> beans to specify
>>>> <property name="http://0.0.0.0:9448/SomeOtherService">
>>>>
>>>> but its nasty, especially as the WSDL now contains this 0.0.0.0
>>>> address which looks particularly nasty and causes real problems for
>>>> those trying to load the WSDL into soapui on a remote server.
>>>> Ideally the wsdl should contain the address of the network interface
>>>> it was requested from.
>>>>
>>>> But if I can just get it so that it deploys to all network interfaces
>>>> without me having to specify 0.0.0.0 in the address that would be
>>>> ideal.
>>>>
>>>> I have reasons why I cannot use jaxws:endpoint so please don't suggest
>>>> that :-) I just need to know what jaxws:endpoint is doing differently
>>>> and replicate that in my spring contexts
>>>>
>>>> Thanks
>>>> Jason
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 16 December 2010 3:04:52 pm Jason Pell wrote:
> So your tests if I understand it - none of the services are available on
> any network interface except the local loop back?
That's what I'm seeing with both 2.2.12 and 2.3.1 (and trunk) if the address
is set to http://localhost:8080.
> So should I be using two endpoints for each service - one for localhost and
> one for the external network interface
Look like it, yea.
> My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is
> unexpected?
Well, to be honest, I had THOUGHT that that deploying to 0.0.0.0 was the
default behavior unless a spring config configured the port to ONLY go on a
certain host. I'm not sure why it's NOT doing that, but it doesn't seem to
be for me with 2.2.12 so it doesn't seem to be a "regression", but I'm also
not sure if its working as designed. I could actually go either way with
it. :-)
Dan
>
> Sent from my iPhone
>
> On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
> > Well, I'm not able to reproduce the jaxws:endpoint behavior you describe.
> > I
> >
> > updated a test to have:
> > <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
> > <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
> >
> > address="http://localhost:9000/Cxf1332" />
> >
> > <bean id="ServiceFactory"
> >
> > class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
> >
> > <property name="serviceBean" ref="ServiceImpl" />
> > <property name="start" value="true" />
> > <property name="address" value="http://localhost:9001/Cxf1332"/>
> >
> > </bean>
> >
> > and then started the factory. I see:
> >
> > INFO: Started SelectChannelConnector@localhost:9000
> > .....
> > INFO: Started SelectChannelConnector@localhost:9001
> >
> >
> >
> > Now, I CAN reproduce your issue of the above then only being available on
> > localhost. However, I don't think this is any different than with
> > 2.2.x? I just ran the java_first_jaxws with 2.2.12 server and I get:
> >
> > INFO: Started SelectChannelConnector@localhost:9000
> > and a netstat -an showed it only on localhost and trying to do a get on
> > non- localhost doesn't work.
> >
> >
> > Dan
> >
> > On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
> >> Hi,
> >>
> >> Prior to 2.3.0 this all worked fine...
> >>
> >> I have a mixture of java first web services I am deploying using both
> >> jaxws:endpoint and more directly using
> >> org.apache.cxf.jaxws.JaxWsServerFactoryBean
> >>
> >> When I use a jaxws:endpoint and specify an address of for example:
> >>
> >> http://localhost:9449/SomeService
> >>
> >> The service is available on ALL network interfaces because CXF seems
> >> to deploy it to 0.0.0.0. However when I manually construct a service
> >> using springs beans and JaxWsServerFactoryBean (a subset is included
> >> here):
> >>
> >> <bean id="ServiceFactory"
> >> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
> >> name="serviceBean" ref="ServiceImpl" />
> >>
> >> <property name="start" value="false" />
> >>
> >> <property name="http://localhost:9448/SomeOtherService">
> >>
> >> </bean>
> >>
> >> It only gets deployed to localhost.
> >>
> >> The logs from jetty are different too:
> >>
> >> org.eclipse.jetty.util.log - Started
> >> SelectChannelConnector@localhost:9448 org.eclipse.jetty.util.log -
> >> Started SelectChannelConnector@0.0.0.0:9449
> >>
> >> Any ideas why this is so. At the moment I have modified my spring
> >> beans to specify
> >> <property name="http://0.0.0.0:9448/SomeOtherService">
> >>
> >> but its nasty, especially as the WSDL now contains this 0.0.0.0
> >> address which looks particularly nasty and causes real problems for
> >> those trying to load the WSDL into soapui on a remote server.
> >> Ideally the wsdl should contain the address of the network interface
> >> it was requested from.
> >>
> >> But if I can just get it so that it deploys to all network interfaces
> >> without me having to specify 0.0.0.0 in the address that would be
> >> ideal.
> >>
> >> I have reasons why I cannot use jaxws:endpoint so please don't suggest
> >> that :-) I just need to know what jaxws:endpoint is doing differently
> >> and replicate that in my spring contexts
> >>
> >> Thanks
> >> Jason
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Jason Pell <ja...@gmail.com>.
So your tests if I understand it - none of the services are available on any network interface except the local loop back?
So should I be using two endpoints for each service - one for localhost and one for the external network interface
My current behavior of jaxws:endpoint being deployed to 0.0.0.0 is unexpected?
Sent from my iPhone
On Dec 17, 2010, at 5:57, Daniel Kulp <dk...@apache.org> wrote:
>
> Well, I'm not able to reproduce the jaxws:endpoint behavior you describe. I
> updated a test to have:
>
> <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
> <jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
> address="http://localhost:9000/Cxf1332" />
>
> <bean id="ServiceFactory"
> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
> <property name="serviceBean" ref="ServiceImpl" />
> <property name="start" value="true" />
> <property name="address" value="http://localhost:9001/Cxf1332"/>
> </bean>
>
> and then started the factory. I see:
>
> INFO: Started SelectChannelConnector@localhost:9000
> .....
> INFO: Started SelectChannelConnector@localhost:9001
>
>
>
> Now, I CAN reproduce your issue of the above then only being available on
> localhost. However, I don't think this is any different than with 2.2.x?
> I just ran the java_first_jaxws with 2.2.12 server and I get:
>
> INFO: Started SelectChannelConnector@localhost:9000
> and a netstat -an showed it only on localhost and trying to do a get on non-
> localhost doesn't work.
>
>
> Dan
>
>
>
> On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
>> Hi,
>>
>> Prior to 2.3.0 this all worked fine...
>>
>> I have a mixture of java first web services I am deploying using both
>> jaxws:endpoint and more directly using
>> org.apache.cxf.jaxws.JaxWsServerFactoryBean
>>
>> When I use a jaxws:endpoint and specify an address of for example:
>>
>> http://localhost:9449/SomeService
>>
>> The service is available on ALL network interfaces because CXF seems
>> to deploy it to 0.0.0.0. However when I manually construct a service
>> using springs beans and JaxWsServerFactoryBean (a subset is included
>> here):
>>
>> <bean id="ServiceFactory"
>> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
>> name="serviceBean" ref="ServiceImpl" />
>> <property name="start" value="false" />
>> <property name="http://localhost:9448/SomeOtherService">
>> </bean>
>>
>> It only gets deployed to localhost.
>>
>> The logs from jetty are different too:
>>
>> org.eclipse.jetty.util.log - Started SelectChannelConnector@localhost:9448
>> org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:9449
>>
>> Any ideas why this is so. At the moment I have modified my spring
>> beans to specify
>> <property name="http://0.0.0.0:9448/SomeOtherService">
>>
>> but its nasty, especially as the WSDL now contains this 0.0.0.0
>> address which looks particularly nasty and causes real problems for
>> those trying to load the WSDL into soapui on a remote server.
>> Ideally the wsdl should contain the address of the network interface
>> it was requested from.
>>
>> But if I can just get it so that it deploys to all network interfaces
>> without me having to specify 0.0.0.0 in the address that would be
>> ideal.
>>
>> I have reasons why I cannot use jaxws:endpoint so please don't suggest
>> that :-) I just need to know what jaxws:endpoint is doing differently
>> and replicate that in my spring contexts
>>
>> Thanks
>> Jason
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
Re: Weird issue with jaxws:endpoint vs org.apache.cxf.jaxws.JaxWsServerFactoryBean and Address ever since upgrading to 2.3.X
Posted by Daniel Kulp <dk...@apache.org>.
Well, I'm not able to reproduce the jaxws:endpoint behavior you describe. I
updated a test to have:
<bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl"/>
<jaxws:endpoint id="cxf1332" implementor="#ServiceImpl"
address="http://localhost:9000/Cxf1332" />
<bean id="ServiceFactory"
class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
<property name="serviceBean" ref="ServiceImpl" />
<property name="start" value="true" />
<property name="address" value="http://localhost:9001/Cxf1332"/>
</bean>
and then started the factory. I see:
INFO: Started SelectChannelConnector@localhost:9000
.....
INFO: Started SelectChannelConnector@localhost:9001
Now, I CAN reproduce your issue of the above then only being available on
localhost. However, I don't think this is any different than with 2.2.x?
I just ran the java_first_jaxws with 2.2.12 server and I get:
INFO: Started SelectChannelConnector@localhost:9000
and a netstat -an showed it only on localhost and trying to do a get on non-
localhost doesn't work.
Dan
On Wednesday 15 December 2010 8:24:46 am Jason Pell wrote:
> Hi,
>
> Prior to 2.3.0 this all worked fine...
>
> I have a mixture of java first web services I am deploying using both
> jaxws:endpoint and more directly using
> org.apache.cxf.jaxws.JaxWsServerFactoryBean
>
> When I use a jaxws:endpoint and specify an address of for example:
>
> http://localhost:9449/SomeService
>
> The service is available on ALL network interfaces because CXF seems
> to deploy it to 0.0.0.0. However when I manually construct a service
> using springs beans and JaxWsServerFactoryBean (a subset is included
> here):
>
> <bean id="ServiceFactory"
> class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"> <property
> name="serviceBean" ref="ServiceImpl" />
> <property name="start" value="false" />
> <property name="http://localhost:9448/SomeOtherService">
> </bean>
>
> It only gets deployed to localhost.
>
> The logs from jetty are different too:
>
> org.eclipse.jetty.util.log - Started SelectChannelConnector@localhost:9448
> org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:9449
>
> Any ideas why this is so. At the moment I have modified my spring
> beans to specify
> <property name="http://0.0.0.0:9448/SomeOtherService">
>
> but its nasty, especially as the WSDL now contains this 0.0.0.0
> address which looks particularly nasty and causes real problems for
> those trying to load the WSDL into soapui on a remote server.
> Ideally the wsdl should contain the address of the network interface
> it was requested from.
>
> But if I can just get it so that it deploys to all network interfaces
> without me having to specify 0.0.0.0 in the address that would be
> ideal.
>
> I have reasons why I cannot use jaxws:endpoint so please don't suggest
> that :-) I just need to know what jaxws:endpoint is doing differently
> and replicate that in my spring contexts
>
> Thanks
> Jason
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog