RE: [Fwd: Re: url-pattern issue during Axis2 integration]

2007-01-30 Thread Lin Sun
Something went wrong with my gmail so I didn't see the reply till now.

No, I've tried that yesterday and it didn't work.  I wish it could. :-)
Basically, you cannot have servicepath set to empty or null.

public String getServicePath() {
if (servicePath == null || servicePath.trim().length() == 0) {
throw new IllegalArgumentException(service path cannot be null
or empty);
}
return servicePath.trim();
}

Thanks,
Lin
 
 Original Message 
Subject:Re: url-pattern issue during Axis2 integration
Date:   Tue, 30 Jan 2007 00:47:12 -0500
From:   Davanum Srinivas [EMAIL PROTECTED]
Reply-To:   dev@geronimo.apache.org, [EMAIL PROTECTED]
To: dev@geronimo.apache.org
References: [EMAIL PROTECTED] 
[EMAIL PROTECTED]



Lin,

Isn't setServicePath() enough to do the trick?

thanks,
dims

On 1/30/07, Lin Sun [EMAIL PROTECTED] wrote:
 Hi there,

 I have been working on one particular issue related to Axis2 integration
 into Geronimo.  Basically the problem is that in the jaxws test, we had to
 use /services/* as the url-pattern for the servlet:

 servlet-mapping
 servlet-namecxfPojoServlet/servlet-name
 url-pattern/services/*/url-pattern
 /servlet-mapping

 This is invalid per JSR 109 spec.  There are two problems here:

 First, a user will have to use /services as part of the url-pattern.
After
 digging into this prob, I found out that the axis2 configurationcontext
 default the servicePath to 'services'.   One fix that I can think of
 (without a lot of work) is to use the configurationContext.setServicePath
 method to override the default 'services' value.  This looks okay to me as
 we are building one configurationcontext and one axisservice per
 endpointClass.

 To do this, I will have to either set url-pattern for the user when none
is
 specified for the servlet/Implclass, or grab the url-pattern from web.xml.
 So I have been studying on how to get the url-pattern for a particular
 servlet from Geronimo.  One approach I can think of is:
 1) inside Axis2Builder, the module object is passed in when configurePOJO
is
 called.
 2) then I can get the getOriginalSpecDD from webmodule, then use
 webModuleBuilder.convertToServletSchema to get the webAppType object.
 3) I can then get the url-pattern from webApp.getServletMappingArray()
with
 some processing.

 This seems rather complicated to me so please let me know if there is a
 better way to do it.

 Second, the url-pattern of the servlet-mapping must be an exact match
 pattern (* is not permitted).   I tried to remove the * but I would get
404
 when I issue ?wsdl from the browser.  I think this is something we may
have
 to write code to work around the spec requirement, as a user needs to be
 able to run ?wsdl calls using different syntax (like GreeterImpl?wsdl or
 test?wsdl...).   For example, a user can only specify 1 (or 0)
 servlet-mapping and url-pattern for one servlet in web.xml, but the Axis2
 integration code can add other url-patterns to the web deployment plan
 (web.xml). I am wondering if there is anyway to overwrite the in- memory
 version of servlet-mapping or url-pattern for Geronimo to use (of course,
 don't overwrite the original web.xml)?

 Reference doc:
 JSR 109 rev 1.2 Page 61 (sec 7.1.2) where it says:
 --//--
 Servlet Mapping. A developer may optionally specify a servlet-mapping,
 In the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service
 Endpoint.
 No more than one servlet-mapping may be specified for a servlet that is
 linked to by a port-component.
 The url-pattern of the servlet-mapping must be an exact match pattern
  (i.e. it must not contain an asterisk (*)).
 --//--

 Thanks for any input in advance!

 Lin




-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers





Re: [Fwd: Re: url-pattern issue during Axis2 integration]

2007-01-30 Thread Davanum Srinivas

I remember a special setting for setServicePath(/) can u please try that one?

On 1/30/07, Lin Sun [EMAIL PROTECTED] wrote:

Something went wrong with my gmail so I didn't see the reply till now.

No, I've tried that yesterday and it didn't work.  I wish it could. :-)
Basically, you cannot have servicepath set to empty or null.

public String getServicePath() {
if (servicePath == null || servicePath.trim().length() == 0) {
throw new IllegalArgumentException(service path cannot be null
or empty);
}
return servicePath.trim();
}

Thanks,
Lin

 Original Message 
Subject:Re: url-pattern issue during Axis2 integration
Date:   Tue, 30 Jan 2007 00:47:12 -0500
From:   Davanum Srinivas [EMAIL PROTECTED]
Reply-To:   dev@geronimo.apache.org, [EMAIL PROTECTED]
To: dev@geronimo.apache.org
References: [EMAIL PROTECTED]
[EMAIL PROTECTED]



Lin,

Isn't setServicePath() enough to do the trick?

thanks,
dims

On 1/30/07, Lin Sun [EMAIL PROTECTED] wrote:
 Hi there,

 I have been working on one particular issue related to Axis2 integration
 into Geronimo.  Basically the problem is that in the jaxws test, we had to
 use /services/* as the url-pattern for the servlet:

 servlet-mapping
 servlet-namecxfPojoServlet/servlet-name
 url-pattern/services/*/url-pattern
 /servlet-mapping

 This is invalid per JSR 109 spec.  There are two problems here:

 First, a user will have to use /services as part of the url-pattern.
After
 digging into this prob, I found out that the axis2 configurationcontext
 default the servicePath to 'services'.   One fix that I can think of
 (without a lot of work) is to use the configurationContext.setServicePath
 method to override the default 'services' value.  This looks okay to me as
 we are building one configurationcontext and one axisservice per
 endpointClass.

 To do this, I will have to either set url-pattern for the user when none
is
 specified for the servlet/Implclass, or grab the url-pattern from web.xml.
 So I have been studying on how to get the url-pattern for a particular
 servlet from Geronimo.  One approach I can think of is:
 1) inside Axis2Builder, the module object is passed in when configurePOJO
is
 called.
 2) then I can get the getOriginalSpecDD from webmodule, then use
 webModuleBuilder.convertToServletSchema to get the webAppType object.
 3) I can then get the url-pattern from webApp.getServletMappingArray()
with
 some processing.

 This seems rather complicated to me so please let me know if there is a
 better way to do it.

 Second, the url-pattern of the servlet-mapping must be an exact match
 pattern (* is not permitted).   I tried to remove the * but I would get
404
 when I issue ?wsdl from the browser.  I think this is something we may
have
 to write code to work around the spec requirement, as a user needs to be
 able to run ?wsdl calls using different syntax (like GreeterImpl?wsdl or
 test?wsdl...).   For example, a user can only specify 1 (or 0)
 servlet-mapping and url-pattern for one servlet in web.xml, but the Axis2
 integration code can add other url-patterns to the web deployment plan
 (web.xml). I am wondering if there is anyway to overwrite the in- memory
 version of servlet-mapping or url-pattern for Geronimo to use (of course,
 don't overwrite the original web.xml)?

 Reference doc:
 JSR 109 rev 1.2 Page 61 (sec 7.1.2) where it says:
 --//--
 Servlet Mapping. A developer may optionally specify a servlet-mapping,
 In the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service
 Endpoint.
 No more than one servlet-mapping may be specified for a servlet that is
 linked to by a port-component.
 The url-pattern of the servlet-mapping must be an exact match pattern
  (i.e. it must not contain an asterisk (*)).
 --//--

 Thanks for any input in advance!

 Lin




--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers







--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers


url-pattern issue during Axis2 integration

2007-01-29 Thread Lin Sun
Hi there,

I have been working on one particular issue related to Axis2 integration
into Geronimo.  Basically the problem is that in the jaxws test, we had to
use /services/* as the url-pattern for the servlet:

servlet-mapping
servlet-namecxfPojoServlet/servlet-name
url-pattern/services/*/url-pattern
/servlet-mapping

This is invalid per JSR 109 spec.  There are two problems here:

First, a user will have to use /services as part of the url-pattern.  After
digging into this prob, I found out that the axis2 configurationcontext
default the servicePath to 'services'.   One fix that I can think of
(without a lot of work) is to use the configurationContext.setServicePath
method to override the default 'services' value.  This looks okay to me as
we are building one configurationcontext and one axisservice per
endpointClass.

To do this, I will have to either set url-pattern for the user when none is
specified for the servlet/Implclass, or grab the url-pattern from web.xml.
So I have been studying on how to get the url-pattern for a particular
servlet from Geronimo.  One approach I can think of is:
1) inside Axis2Builder, the module object is passed in when configurePOJO is
called.
2) then I can get the getOriginalSpecDD from webmodule, then use
webModuleBuilder.convertToServletSchema to get the webAppType object.  
3) I can then get the url-pattern from webApp.getServletMappingArray() with
some processing.   

This seems rather complicated to me so please let me know if there is a
better way to do it.  

Second, the url-pattern of the servlet-mapping must be an exact match
pattern (* is not permitted).   I tried to remove the * but I would get 404
when I issue ?wsdl from the browser.  I think this is something we may have
to write code to work around the spec requirement, as a user needs to be
able to run ?wsdl calls using different syntax (like GreeterImpl?wsdl or
test?wsdl...).   For example, a user can only specify 1 (or 0)
servlet-mapping and url-pattern for one servlet in web.xml, but the Axis2
integration code can add other url-patterns to the web deployment plan
(web.xml). I am wondering if there is anyway to overwrite the in- memory
version of servlet-mapping or url-pattern for Geronimo to use (of course,
don't overwrite the original web.xml)?  

Reference doc:
JSR 109 rev 1.2 Page 61 (sec 7.1.2) where it says:
--//--
Servlet Mapping. A developer may optionally specify a servlet-mapping,
In the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service
Endpoint.
No more than one servlet-mapping may be specified for a servlet that is
linked to by a port-component.
The url-pattern of the servlet-mapping must be an exact match pattern
 (i.e. it must not contain an asterisk (*)).
--//--

Thanks for any input in advance!

Lin



Re: url-pattern issue during Axis2 integration

2007-01-29 Thread Davanum Srinivas

Lin,

Isn't setServicePath() enough to do the trick?

thanks,
dims

On 1/30/07, Lin Sun [EMAIL PROTECTED] wrote:

Hi there,

I have been working on one particular issue related to Axis2 integration
into Geronimo.  Basically the problem is that in the jaxws test, we had to
use /services/* as the url-pattern for the servlet:

servlet-mapping
servlet-namecxfPojoServlet/servlet-name
url-pattern/services/*/url-pattern
/servlet-mapping

This is invalid per JSR 109 spec.  There are two problems here:

First, a user will have to use /services as part of the url-pattern.  After
digging into this prob, I found out that the axis2 configurationcontext
default the servicePath to 'services'.   One fix that I can think of
(without a lot of work) is to use the configurationContext.setServicePath
method to override the default 'services' value.  This looks okay to me as
we are building one configurationcontext and one axisservice per
endpointClass.

To do this, I will have to either set url-pattern for the user when none is
specified for the servlet/Implclass, or grab the url-pattern from web.xml.
So I have been studying on how to get the url-pattern for a particular
servlet from Geronimo.  One approach I can think of is:
1) inside Axis2Builder, the module object is passed in when configurePOJO is
called.
2) then I can get the getOriginalSpecDD from webmodule, then use
webModuleBuilder.convertToServletSchema to get the webAppType object.
3) I can then get the url-pattern from webApp.getServletMappingArray() with
some processing.

This seems rather complicated to me so please let me know if there is a
better way to do it.

Second, the url-pattern of the servlet-mapping must be an exact match
pattern (* is not permitted).   I tried to remove the * but I would get 404
when I issue ?wsdl from the browser.  I think this is something we may have
to write code to work around the spec requirement, as a user needs to be
able to run ?wsdl calls using different syntax (like GreeterImpl?wsdl or
test?wsdl...).   For example, a user can only specify 1 (or 0)
servlet-mapping and url-pattern for one servlet in web.xml, but the Axis2
integration code can add other url-patterns to the web deployment plan
(web.xml). I am wondering if there is anyway to overwrite the in- memory
version of servlet-mapping or url-pattern for Geronimo to use (of course,
don't overwrite the original web.xml)?

Reference doc:
JSR 109 rev 1.2 Page 61 (sec 7.1.2) where it says:
--//--
Servlet Mapping. A developer may optionally specify a servlet-mapping,
In the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service
Endpoint.
No more than one servlet-mapping may be specified for a servlet that is
linked to by a port-component.
The url-pattern of the servlet-mapping must be an exact match pattern
 (i.e. it must not contain an asterisk (*)).
--//--

Thanks for any input in advance!

Lin





--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers


Re: url-pattern issue during Axis2 integration

2007-01-29 Thread Jarek Gawor

Lin Sun,

When WebServicesBuilder.findWebServices() is called, the 3rd argument
(Map servletLocations) contains the mapping between the servlet-name
and its context location. For example, there would be a mapping of
'cxfPojoServlet' to '/war name/services' or something similar.

Jarek

On 1/30/07, Lin Sun [EMAIL PROTECTED] wrote:

Hi there,

I have been working on one particular issue related to Axis2 integration
into Geronimo.  Basically the problem is that in the jaxws test, we had to
use /services/* as the url-pattern for the servlet:

servlet-mapping
servlet-namecxfPojoServlet/servlet-name
url-pattern/services/*/url-pattern
/servlet-mapping

This is invalid per JSR 109 spec.  There are two problems here:

First, a user will have to use /services as part of the url-pattern.  After
digging into this prob, I found out that the axis2 configurationcontext
default the servicePath to 'services'.   One fix that I can think of
(without a lot of work) is to use the configurationContext.setServicePath
method to override the default 'services' value.  This looks okay to me as
we are building one configurationcontext and one axisservice per
endpointClass.

To do this, I will have to either set url-pattern for the user when none is
specified for the servlet/Implclass, or grab the url-pattern from web.xml.
So I have been studying on how to get the url-pattern for a particular
servlet from Geronimo.  One approach I can think of is:
1) inside Axis2Builder, the module object is passed in when configurePOJO is
called.
2) then I can get the getOriginalSpecDD from webmodule, then use
webModuleBuilder.convertToServletSchema to get the webAppType object.
3) I can then get the url-pattern from webApp.getServletMappingArray() with
some processing.

This seems rather complicated to me so please let me know if there is a
better way to do it.

Second, the url-pattern of the servlet-mapping must be an exact match
pattern (* is not permitted).   I tried to remove the * but I would get 404
when I issue ?wsdl from the browser.  I think this is something we may have
to write code to work around the spec requirement, as a user needs to be
able to run ?wsdl calls using different syntax (like GreeterImpl?wsdl or
test?wsdl...).   For example, a user can only specify 1 (or 0)
servlet-mapping and url-pattern for one servlet in web.xml, but the Axis2
integration code can add other url-patterns to the web deployment plan
(web.xml). I am wondering if there is anyway to overwrite the in- memory
version of servlet-mapping or url-pattern for Geronimo to use (of course,
don't overwrite the original web.xml)?

Reference doc:
JSR 109 rev 1.2 Page 61 (sec 7.1.2) where it says:
--//--
Servlet Mapping. A developer may optionally specify a servlet-mapping,
In the web.xml deployment descriptor, for a JAX-RPC or JAX-WS Service
Endpoint.
No more than one servlet-mapping may be specified for a servlet that is
linked to by a port-component.
The url-pattern of the servlet-mapping must be an exact match pattern
 (i.e. it must not contain an asterisk (*)).
--//--

Thanks for any input in advance!

Lin