[ 
https://issues.apache.org/jira/browse/GERONIMO-2752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465949
 ] 

Lin Sun commented on GERONIMO-2752:
-----------------------------------

I have reviewed the patch.   There is a small error here below.  The 'return;' 
should not be deleted.  

@@ -237,18 +246,11 @@
                 }
             }
             if (uri.getQuery().startsWith("wsdl")) {
-                String serviceName = path.substring(path.lastIndexOf("/") + 1);
-                HashMap services = 
configurationContext.getAxisConfiguration().getServices();
-                final AxisService service = (AxisService) 
services.get(serviceName);
-                if (service != null) {
-                    service.printWSDL(response.getOutputStream(), 
uri.getHost(), servicePath);
-                    return;
-                }
+               if(service != null){
+                       service.printWSDL(response.getOutputStream(), 
uri.getHost(), servicePath);
+               }

I think the patch works but the original solution works too, except that it may 
not work if the uri contains '?wsdl2'.   But if you replace the line below it 
should work.

             if (uri.getQuery().startsWith("wsdl2")) {
-                String serviceName = path.substring(path.lastIndexOf("/") + 1, 
path.length() - 6);

+               String serviceName = path.substring(path.lastIndexOf("/") + 1);

Overall I don't see a big benefit of using the new proposed approach - use 
(AxisService)(services.values().iterator().next()) to get the AxisService while 
the original approach - use (AxisService) services.get(serviceName) to get the 
AxisService.   I think both work well in my simple scenario, but I could easily 
have missed something.:-)

Lin








> Axis2 integration displays invalid information for URL requests
> ---------------------------------------------------------------
>
>                 Key: GERONIMO-2752
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2752
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0-M1
>            Reporter: Lasantha Ranaweera
>         Attachments: GERONIMO-2752.patch1, GERONIMO-2752.patch2
>
>
> Current integration of Axis2 gives wrong information to the wsdl, wsdl2, xsd= 
> .. etc URL requests.

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

        

Reply via email to