You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Edwin Quita <ed...@gmail.com> on 2009/12/01 15:39:03 UTC
DOSGi - how do i change http port?
hello codesmiths,
i'm using the multiple bundle distribution of DOSGi, just want to know
how do i change the http port for the endpoint in the samples included
in the distribution.
thanks,
kits
Re: DOSGi - how do i change http port?
Posted by David Bosschaert <da...@gmail.com>.
Hi Kits,
If you're using the built-in Jetty from CXF (which is the default) you
simply put the port you want in the org.apache.cxf.ws.address
property, e.g. for port 9876 you do
props.put("org.apache.cxf.ws.address", "http://localhost:9876/greeter")
If you're using the OSGi Http Service instead (by setting the
org.apache.cxf.ws.httpservice.context property), this is configured
separately dependending on the Http Service implementation. In most
cases you can configure it through the 'org.osgi.service.http.port'
property.
Hope this helps,
David
2009/12/1 Edwin Quita <ed...@gmail.com>:
> hello codesmiths,
>
> i'm using the multiple bundle distribution of DOSGi, just want to know
> how do i change the http port for the endpoint in the samples included
> in the distribution.
>
> thanks,
> kits
>
Re: DOSGi - how do i change http port?
Posted by Bernd Wiswedel <Be...@gmail.com>.
Yepp, I can get the a greeter-like demo to work on a complete fresh
workspace. I think I will take it from there and import my bundles into that
workspace until I hit the problem.
Thanks again for all your support!
Bernd
--
View this message in context: http://old.nabble.com/DOSGi---how-do-i-change-http-port--tp26592896p26627743.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: DOSGi - how do i change http port?
Posted by da...@apache.org.
Hi Bernd,
This warning is non-fatal in many cases (although I agree its ugly and
should be fixed). In many cases it just applies to validation of the
XML.
Could you simply try the greeter demo and see if you can get that to
work changing the port etc. Just to eliminate a number of basic
potential problems.
Best regards,
David
2009/12/3 Bernd Wiswedel <Be...@gmail.com>:
>
> Hi David, Sergey,
>
> Thanks for helping me out with that (and testing it). I also went ahead and
> imported the new bundles. I see the new URL popping up as (one of the many
> INFO) messages in the console but the wsdl is not actually published. The
> error that is printed last is:
>
> INFO: Did not remote service org.knime.dosgi.test.TemperatureService because
> intent SOAP could not be satisfied
>
> And further up I see the stack trace:
> WARNING: Intent map load failed:
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Unable to locate Spring NamespaceHandler for XML schema
> namespace [http://cxf.apache.org/policy]
> Offending resource: OSGi resource[classpath:/OSGI-INF/cxf/intents/intent-
> map.xml|bnd.id=3318|bnd.sym=cxf-dosgi-ri-dsw-cxf]
> org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
>
> I found the exact same error message in another post
> (http://old.nabble.com/CXF-DOSGI-%2B-Equinox-Servlet-Bridge-td24355153.html)
> but couldn't really identify the "here is the solution part" in that lengthy
> post (if there is one).
>
> Best regards,
> Bernd
>
Re: DOSGi - how do i change http port?
Posted by Bernd Wiswedel <Be...@gmail.com>.
Hi David, Sergey,
Thanks for helping me out with that (and testing it). I also went ahead and
imported the new bundles. I see the new URL popping up as (one of the many
INFO) messages in the console but the wsdl is not actually published. The
error that is printed last is:
INFO: Did not remote service org.knime.dosgi.test.TemperatureService because
intent SOAP could not be satisfied
And further up I see the stack trace:
WARNING: Intent map load failed:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema
namespace [http://cxf.apache.org/policy]
Offending resource: OSGi resource[classpath:/OSGI-INF/cxf/intents/intent-
map.xml|bnd.id=3318|bnd.sym=cxf-dosgi-ri-dsw-cxf]
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
I found the exact same error message in another post
(http://old.nabble.com/CXF-DOSGI-%2B-Equinox-Servlet-Bridge-td24355153.html)
but couldn't really identify the "here is the solution part" in that lengthy
post (if there is one).
Best regards,
Bernd
Re: DOSGi - how do i change http port?
Posted by da...@apache.org.
Yeah, I just tried this with the 1.1 distro
(http://cxf.apache.org/dosgi-releases.html) and the greeter demo
(http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html).
Just changed the line in the service impl:
props.put("org.apache.cxf.ws.address", "http://localhost:9090/greeter");
to
props.put("org.apache.cxf.ws.address", "http://localhost:9876/greeter");
and now I can check the service's WSDL at http://localhost:9876/greeter?wsdl
So it seems to work fine, at least with the simple aegis-based
frontend which is used by default.
The reason why your setup doen't work with 1.0 is that some of the
properties you're using are added as part of the spec compliancy work
done after 1.0. They are supported in 1.1.
Best regards,
David
2009/12/2 Sergey Beryozkin <se...@iona.com>:
>
>> cxf-dosgi-ri-multibundle-distribution-1.0.tar.gz
>
> Please use a 1.1 distribution
>
> thanks, Sergey
>
>
> Bernd Wiswedel (2) wrote:
>>
>>
>> It doesn't help. It still uses the default endpoint. I even started over
>> from
>> scratch and followed 1:1 the steps described online for setting up eclipse
>> (literally copying the interface and service class). No jaxws, no jaxb,
>> just
>> the defaults...
>>
>> The "org.apache.cxf.ws.address" property doesn't seem to have any effect.
>> Any
>> other information that I can provide you with? It's eclipse 3.5 with some
>> additional features like Birt, GEF, ... no fancy things (which shouldn't
>> matter anyway since I removed all from the run configuration, except for
>> the
>> required plugins) + the bundles from cxf-dosgi-ri-multibundle-
>> distribution-1.0.tar.gz
>>
>> Thanks for your help!
>> Bernd
>>
>> On Wednesday, 2. December 2009, Sergey Beryozkin wrote:
>>> Hi
>>>
>>> we chatted a bit with David about it, perhaps the fact that you're using
>>> a
>>> jaxws frontend is what affecting it ? It should not actually, but please
>>> try just remove this property and see what happens...
>>>
>>> > I have to admit that I can't get it to work that way. I'm using eclipse
>>> > and followed the instructions listed on
>>> >
>>> http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distri
>>> >buted-osgi.html. My plugin activator writes in its start method:
>>> > props.put("osgi.remote.interfaces", "*");
>>> > props.put("service.exported.configs", "org.apache.cxf.ws");
>>> > props.put("org.apache.cxf.ws.address",
>>> > "http://localhost:9090/someotherurl");
>>> > props.put("org.apache.cxf.ws.frontend", "jaxws");
>>> >
>>> > But once I start the OSGi Framework it publishes the services at
>>> > http://localhost:9000/org/knime/dosgi/test/TemperatureService?wsdl.
>>> >
>>> > During start-up it also complains:
>>> > "WARNING: A JAX-WS Annotation was found on
>>> > org.knime.dosgi.test.TemperatureService while using the Simple
>>> frontend.
>>> > For better results, use the JAX-WS frontend."
>>>
>>> This is an Aegis warning, you'd probably want to use JAXWS with JAXB :
>>>
>>> props.put("org.apache.cxf.ws.frontend", "jaxws");
>>> props.put("org.apache.cxf.ws.databinding", "jaxb");
>>>
>>> or just drop JAXWS altogether
>>>
>>> hope it helps, Sergey
>>>
>>> > If I then enter "osgi> status org.knime.dosgi.test_1.0.0.qualifier"
>>> into
>>> > the OSGi console, it writes a lot of status messages, including:
>>> > {org.knime.dosgi.test.TemperatureService}=
>>> > {org.apache.cxf.ws.address=http://localhost:9090/someotherurl,
>>> > org.apache.cxf.ws.frontend=jaxws, osgi.remote.interfaces=*,
>>> > service.exported.configs=org.apache.cxf.ws, service.id=160}
>>> >
>>> > {org.osgi.service.discovery.ServicePublication}=
>>> >
>>> >
>>> {osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test
>>> >/TemperatureService,
>>> osgi.remote.discovery.publication.service.properties=
>>> > {osgi.remote.interfaces=*,
>>> >
>>> >
>>> osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/
>>> >TemperatureService},
>>> >
>>> osgi.remote.service.interfaces=[org.knime.dosgi.test.TemperatureService],
>>> > osgi.remote.endpoint.id=0e2d38c2-cb11-41c4-8374-2b0fbad884cc,
>>> > service.id=161}
>>> >
>>> > So obviously my parameters are associated with the service but not
>>> > properly picked up ServicePublication.
>>> >
>>> > Help?!
>>> >
>>> > Thanks,
>>> > Bernd
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/DOSGi---how-do-i-change-http-port--tp26592896p26616526.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
Re: DOSGi - how do i change http port?
Posted by Sergey Beryozkin <se...@iona.com>.
> cxf-dosgi-ri-multibundle-distribution-1.0.tar.gz
Please use a 1.1 distribution
thanks, Sergey
Bernd Wiswedel (2) wrote:
>
>
> It doesn't help. It still uses the default endpoint. I even started over
> from
> scratch and followed 1:1 the steps described online for setting up eclipse
> (literally copying the interface and service class). No jaxws, no jaxb,
> just
> the defaults...
>
> The "org.apache.cxf.ws.address" property doesn't seem to have any effect.
> Any
> other information that I can provide you with? It's eclipse 3.5 with some
> additional features like Birt, GEF, ... no fancy things (which shouldn't
> matter anyway since I removed all from the run configuration, except for
> the
> required plugins) + the bundles from cxf-dosgi-ri-multibundle-
> distribution-1.0.tar.gz
>
> Thanks for your help!
> Bernd
>
> On Wednesday, 2. December 2009, Sergey Beryozkin wrote:
>> Hi
>>
>> we chatted a bit with David about it, perhaps the fact that you're using
>> a
>> jaxws frontend is what affecting it ? It should not actually, but please
>> try just remove this property and see what happens...
>>
>> > I have to admit that I can't get it to work that way. I'm using eclipse
>> > and followed the instructions listed on
>> >
>> http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distri
>> >buted-osgi.html. My plugin activator writes in its start method:
>> > props.put("osgi.remote.interfaces", "*");
>> > props.put("service.exported.configs", "org.apache.cxf.ws");
>> > props.put("org.apache.cxf.ws.address",
>> > "http://localhost:9090/someotherurl");
>> > props.put("org.apache.cxf.ws.frontend", "jaxws");
>> >
>> > But once I start the OSGi Framework it publishes the services at
>> > http://localhost:9000/org/knime/dosgi/test/TemperatureService?wsdl.
>> >
>> > During start-up it also complains:
>> > "WARNING: A JAX-WS Annotation was found on
>> > org.knime.dosgi.test.TemperatureService while using the Simple
>> frontend.
>> > For better results, use the JAX-WS frontend."
>>
>> This is an Aegis warning, you'd probably want to use JAXWS with JAXB :
>>
>> props.put("org.apache.cxf.ws.frontend", "jaxws");
>> props.put("org.apache.cxf.ws.databinding", "jaxb");
>>
>> or just drop JAXWS altogether
>>
>> hope it helps, Sergey
>>
>> > If I then enter "osgi> status org.knime.dosgi.test_1.0.0.qualifier"
>> into
>> > the OSGi console, it writes a lot of status messages, including:
>> > {org.knime.dosgi.test.TemperatureService}=
>> > {org.apache.cxf.ws.address=http://localhost:9090/someotherurl,
>> > org.apache.cxf.ws.frontend=jaxws, osgi.remote.interfaces=*,
>> > service.exported.configs=org.apache.cxf.ws, service.id=160}
>> >
>> > {org.osgi.service.discovery.ServicePublication}=
>> >
>> >
>> {osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test
>> >/TemperatureService,
>> osgi.remote.discovery.publication.service.properties=
>> > {osgi.remote.interfaces=*,
>> >
>> >
>> osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/
>> >TemperatureService},
>> >
>> osgi.remote.service.interfaces=[org.knime.dosgi.test.TemperatureService],
>> > osgi.remote.endpoint.id=0e2d38c2-cb11-41c4-8374-2b0fbad884cc,
>> > service.id=161}
>> >
>> > So obviously my parameters are associated with the service but not
>> > properly picked up ServicePublication.
>> >
>> > Help?!
>> >
>> > Thanks,
>> > Bernd
>>
>
>
--
View this message in context: http://old.nabble.com/DOSGi---how-do-i-change-http-port--tp26592896p26616526.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: DOSGi - how do i change http port?
Posted by Bernd Wiswedel <be...@gmail.com>.
It doesn't help. It still uses the default endpoint. I even started over from
scratch and followed 1:1 the steps described online for setting up eclipse
(literally copying the interface and service class). No jaxws, no jaxb, just
the defaults...
The "org.apache.cxf.ws.address" property doesn't seem to have any effect. Any
other information that I can provide you with? It's eclipse 3.5 with some
additional features like Birt, GEF, ... no fancy things (which shouldn't
matter anyway since I removed all from the run configuration, except for the
required plugins) + the bundles from cxf-dosgi-ri-multibundle-
distribution-1.0.tar.gz
Thanks for your help!
Bernd
On Wednesday, 2. December 2009, Sergey Beryozkin wrote:
> Hi
>
> we chatted a bit with David about it, perhaps the fact that you're using a
> jaxws frontend is what affecting it ? It should not actually, but please
> try just remove this property and see what happens...
>
> > I have to admit that I can't get it to work that way. I'm using eclipse
> > and followed the instructions listed on
> > http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distri
> >buted-osgi.html. My plugin activator writes in its start method:
> > props.put("osgi.remote.interfaces", "*");
> > props.put("service.exported.configs", "org.apache.cxf.ws");
> > props.put("org.apache.cxf.ws.address",
> > "http://localhost:9090/someotherurl");
> > props.put("org.apache.cxf.ws.frontend", "jaxws");
> >
> > But once I start the OSGi Framework it publishes the services at
> > http://localhost:9000/org/knime/dosgi/test/TemperatureService?wsdl.
> >
> > During start-up it also complains:
> > "WARNING: A JAX-WS Annotation was found on
> > org.knime.dosgi.test.TemperatureService while using the Simple frontend.
> > For better results, use the JAX-WS frontend."
>
> This is an Aegis warning, you'd probably want to use JAXWS with JAXB :
>
> props.put("org.apache.cxf.ws.frontend", "jaxws");
> props.put("org.apache.cxf.ws.databinding", "jaxb");
>
> or just drop JAXWS altogether
>
> hope it helps, Sergey
>
> > If I then enter "osgi> status org.knime.dosgi.test_1.0.0.qualifier" into
> > the OSGi console, it writes a lot of status messages, including:
> > {org.knime.dosgi.test.TemperatureService}=
> > {org.apache.cxf.ws.address=http://localhost:9090/someotherurl,
> > org.apache.cxf.ws.frontend=jaxws, osgi.remote.interfaces=*,
> > service.exported.configs=org.apache.cxf.ws, service.id=160}
> >
> > {org.osgi.service.discovery.ServicePublication}=
> >
> > {osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test
> >/TemperatureService, osgi.remote.discovery.publication.service.properties=
> > {osgi.remote.interfaces=*,
> >
> > osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/
> >TemperatureService},
> > osgi.remote.service.interfaces=[org.knime.dosgi.test.TemperatureService],
> > osgi.remote.endpoint.id=0e2d38c2-cb11-41c4-8374-2b0fbad884cc,
> > service.id=161}
> >
> > So obviously my parameters are associated with the service but not
> > properly picked up ServicePublication.
> >
> > Help?!
> >
> > Thanks,
> > Bernd
>
Re: DOSGi - how do i change http port?
Posted by Sergey Beryozkin <sb...@progress.com>.
Hi
we chatted a bit with David about it, perhaps the fact that you're using a jaxws frontend is what affecting it ? It should not
actually, but please try just remove this property and see what happens...
>
> I have to admit that I can't get it to work that way. I'm using eclipse and
> followed the instructions listed on
> http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distributed-osgi.html.
> My plugin activator writes in its start method:
> props.put("osgi.remote.interfaces", "*");
> props.put("service.exported.configs", "org.apache.cxf.ws");
> props.put("org.apache.cxf.ws.address",
> "http://localhost:9090/someotherurl");
> props.put("org.apache.cxf.ws.frontend", "jaxws");
>
> But once I start the OSGi Framework it publishes the services at
> http://localhost:9000/org/knime/dosgi/test/TemperatureService?wsdl.
>
> During start-up it also complains:
> "WARNING: A JAX-WS Annotation was found on
> org.knime.dosgi.test.TemperatureService while using the Simple frontend.
> For better results, use the JAX-WS frontend."
This is an Aegis warning, you'd probably want to use JAXWS with JAXB :
props.put("org.apache.cxf.ws.frontend", "jaxws");
props.put("org.apache.cxf.ws.databinding", "jaxb");
or just drop JAXWS altogether
hope it helps, Sergey
>
> If I then enter "osgi> status org.knime.dosgi.test_1.0.0.qualifier" into the
> OSGi console, it writes a lot of status messages, including:
> {org.knime.dosgi.test.TemperatureService}=
> {org.apache.cxf.ws.address=http://localhost:9090/someotherurl,
> org.apache.cxf.ws.frontend=jaxws, osgi.remote.interfaces=*,
> service.exported.configs=org.apache.cxf.ws, service.id=160}
>
> {org.osgi.service.discovery.ServicePublication}=
>
> {osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/TemperatureService,
> osgi.remote.discovery.publication.service.properties=
> {osgi.remote.interfaces=*,
>
> osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/TemperatureService},
> osgi.remote.service.interfaces=[org.knime.dosgi.test.TemperatureService],
> osgi.remote.endpoint.id=0e2d38c2-cb11-41c4-8374-2b0fbad884cc,
> service.id=161}
>
> So obviously my parameters are associated with the service but not properly
> picked up ServicePublication.
>
> Help?!
>
> Thanks,
> Bernd
>
> --
> View this message in context: http://old.nabble.com/DOSGi---how-do-i-change-http-port--tp26592896p26609063.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: DOSGi - how do i change http port?
Posted by Bernd Wiswedel <Be...@gmail.com>.
I have to admit that I can't get it to work that way. I'm using eclipse and
followed the instructions listed on
http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distributed-osgi.html.
My plugin activator writes in its start method:
props.put("osgi.remote.interfaces", "*");
props.put("service.exported.configs", "org.apache.cxf.ws");
props.put("org.apache.cxf.ws.address",
"http://localhost:9090/someotherurl");
props.put("org.apache.cxf.ws.frontend", "jaxws");
But once I start the OSGi Framework it publishes the services at
http://localhost:9000/org/knime/dosgi/test/TemperatureService?wsdl.
During start-up it also complains:
"WARNING: A JAX-WS Annotation was found on
org.knime.dosgi.test.TemperatureService while using the Simple frontend.
For better results, use the JAX-WS frontend."
If I then enter "osgi> status org.knime.dosgi.test_1.0.0.qualifier" into the
OSGi console, it writes a lot of status messages, including:
{org.knime.dosgi.test.TemperatureService}=
{org.apache.cxf.ws.address=http://localhost:9090/someotherurl,
org.apache.cxf.ws.frontend=jaxws, osgi.remote.interfaces=*,
service.exported.configs=org.apache.cxf.ws, service.id=160}
{org.osgi.service.discovery.ServicePublication}=
{osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/TemperatureService,
osgi.remote.discovery.publication.service.properties=
{osgi.remote.interfaces=*,
osgi.remote.endpoint.location=http://localhost:9000/org/knime/dosgi/test/TemperatureService},
osgi.remote.service.interfaces=[org.knime.dosgi.test.TemperatureService],
osgi.remote.endpoint.id=0e2d38c2-cb11-41c4-8374-2b0fbad884cc,
service.id=161}
So obviously my parameters are associated with the service but not properly
picked up ServicePublication.
Help?!
Thanks,
Bernd
--
View this message in context: http://old.nabble.com/DOSGi---how-do-i-change-http-port--tp26592896p26609063.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: DOSGi - how do i change http port?
Posted by Eoghan Glynn <eo...@gmail.com>.
In most of the demos, the "org.apache.cxf.ws.address" property is set in
some way (either programmatically, or in the DS or Spring-DM config).
This URL will include the listen port you wanted to change. So for example
you could change http://localhost:9000/... to http://localhost:9001/...
Cheers,
Eoghan
2009/12/1 Edwin Quita <ed...@gmail.com>
> hello codesmiths,
>
> i'm using the multiple bundle distribution of DOSGi, just want to know
> how do i change the http port for the endpoint in the samples included
> in the distribution.
>
> thanks,
> kits
>