You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Wang PengChao (JIRA)" <ji...@apache.org> on 2006/05/09 13:06:22 UTC

[jira] Created: (AXIS2-697) fetching WSDL description using aService?wsdl does not work in Jetty

fetching WSDL description using aService?wsdl does not work in Jetty
--------------------------------------------------------------------

         Key: AXIS2-697
         URL: http://issues.apache.org/jira/browse/AXIS2-697
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: deployment  
 Environment: Jdk 1.5,  Jetty 6.0.0 Beta14
    Reporter: Wang PengChao


	
Phenomenon:

  Service 'aService' deployed in Jetty, when user fetches aService's WSDL description using http://domain/services/aService?wsdl, axis2 will return 404 ERROR. But request url like http://domain/services/aService?wsdl= or http://domain/services/aService?wsdl=anything can work.


Analysis:

The code here in ListAgent.handle()

	if (httpServletRequest.getParameter("wsdl") != null ||
                httpServletRequest.getParameter("xsd") != null) {
            processListService(httpServletRequest, httpServletResponse);
        } else {
            super.handle(httpServletRequest, httpServletResponse);
        }

It use request.getParameter() to determin whether the request is a WSDL or XSD description request. It works fine in tomcat. But Jetty has different way to process request like http://.../servlet?parameterName, which has no '=' followed. In tomcat, while processing this kind of link, parameterName will be put in paramter map with the value set to an empty string, but in Jetty it will be simply thrown away. It is not a bug of Jetty, because how to deal with this kind of request parameters is not mentioned in the servlet specification. 


Suggest:

I think using feature which different between servlet containers is not smart. So I suggest using request.getQueryString() to replace the getParameter(): 



in ListAgent.handle() before code snip change to......

	if (isWSDLOrXSDRequest(httpServletRequest)) {
            processListService(httpServletRequest, httpServletResponse);
        } else {
            super.handle(httpServletRequest, httpServletResponse);
        }

add method in ListAgent......

    private boolean isWSDLOrXSDRequest(HttpServletRequest httpServletRequest) {
        String query = httpServletRequest.getQueryString();
        if(query == null){
            return false;
        }
        return query.indexOf("wsdl") >=0 || query.indexOf("xsd") >=0;
    }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXIS2-697) fetching WSDL description using aService?wsdl does not work in Jetty

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-697?page=all ]

Deepal Jayasinghe reassigned AXIS2-697:
---------------------------------------

    Assign To: Deepal Jayasinghe

> fetching WSDL description using aService?wsdl does not work in Jetty
> --------------------------------------------------------------------
>
>          Key: AXIS2-697
>          URL: http://issues.apache.org/jira/browse/AXIS2-697
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: deployment
>  Environment: Jdk 1.5,  Jetty 6.0.0 Beta14
>     Reporter: Wang PengChao
>     Assignee: Deepal Jayasinghe

>
> 	
> Phenomenon:
>   Service 'aService' deployed in Jetty, when user fetches aService's WSDL description using http://domain/services/aService?wsdl, axis2 will return 404 ERROR. But request url like http://domain/services/aService?wsdl= or http://domain/services/aService?wsdl=anything can work.
> Analysis:
> The code here in ListAgent.handle()
> 	if (httpServletRequest.getParameter("wsdl") != null ||
>                 httpServletRequest.getParameter("xsd") != null) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> It use request.getParameter() to determin whether the request is a WSDL or XSD description request. It works fine in tomcat. But Jetty has different way to process request like http://.../servlet?parameterName, which has no '=' followed. In tomcat, while processing this kind of link, parameterName will be put in paramter map with the value set to an empty string, but in Jetty it will be simply thrown away. It is not a bug of Jetty, because how to deal with this kind of request parameters is not mentioned in the servlet specification. 
> Suggest:
> I think using feature which different between servlet containers is not smart. So I suggest using request.getQueryString() to replace the getParameter(): 
> in ListAgent.handle() before code snip change to......
> 	if (isWSDLOrXSDRequest(httpServletRequest)) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> add method in ListAgent......
>     private boolean isWSDLOrXSDRequest(HttpServletRequest httpServletRequest) {
>         String query = httpServletRequest.getQueryString();
>         if(query == null){
>             return false;
>         }
>         return query.indexOf("wsdl") >=0 || query.indexOf("xsd") >=0;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-697) fetching WSDL description using aService?wsdl does not work in Jetty

Posted by "Håkon T Sønderland (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-697?page=comments#action_12413706 ] 

Håkon T Sønderland commented on AXIS2-697:
------------------------------------------

This issue is present also with Orion Server 2.0.7 and Oracle OC4J.

> fetching WSDL description using aService?wsdl does not work in Jetty
> --------------------------------------------------------------------
>
>          Key: AXIS2-697
>          URL: http://issues.apache.org/jira/browse/AXIS2-697
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: deployment
>  Environment: Jdk 1.5,  Jetty 6.0.0 Beta14
>     Reporter: Wang PengChao
>     Assignee: Deepal Jayasinghe

>
> 	
> Phenomenon:
>   Service 'aService' deployed in Jetty, when user fetches aService's WSDL description using http://domain/services/aService?wsdl, axis2 will return 404 ERROR. But request url like http://domain/services/aService?wsdl= or http://domain/services/aService?wsdl=anything can work.
> Analysis:
> The code here in ListAgent.handle()
> 	if (httpServletRequest.getParameter("wsdl") != null ||
>                 httpServletRequest.getParameter("xsd") != null) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> It use request.getParameter() to determin whether the request is a WSDL or XSD description request. It works fine in tomcat. But Jetty has different way to process request like http://.../servlet?parameterName, which has no '=' followed. In tomcat, while processing this kind of link, parameterName will be put in paramter map with the value set to an empty string, but in Jetty it will be simply thrown away. It is not a bug of Jetty, because how to deal with this kind of request parameters is not mentioned in the servlet specification. 
> Suggest:
> I think using feature which different between servlet containers is not smart. So I suggest using request.getQueryString() to replace the getParameter(): 
> in ListAgent.handle() before code snip change to......
> 	if (isWSDLOrXSDRequest(httpServletRequest)) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> add method in ListAgent......
>     private boolean isWSDLOrXSDRequest(HttpServletRequest httpServletRequest) {
>         String query = httpServletRequest.getQueryString();
>         if(query == null){
>             return false;
>         }
>         return query.indexOf("wsdl") >=0 || query.indexOf("xsd") >=0;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-697) fetching WSDL description using aService?wsdl does not work in Jetty

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-697?page=all ]
     
Davanum Srinivas resolved AXIS2-697:
------------------------------------

    Resolution: Invalid

Looks like they fixed the problem in jetty-6.0.0beta17

thanks,
dims

> fetching WSDL description using aService?wsdl does not work in Jetty
> --------------------------------------------------------------------
>
>          Key: AXIS2-697
>          URL: http://issues.apache.org/jira/browse/AXIS2-697
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: deployment
>  Environment: Jdk 1.5,  Jetty 6.0.0 Beta14
>     Reporter: Wang PengChao
>     Assignee: Deepal Jayasinghe

>
> 	
> Phenomenon:
>   Service 'aService' deployed in Jetty, when user fetches aService's WSDL description using http://domain/services/aService?wsdl, axis2 will return 404 ERROR. But request url like http://domain/services/aService?wsdl= or http://domain/services/aService?wsdl=anything can work.
> Analysis:
> The code here in ListAgent.handle()
> 	if (httpServletRequest.getParameter("wsdl") != null ||
>                 httpServletRequest.getParameter("xsd") != null) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> It use request.getParameter() to determin whether the request is a WSDL or XSD description request. It works fine in tomcat. But Jetty has different way to process request like http://.../servlet?parameterName, which has no '=' followed. In tomcat, while processing this kind of link, parameterName will be put in paramter map with the value set to an empty string, but in Jetty it will be simply thrown away. It is not a bug of Jetty, because how to deal with this kind of request parameters is not mentioned in the servlet specification. 
> Suggest:
> I think using feature which different between servlet containers is not smart. So I suggest using request.getQueryString() to replace the getParameter(): 
> in ListAgent.handle() before code snip change to......
> 	if (isWSDLOrXSDRequest(httpServletRequest)) {
>             processListService(httpServletRequest, httpServletResponse);
>         } else {
>             super.handle(httpServletRequest, httpServletResponse);
>         }
> add method in ListAgent......
>     private boolean isWSDLOrXSDRequest(HttpServletRequest httpServletRequest) {
>         String query = httpServletRequest.getQueryString();
>         if(query == null){
>             return false;
>         }
>         return query.indexOf("wsdl") >=0 || query.indexOf("xsd") >=0;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org