axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Hedemark (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-1745) Decoding of service is broken in org.apache.axis.transport.http.SimpleAxisWorker.java
Date Sun, 02 Jan 2005 17:42:10 GMT
Decoding of service is broken in org.apache.axis.transport.http.SimpleAxisWorker.java
-------------------------------------------------------------------------------------

         Key: AXIS-1745
         URL: http://issues.apache.org/jira/browse/AXIS-1745
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC2    
 Environment: Linux, tomcat 5.5.4, axis 1.2RC2, jdk 1.4.2
    Reporter: Geir Hedemark


The following code assumes a lot of things:

               if (filePart.startsWith("axis/services/")) {
                    String servicePart = filePart.substring(14);
                    int separator = servicePart.indexOf('/');
                    if (separator > -1) {
                        msgContext.setProperty("objectID",
                                       servicePart.substring(separator + 1));
                        servicePart = servicePart.substring(0, separator);
                    }
                    msgContext.setTargetService(servicePart);
                }

If a service is deployed in a web application that is not named axis, things break.

In addition, it seems that axis only uses the third path segment. java2wsdl with friends seem
to use the last part of the path.

Suggested patch:

               int sepindex = filepart.indexOf('/');
               String localPart = filepart.substring(sepindex+1); //without webapp name
               if (localpart.startsWith("services/") {
                  localPart = localpart.substring(9);
               }
               int separator = localPart.indexOf('/');
               String servicePart = null;
               if (separator > -1) {
                   msgContext.setProperty("objectID",
                      localPart.substring(separator + 1));
                   servicePart = localPart.substring(0, sepindex);
               } else {
                   servicePart = localPart;
               }
               msgContext.setTargetService(servicePart);

This patch should be viewed as a suggestion. It has not been tested. It probably doesn't even
compile.

Other files with the same misfeature:
org/apache/axis/transport/http/AxisServletBase.java
/org/apache/axis/client/AdminClient.java

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message