geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin Sun" <>
Subject RE: [Fwd: Re: url-pattern issue during Axis2 integration]
Date Tue, 30 Jan 2007 18:49:11 GMT
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();

-------- Original Message --------
Subject: 	Re: url-pattern issue during Axis2 integration
Date: 	Tue, 30 Jan 2007 00:47:12 -0500
From: 	Davanum Srinivas <>
References: 	<> 


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


On 1/30/07, Lin Sun <> 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-name>cxfPojoServlet</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.
> 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
> 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
> 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()
> 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
> when I issue ?wsdl from the browser.  I think this is something we may
> 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 :: :: Oxygen for Web Services Developers

View raw message