Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 37668 Details for
Bug 124398
WSDLValidator cannot run conformance check
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for the WS-I test tools to cache the required TADs
org.eclipse.wst.wsi.patch (text/plain), 6.20 KB, created by
Lawrence Mandel
on 2006-04-04 16:34:19 EDT
(
hide
)
Description:
Patch for the WS-I test tools to cache the required TADs
Filename:
MIME Type:
Creator:
Lawrence Mandel
Created:
2006-04-04 16:34:19 EDT
Size:
6.20 KB
patch
obsolete
>Index: src/org/eclipse/wst/wsi/internal/WSITestToolsEclipseProperties.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/wsi/plugins/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/WSITestToolsEclipseProperties.java,v >retrieving revision 1.1 >diff -u -r1.1 WSITestToolsEclipseProperties.java >--- src/org/eclipse/wst/wsi/internal/WSITestToolsEclipseProperties.java 1 Nov 2005 17:48:17 -0000 1.1 >+++ src/org/eclipse/wst/wsi/internal/WSITestToolsEclipseProperties.java 4 Apr 2006 20:25:15 -0000 >@@ -14,6 +14,8 @@ > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.Path; >+import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; >+import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin; > import org.eclipse.wst.ws.internal.plugin.WSPlugin; > import org.eclipse.wst.ws.internal.preferences.PersistentWSIContext; > >@@ -27,8 +29,10 @@ > */ > public static WSIPreferences checkWSIPreferences(String fileuri) > { >+ // Cache the WS-I tads. >+ cacheTADFiles(); >+ > WSIPreferences preferences = new WSIPreferences(); >- > // Remove file: and any slashes from the fileuri. > // Eclipse's resolution mechanism needs to start with the drive. > String uriStr = trimURI(fileuri); >@@ -101,5 +105,38 @@ > } > return preferences; > } >+ >+ protected static void cacheTADFiles() >+ { >+ String resultAP = cacheFile(AP_ASSERTION_FILE); >+ if(resultAP != null) >+ { >+ AP_ASSERTION_FILE = resultAP; >+ } >+ >+ String resultSSBP = cacheFile(SSBP_ASSERTION_FILE); >+ if(resultSSBP != null) >+ { >+ SSBP_ASSERTION_FILE = resultSSBP; >+ } >+ } >+ >+ protected static String cacheFile(String uri) >+ { >+ URIResolver resolver = getURIResolver(); >+ String resolvedUri = resolver.resolve("", null, uri); >+ return resolver.resolvePhysicalLocation("", null, resolvedUri); >+ } >+ >+ /** >+ * Get the URI resolver to use for WS-I validaiton. >+ * >+ * @return >+ * The URI resolver to use for WS-I validation. >+ */ >+ public static URIResolver getURIResolver() >+ { >+ return URIResolverPlugin.createResolver(); >+ } > > } >Index: src/org/eclipse/wst/wsi/internal/WSITestToolsProperties.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/wsi/plugins/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/WSITestToolsProperties.java,v >retrieving revision 1.1 >diff -u -r1.1 WSITestToolsProperties.java >--- src/org/eclipse/wst/wsi/internal/WSITestToolsProperties.java 1 Nov 2005 17:48:17 -0000 1.1 >+++ src/org/eclipse/wst/wsi/internal/WSITestToolsProperties.java 4 Apr 2006 20:25:15 -0000 >@@ -19,8 +19,8 @@ > protected static String tadfile = ""; > > public final static String schemaDir = "common/schemas/"; >- public final static String SSBP_ASSERTION_FILE = "http://www.ws-i.org/Testing/Tools/2005/01/SSBP10_BP11_TAD_1-0.xml"; >- public final static String AP_ASSERTION_FILE = "http://www.ws-i.org/Testing/Tools/2004/12/AP10_BP11_SSBP10_TAD.xml"; >+ public static String SSBP_ASSERTION_FILE = "http://www.ws-i.org/Testing/Tools/2005/01/SSBP10_BP11_TAD_1-0.xml"; >+ public static String AP_ASSERTION_FILE = "http://www.ws-i.org/Testing/Tools/2004/12/AP10_BP11_SSBP10_TAD.xml"; > public final static String DEFAULT_ASSERTION_FILE = AP_ASSERTION_FILE; > > public static final String STOP_NON_WSI = "0"; >Index: src/org/eclipse/wst/wsi/internal/core/profile/impl/ProfileAssertionsReaderImpl.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/wsi/plugins/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/impl/ProfileAssertionsReaderImpl.java,v >retrieving revision 1.1 >diff -u -r1.1 ProfileAssertionsReaderImpl.java >--- src/org/eclipse/wst/wsi/internal/core/profile/impl/ProfileAssertionsReaderImpl.java 1 Nov 2005 17:48:28 -0000 1.1 >+++ src/org/eclipse/wst/wsi/internal/core/profile/impl/ProfileAssertionsReaderImpl.java 4 Apr 2006 20:25:16 -0000 >@@ -10,12 +10,17 @@ > *******************************************************************************/ > package org.eclipse.wst.wsi.internal.core.profile.impl; > >+import java.io.IOException; > import java.io.Reader; >+import java.net.URL; > import java.util.Iterator; > import java.util.LinkedList; > import java.util.List; > import java.util.TreeMap; > >+import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; >+import org.eclipse.wst.wsi.internal.WSITestToolsEclipseProperties; >+import org.eclipse.wst.wsi.internal.WSITestToolsProperties; > import org.eclipse.wst.wsi.internal.core.WSIConstants; > import org.eclipse.wst.wsi.internal.core.WSIException; > import org.eclipse.wst.wsi.internal.core.profile.EntryTypeList; >@@ -27,7 +32,9 @@ > import org.eclipse.wst.wsi.internal.core.util.Utils; > import org.eclipse.wst.wsi.internal.core.xml.XMLUtils; > import org.xml.sax.Attributes; >+import org.xml.sax.EntityResolver; > import org.xml.sax.InputSource; >+import org.xml.sax.SAXException; > import org.xml.sax.XMLReader; > import org.xml.sax.helpers.DefaultHandler; > >@@ -93,7 +100,32 @@ > > // Set content handler to inner class > reader.setContentHandler(new ProfileAssertionsHandler()); >+ >+ if(WSITestToolsProperties.getEclipseContext()) >+ { >+ EntityResolver resolver = new EntityResolver(){ > >+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { >+ URIResolver resolver = WSITestToolsEclipseProperties.getURIResolver(); >+ String uri = resolver.resolve("", publicId, systemId); >+ String physicalLocation = resolver.resolvePhysicalLocation("", publicId, uri); >+ InputSource is = null; >+ try >+ { >+ URL url = new URL(physicalLocation); >+ is = new InputSource(uri); >+ is.setByteStream(url.openStream()); >+ } >+ catch(Exception e) >+ { >+ // Do nothing if opening the stream fails. >+ } >+ return is; >+ } >+ >+ }; >+ reader.setEntityResolver(resolver); >+ } > // Parse profile definition file > reader.parse(inputSource); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124398
:
37668
|
37692