You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <se...@iona.com> on 2007/09/12 13:54:32 UTC
cxf servlet and jaxws:endpoint questions
Hi
I have few questions with respect to deploying a cxf servlet into tomcat :
* how to use/combine correctly a servlet's url pattern and an jaxws:endpoint/@address values ?
For example, suppose I have a webapp "test" and I want my servlet to recognize this pattern : /hello/world
As such, I'd like
GET http://localhost:8080/test/hello/world?wsdl
to return me a wsdl.
In web.xml I've tried
/hello/*
/hello/world
and in jaxws:endpoint/@address I tried
/hello/world
/world
with no luck, the above request returns no service is available
* what is the difference between jaxws:endpoint/@implementer and jaxws:endpoint/@implementerClass attributes ?
Thanks, Sergey
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: cxf servlet and jaxws:endpoint questions
Posted by Willem Jiang <ni...@iona.com>.
Hi Sergey,
There are some tricks in the CXF servlet transport.
Because we need to support the generate the service address dynamically
with the different request, all the magical thing happened in the
ServletController's updateDests method.
In this way, we can support http://localhost/myapp/services/GreetMe and
http://MyBox/myapp/services/GreetMe at the same time.
And jaxws:endpoint/@address just a suffix of the address.
If you specify the address with /services/GreetMe , you have to access
the endpoint with the URL like
http://localhost/myapp/services/services/GreetMe
Willem.
Sergey Beryozkin wrote:
> HI
>
> Just a follow-up question...
> So is the rule of thumb is to use wildcard url patterns, like "/services/*" and then use jaxws:endpoint/@address
> values like "/GreetMe" ?
>
> I'm wondering why specifying a pattern like "/services/GreetMe" doesn work...Casually glancing through a servler code didn't give me an answer so I'll probably have to look harder :-).
>
> Cheers, Sergey
>
>
> ----- Original Message -----
> From: "Sergey Beryozkin" <se...@iona.com>
> To: <cx...@incubator.apache.org>
> Sent: Wednesday, September 12, 2007 1:22 PM
> Subject: Re: cxf servlet and jaxws:endpoint questions
>
>
> Hi Chris
>
> It does work, super !
> Thanks for a quick reply,
> Sergey
>
> ----- Original Message -----
> From: "Christopher Moesel" <Ch...@avid.com>
> To: <cx...@incubator.apache.org>
> Sent: Wednesday, September 12, 2007 1:14 PM
> Subject: RE: cxf servlet and jaxws:endpoint questions
>
>
> Hi Sergey,
>
> The following combination *should* work...
>
> In web.xml, the url-pattern for the servlet-mapping:
> /hello/*
>
> In the jaxws:endpoint/@address:
> /world
>
> I believe that the difference between implementor and implementorClass
> is this:
>
> implementor: a reference to an *instance* of your SEI implementation (in
> Spring, you use this style: #myServiceEndpointImp)
>
> implementorClass: the fully qualified classname of your SEI
> implementation, which must have a default constructor (for example,
> com.mycompany.MyServiceEndpointImpl)
>
> I hope that helps!
>
> -Chris
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
> Sent: Wednesday, September 12, 2007 7:55 AM
> To: cxf-user@incubator.apache.org
> Subject: cxf servlet and jaxws:endpoint questions
>
> Hi
>
> I have few questions with respect to deploying a cxf servlet into tomcat
> :
>
> * how to use/combine correctly a servlet's url pattern and an
> jaxws:endpoint/@address values ?
>
> For example, suppose I have a webapp "test" and I want my servlet to
> recognize this pattern : /hello/world
>
> As such, I'd like
> GET http://localhost:8080/test/hello/world?wsdl
>
> to return me a wsdl.
>
> In web.xml I've tried
> /hello/*
> /hello/world
>
> and in jaxws:endpoint/@address I tried
> /hello/world
> /world
>
> with no luck, the above request returns no service is available
>
> * what is the difference between jaxws:endpoint/@implementer and
> jaxws:endpoint/@implementerClass attributes ?
>
> Thanks, Sergey
>
>
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
>
Re: cxf servlet and jaxws:endpoint questions
Posted by Willem Jiang <ni...@iona.com>.
Hi Sergey,
It is a long story.
As you know jaxws:endpoint came form the RI's endpoint.xml, it only
specifies the implementor's class name.
So jaxws:endpoint/@implementor support implementor class name and Spring
bean's reference.
Because of Spring 's AOP will use proxy to do some enhance work , if we
specify a Spring bean's reference with the AOP involved , we can't get
the SEI class from the implementor class.
And then we add the jaxws:endpoint/@implementorClass .
If you take a look at the ServerFactoryBean (CXF internal API) , You can
take the directly mapping the implementor to the serviceBean , and
implementor class to the serviceClass.
Cheers,
Willem.
Sergey Beryozkin wrote:
> By the way, using jaxws:endpoint/@implementorClass does not work at all for me in a servlet env, but when I use 'implementor' to point to a fuly-qualified class then things are fine. I'm inclined to open a bug, is it really bug though ?
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Sergey Beryozkin" <se...@iona.com>
> To: <cx...@incubator.apache.org>
> Sent: Wednesday, September 12, 2007 1:35 PM
> Subject: Re: cxf servlet and jaxws:endpoint questions
>
>
> HI
>
> Just a follow-up question...
> So is the rule of thumb is to use wildcard url patterns, like "/services/*" and then use jaxws:endpoint/@address
> values like "/GreetMe" ?
>
> I'm wondering why specifying a pattern like "/services/GreetMe" doesn work...Casually glancing through a servler code didn't give me an answer so I'll probably have to look harder :-).
>
> Cheers, Sergey
>
>
> ----- Original Message -----
> From: "Sergey Beryozkin" <se...@iona.com>
> To: <cx...@incubator.apache.org>
> Sent: Wednesday, September 12, 2007 1:22 PM
> Subject: Re: cxf servlet and jaxws:endpoint questions
>
>
> Hi Chris
>
> It does work, super !
> Thanks for a quick reply,
> Sergey
>
> ----- Original Message -----
> From: "Christopher Moesel" <Ch...@avid.com>
> To: <cx...@incubator.apache.org>
> Sent: Wednesday, September 12, 2007 1:14 PM
> Subject: RE: cxf servlet and jaxws:endpoint questions
>
>
> Hi Sergey,
>
> The following combination *should* work...
>
> In web.xml, the url-pattern for the servlet-mapping:
> /hello/*
>
> In the jaxws:endpoint/@address:
> /world
>
> I believe that the difference between implementor and implementorClass
> is this:
>
> implementor: a reference to an *instance* of your SEI implementation (in
> Spring, you use this style: #myServiceEndpointImp)
>
> implementorClass: the fully qualified classname of your SEI
> implementation, which must have a default constructor (for example,
> com.mycompany.MyServiceEndpointImpl)
>
> I hope that helps!
>
> -Chris
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
> Sent: Wednesday, September 12, 2007 7:55 AM
> To: cxf-user@incubator.apache.org
> Subject: cxf servlet and jaxws:endpoint questions
>
> Hi
>
> I have few questions with respect to deploying a cxf servlet into tomcat
> :
>
> * how to use/combine correctly a servlet's url pattern and an
> jaxws:endpoint/@address values ?
>
> For example, suppose I have a webapp "test" and I want my servlet to
> recognize this pattern : /hello/world
>
> As such, I'd like
> GET http://localhost:8080/test/hello/world?wsdl
>
> to return me a wsdl.
>
> In web.xml I've tried
> /hello/*
> /hello/world
>
> and in jaxws:endpoint/@address I tried
> /hello/world
> /world
>
> with no luck, the above request returns no service is available
>
> * what is the difference between jaxws:endpoint/@implementer and
> jaxws:endpoint/@implementerClass attributes ?
>
> Thanks, Sergey
>
>
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
>
Re: cxf servlet and jaxws:endpoint questions
Posted by Sergey Beryozkin <se...@iona.com>.
By the way, using jaxws:endpoint/@implementorClass does not work at all for me in a servlet env, but when I use 'implementor' to point to a fuly-qualified class then things are fine. I'm inclined to open a bug, is it really bug though ?
Cheers, Sergey
----- Original Message -----
From: "Sergey Beryozkin" <se...@iona.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:35 PM
Subject: Re: cxf servlet and jaxws:endpoint questions
HI
Just a follow-up question...
So is the rule of thumb is to use wildcard url patterns, like "/services/*" and then use jaxws:endpoint/@address
values like "/GreetMe" ?
I'm wondering why specifying a pattern like "/services/GreetMe" doesn work...Casually glancing through a servler code didn't give me an answer so I'll probably have to look harder :-).
Cheers, Sergey
----- Original Message -----
From: "Sergey Beryozkin" <se...@iona.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:22 PM
Subject: Re: cxf servlet and jaxws:endpoint questions
Hi Chris
It does work, super !
Thanks for a quick reply,
Sergey
----- Original Message -----
From: "Christopher Moesel" <Ch...@avid.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:14 PM
Subject: RE: cxf servlet and jaxws:endpoint questions
Hi Sergey,
The following combination *should* work...
In web.xml, the url-pattern for the servlet-mapping:
/hello/*
In the jaxws:endpoint/@address:
/world
I believe that the difference between implementor and implementorClass
is this:
implementor: a reference to an *instance* of your SEI implementation (in
Spring, you use this style: #myServiceEndpointImp)
implementorClass: the fully qualified classname of your SEI
implementation, which must have a default constructor (for example,
com.mycompany.MyServiceEndpointImpl)
I hope that helps!
-Chris
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
Sent: Wednesday, September 12, 2007 7:55 AM
To: cxf-user@incubator.apache.org
Subject: cxf servlet and jaxws:endpoint questions
Hi
I have few questions with respect to deploying a cxf servlet into tomcat
:
* how to use/combine correctly a servlet's url pattern and an
jaxws:endpoint/@address values ?
For example, suppose I have a webapp "test" and I want my servlet to
recognize this pattern : /hello/world
As such, I'd like
GET http://localhost:8080/test/hello/world?wsdl
to return me a wsdl.
In web.xml I've tried
/hello/*
/hello/world
and in jaxws:endpoint/@address I tried
/hello/world
/world
with no luck, the above request returns no service is available
* what is the difference between jaxws:endpoint/@implementer and
jaxws:endpoint/@implementerClass attributes ?
Thanks, Sergey
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: cxf servlet and jaxws:endpoint questions
Posted by Sergey Beryozkin <se...@iona.com>.
HI
Just a follow-up question...
So is the rule of thumb is to use wildcard url patterns, like "/services/*" and then use jaxws:endpoint/@address
values like "/GreetMe" ?
I'm wondering why specifying a pattern like "/services/GreetMe" doesn work...Casually glancing through a servler code didn't give me an answer so I'll probably have to look harder :-).
Cheers, Sergey
----- Original Message -----
From: "Sergey Beryozkin" <se...@iona.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:22 PM
Subject: Re: cxf servlet and jaxws:endpoint questions
Hi Chris
It does work, super !
Thanks for a quick reply,
Sergey
----- Original Message -----
From: "Christopher Moesel" <Ch...@avid.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:14 PM
Subject: RE: cxf servlet and jaxws:endpoint questions
Hi Sergey,
The following combination *should* work...
In web.xml, the url-pattern for the servlet-mapping:
/hello/*
In the jaxws:endpoint/@address:
/world
I believe that the difference between implementor and implementorClass
is this:
implementor: a reference to an *instance* of your SEI implementation (in
Spring, you use this style: #myServiceEndpointImp)
implementorClass: the fully qualified classname of your SEI
implementation, which must have a default constructor (for example,
com.mycompany.MyServiceEndpointImpl)
I hope that helps!
-Chris
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
Sent: Wednesday, September 12, 2007 7:55 AM
To: cxf-user@incubator.apache.org
Subject: cxf servlet and jaxws:endpoint questions
Hi
I have few questions with respect to deploying a cxf servlet into tomcat
:
* how to use/combine correctly a servlet's url pattern and an
jaxws:endpoint/@address values ?
For example, suppose I have a webapp "test" and I want my servlet to
recognize this pattern : /hello/world
As such, I'd like
GET http://localhost:8080/test/hello/world?wsdl
to return me a wsdl.
In web.xml I've tried
/hello/*
/hello/world
and in jaxws:endpoint/@address I tried
/hello/world
/world
with no luck, the above request returns no service is available
* what is the difference between jaxws:endpoint/@implementer and
jaxws:endpoint/@implementerClass attributes ?
Thanks, Sergey
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: cxf servlet and jaxws:endpoint questions
Posted by Sergey Beryozkin <se...@iona.com>.
Hi Chris
It does work, super !
Thanks for a quick reply,
Sergey
----- Original Message -----
From: "Christopher Moesel" <Ch...@avid.com>
To: <cx...@incubator.apache.org>
Sent: Wednesday, September 12, 2007 1:14 PM
Subject: RE: cxf servlet and jaxws:endpoint questions
Hi Sergey,
The following combination *should* work...
In web.xml, the url-pattern for the servlet-mapping:
/hello/*
In the jaxws:endpoint/@address:
/world
I believe that the difference between implementor and implementorClass
is this:
implementor: a reference to an *instance* of your SEI implementation (in
Spring, you use this style: #myServiceEndpointImp)
implementorClass: the fully qualified classname of your SEI
implementation, which must have a default constructor (for example,
com.mycompany.MyServiceEndpointImpl)
I hope that helps!
-Chris
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
Sent: Wednesday, September 12, 2007 7:55 AM
To: cxf-user@incubator.apache.org
Subject: cxf servlet and jaxws:endpoint questions
Hi
I have few questions with respect to deploying a cxf servlet into tomcat
:
* how to use/combine correctly a servlet's url pattern and an
jaxws:endpoint/@address values ?
For example, suppose I have a webapp "test" and I want my servlet to
recognize this pattern : /hello/world
As such, I'd like
GET http://localhost:8080/test/hello/world?wsdl
to return me a wsdl.
In web.xml I've tried
/hello/*
/hello/world
and in jaxws:endpoint/@address I tried
/hello/world
/world
with no luck, the above request returns no service is available
* what is the difference between jaxws:endpoint/@implementer and
jaxws:endpoint/@implementerClass attributes ?
Thanks, Sergey
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
RE: cxf servlet and jaxws:endpoint questions
Posted by Christopher Moesel <Ch...@avid.com>.
Hi Sergey,
The following combination *should* work...
In web.xml, the url-pattern for the servlet-mapping:
/hello/*
In the jaxws:endpoint/@address:
/world
I believe that the difference between implementor and implementorClass
is this:
implementor: a reference to an *instance* of your SEI implementation (in
Spring, you use this style: #myServiceEndpointImp)
implementorClass: the fully qualified classname of your SEI
implementation, which must have a default constructor (for example,
com.mycompany.MyServiceEndpointImpl)
I hope that helps!
-Chris
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
Sent: Wednesday, September 12, 2007 7:55 AM
To: cxf-user@incubator.apache.org
Subject: cxf servlet and jaxws:endpoint questions
Hi
I have few questions with respect to deploying a cxf servlet into tomcat
:
* how to use/combine correctly a servlet's url pattern and an
jaxws:endpoint/@address values ?
For example, suppose I have a webapp "test" and I want my servlet to
recognize this pattern : /hello/world
As such, I'd like
GET http://localhost:8080/test/hello/world?wsdl
to return me a wsdl.
In web.xml I've tried
/hello/*
/hello/world
and in jaxws:endpoint/@address I tried
/hello/world
/world
with no luck, the above request returns no service is available
* what is the difference between jaxws:endpoint/@implementer and
jaxws:endpoint/@implementerClass attributes ?
Thanks, Sergey
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland