Author: jkaputin
Date: Tue Jan 8 06:18:01 2008
New Revision: 609996
URL: http://svn.apache.org/viewvc?rev=609996&view=rev
Log:
Merged WODEN-192 fix from trunk into woden47 branch.
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/internal/resolver/SchemaResolverAdapter.java
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/internal/resolver/SchemaResolverAdapter.java
URL:
http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/resolver/SchemaResolverAdapter.java?rev=609996&r1=609995&r2=609996&view=diff
==============================================================================
---
webservices/woden/branches/woden47/src/org/apache/woden/internal/resolver/SchemaResolverAdapter.java
(original)
+++
webservices/woden/branches/woden47/src/org/apache/woden/internal/resolver/SchemaResolverAdapter.java
Tue Jan 8 06:18:01 2008
@@ -16,12 +16,14 @@
*/
package org.apache.woden.internal.resolver;
-import java.io.File;
import java.io.InputStream;
+import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import org.apache.woden.XMLElement;
+import org.apache.woden.internal.util.StringUtils;
import org.xml.sax.InputSource;
/**
@@ -91,6 +93,7 @@
/* IOException
* WSDLException
* URISyntaxException
+ * MalformedURLException
*/
throw new RuntimeException(e);
}
@@ -134,16 +137,14 @@
*/
private URI buildUri(String targetNamespace,
String schemaLocation,
- String baseUri) throws URISyntaxException {
+ String baseUri) throws URISyntaxException,
MalformedURLException {
if (baseUri != null)
{
-
- File baseFile = new File(baseUri);
- if (baseFile.exists()) baseUri = baseFile.toURI().toString();
-
- return new URI(baseUri).resolve(new URI(schemaLocation));
-
+ URL ctxUrl = new URL(baseUri);
+ URL schemaUrl = StringUtils.getURL(ctxUrl,schemaLocation);
+ URI uri = new URI(schemaUrl.toString());
+ return uri;
}
return new URI(schemaLocation);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]