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