Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 126529

Summary: wsdl_content.jsp only wants platform:/resource URLs from finders
Product: [WebTools] WTP Webservices Reporter: Yen Lu <yenlu>
Component: wst.wsAssignee: Joan Haggarty <joan>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: kathy, kelvinhc
Version: 1.0.1   
Target Milestone: 1.0.1 M101   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch fix to org.eclipse.wst.ws.explorer
none
Patch fix to org.eclipse.wst.ws
none
Patch fix to org.eclipse.wst.ws none

Description Yen Lu CLA 2006-02-06 01:21:42 EST
We have a finder extending the org.eclipse.wst.ws.locator extension point that
returns http:// URLs. These are completely discarded by the wsdl_content.jsp
that the Web Services Explorer uses to display the WSDL URLs in the WSDL Browser. Here's the offending code segment in the fillWSDLFiles() JavaScript
function:

<%
         String platformProtocol = "platform:/resource";
         wsdlURLs_.removeAllElements();
         
         Iterator ws = WebServiceFinder.instance().getWebServices();  

         while (ws.hasNext())
         {
            WebServiceInfo wsInfo = (WebServiceInfo)ws.next();
            String url = wsInfo.getWsdlURL();
            
           // filter wsdl URLs with same project name as selected project
           // only look at workspace URLs returned from the web service finder
          if (url.startsWith(platformProtocol))
          {
             //strip off platformProtocol to look at the workspace path
             Path wsdlPath = new Path(url.substring(platformProtocol.length()+1));
             String pathProjName = wsdlPath.segment(0);                          

             if (pathProjName.equals(projects[i].getName()))
             {
               wsdlURLs_.add(url);
             }
          }

The URL must start with platformProtocol ("platform:/resource") to be considered by the Web Services Explorer.
Comment 1 Chris Brealey CLA 2006-02-06 10:31:34 EST
Created attachment 34193 [details]
Patch fix to org.eclipse.wst.ws.explorer

Attached on behalf of Joan. Reviewed and ready to commit/release.
Comment 2 Chris Brealey CLA 2006-02-06 10:34:04 EST
Created attachment 34194 [details]
Patch fix to org.eclipse.wst.ws

This patch is not required to solve this bug, however, it enables categorization in the WebServiceFinder framework to help the WSE or other components trying to discovery Web services distinguish between workspace and other categories of Web services.
Comment 3 Chris Brealey CLA 2006-02-06 12:35:48 EST
Created attachment 34205 [details]
Patch fix to org.eclipse.wst.ws

Applying fresh patch to org.eclipse.wst.ws to improve performance characteristics of getWebServices() since the previous implementation quietly tossed and quelled exceptions due to trying to create a "class" executable extension from categories as well as locators. Also defined a getCategoryIDs() method to provide a way to find the IDs of all registered categories.
Comment 4 Chris Brealey CLA 2006-02-06 13:29:28 EST
Committed both patches. Will release shortly. Note that more work is required in WebServiceFinder to allow callers to render and otherwise work with categories more naturally, but this is not critical for 1.0.1.
Comment 5 Kathy Chan CLA 2006-02-06 15:08:49 EST
Patches reviewed and committed.  The changes had been released to M101 and HEAD as v200602061953.
Comment 6 Kelvin Cheung CLA 2006-02-20 14:42:01 EST
Verified that the Web service explorer can now browse and find wsdl files on the server.
Comment 7 Joan Haggarty CLA 2006-02-20 14:51:14 EST
Verified by Kelvin.  Closing.