You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by in...@apache.org on 2008/01/17 13:06:08 UTC
svn commit: r612800 - in /webservices/synapse/branches/1.1.1:
modules/core/src/main/java/org/apache/synapse/
modules/core/src/main/java/org/apache/synapse/config/
modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/
modules/core/src/main...
Author: indika
Date: Thu Jan 17 04:05:24 2008
New Revision: 612800
URL: http://svn.apache.org/viewvc?rev=612800&view=rev
Log:
add uri resolvers for EP and ProxyServices
Modify the existing one
Added:
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomURIResolver.java
- copied, changed from r612706, webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapURIResolver.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomWSDLLocator.java
- copied, changed from r612706, webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapWSDLLocator.java
Removed:
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapURIResolver.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapWSDLLocator.java
Modified:
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL11EndpointBuilder.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMap.java
webservices/synapse/branches/1.1.1/repository/conf/wrapper.conf
webservices/synapse/branches/1.1.1/src/main/bin/synapse.bat
webservices/synapse/branches/1.1.1/src/main/bin/synapse.sh
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java Thu Jan 17 04:05:24 2008
@@ -231,4 +231,10 @@
/** Synapse server instance name */
public static final String SYNAPSE_SERVER_NAME = "SynapseServerName";
+
+ public static final String SYNAPSE_DATASOURCES = "synapse.datasources";
+
+ /** Root for relative path */
+ public static final String RESOLVE_ROOT = "resolve.root";
+
}
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java Thu Jan 17 04:05:24 2008
@@ -26,6 +26,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.SynapseConstants;
import org.apache.synapse.SynapseException;
+import org.xml.sax.InputSource;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@@ -35,10 +36,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
+import java.net.*;
public class SynapseConfigUtils {
@@ -212,6 +210,34 @@
return null;
}
+ public static InputSource getInputSourceFormURI(URI uri) {
+ if (uri == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Can not create a URL from 'null' ");
+ }
+ return null;
+ }
+ try {
+ URL url = uri.toURL();
+ String protocol = url.getProtocol();
+ String path = url.getPath();
+ if (protocol == null || "".equals(protocol)) {
+ url = new URL("file:" + path);
+ }
+ URLConnection conn = url.openConnection();
+ conn.setReadTimeout(10000);
+ conn.setConnectTimeout(2000);
+ conn.setRequestProperty("Connection", "close"); // if http is being used
+ InputStream urlInStream = conn.getInputStream();
+ return new InputSource(urlInStream);
+ } catch (MalformedURLException e) {
+ handleException("Invalid URL ' " + uri + " '", e);
+ } catch (IOException e) {
+ handleException("Error reading at URI ' " + uri + " ' ", e);
+ }
+ return null;
+ }
+
private static void handleException(String msg, Exception e) {
log.warn(msg, e);
throw new SynapseException(msg, e);
@@ -291,4 +317,53 @@
}
return url;
}
+
+ public static InputSource resolveRelativeURI(String parentLocation, String relativeLocation) {
+
+ if (relativeLocation == null) {
+ throw new IllegalArgumentException("Import URI cannot be null");
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("Resolving import URI ' " + parentLocation + " ' against base URI ' " + relativeLocation + " ' ");
+ }
+
+ URI importUri = null;
+ try {
+ importUri = new URI(relativeLocation);
+ } catch (URISyntaxException e) {
+ handleException("Invalid Import URI", e);
+ }
+
+ if (parentLocation == null) {
+ return getInputSourceFormURI(importUri);
+ } else {
+ // if the importuri is absolute
+ if (relativeLocation.startsWith("/") || relativeLocation.startsWith("\\")) {
+ return getInputSourceFormURI(importUri);
+ } else {
+ int index = parentLocation.lastIndexOf("/");
+ if (index == -1) {
+ index = parentLocation.lastIndexOf("\\");
+ }
+ if (index != -1) {
+ String basepath = parentLocation.substring(0, index + 1);
+ String resolvedPath = basepath + relativeLocation;
+ try {
+ URI resolvedUri = new URI(resolvedPath);
+ if (!resolvedUri.isAbsolute()) {
+ resolvedUri = new URI("file:" + resolvedPath);
+ }
+ return getInputSourceFormURI(resolvedUri);
+ } catch (URISyntaxException e) {
+ handleException("Invalid URI ' " + resolvedPath + " '");
+ }
+ } else {
+ return getInputSourceFormURI(importUri);
+ }
+ }
+ }
+ return null;
+ }
}
+
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java Thu Jan 17 04:05:24 2008
@@ -19,23 +19,24 @@
package org.apache.synapse.config.xml.endpoints;
-import org.apache.synapse.endpoints.Endpoint;
-import org.apache.synapse.endpoints.WSDLEndpoint;
-import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.SynapseException;
-import org.apache.synapse.endpoints.utils.EndpointDefinition;
-import org.apache.synapse.config.xml.endpoints.utils.WSDL11EndpointBuilder;
-import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMNode;
+import org.apache.axis2.description.WSDL2Constants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.axis2.description.WSDL2Constants;
+import org.apache.synapse.SynapseConstants;
+import org.apache.synapse.SynapseException;
import org.apache.synapse.config.SynapseConfigUtils;
+import org.apache.synapse.config.xml.endpoints.utils.WSDL11EndpointBuilder;
+import org.apache.synapse.endpoints.Endpoint;
+import org.apache.synapse.endpoints.WSDLEndpoint;
+import org.apache.synapse.endpoints.utils.EndpointDefinition;
import javax.xml.namespace.QName;
import java.net.URL;
+import java.io.File;
/**
* Creates an WSDL based endpoint from a XML configuration.
@@ -142,7 +143,7 @@
String nsUri = wsdlOM.getNamespace().getNamespaceURI();
if (org.apache.axis2.namespace.Constants.NS_URI_WSDL11.equals(nsUri)) {
endpoint = new WSDL11EndpointBuilder().
- createEndpointDefinitionFromWSDL(wsdlOM, serviceName, portName);
+ createEndpointDefinitionFromWSDL(wsdlURI.trim(),wsdlOM, serviceName, portName);
} else if (WSDL2Constants.WSDL_NAMESPACE.equals(nsUri)) {
//endpoint = new WSDL20EndpointBuilder().
@@ -163,9 +164,16 @@
(new QName(org.apache.axis2.namespace.Constants.NS_URI_WSDL11, "definitions"));
if (endpoint == null && definitionElement != null) {
wsdlEndpoint.setWsdlDoc(definitionElement);
-
+ String resolveRoot = System.getProperty(SynapseConstants.RESOLVE_ROOT);
+ String baseUri = "file:./";
+ if (resolveRoot != null) {
+ baseUri = resolveRoot.trim();
+ }
+ if(!baseUri.endsWith(File.separator)){
+ baseUri = baseUri + File.separator;
+ }
endpoint = new WSDL11EndpointBuilder().
- createEndpointDefinitionFromWSDL(definitionElement, serviceName, portName);
+ createEndpointDefinitionFromWSDL(baseUri, definitionElement, serviceName, portName);
}
// check if a wsdl 2.0 document is supplied inline
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL11EndpointBuilder.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL11EndpointBuilder.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL11EndpointBuilder.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL11EndpointBuilder.java Thu Jan 17 04:05:24 2008
@@ -19,28 +19,35 @@
package org.apache.synapse.config.xml.endpoints.utils;
-import org.apache.synapse.endpoints.utils.EndpointDefinition;
-import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.SynapseException;
import org.apache.axiom.om.OMElement;
+import org.apache.axis2.util.XMLUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.synapse.SynapseConstants;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.core.axis2.CustomWSDLLocator;
+import org.apache.synapse.endpoints.utils.EndpointDefinition;
+import org.w3c.dom.Document;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.WSDLException;
import javax.wsdl.Definition;
-import javax.wsdl.Service;
import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.extensions.soap12.SOAP12Address;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLLocator;
import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLStreamException;
-import java.util.List;
-import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.io.InputStream;
+import java.util.List;
/**
* Builds the EndpointDefinition containing the details for an epr using a WSDL 1.1 document.
@@ -53,6 +60,7 @@
* Creates an EndpointDefinition for WSDL endpoint from an inline WSDL supplied in the WSDL
* endpoint configuration.
*
+ * @param baseUri base uri of the wsdl
* @param wsdl OMElement representing the inline WSDL
* @param service Service of the endpoint
* @param port Port of the endpoint
@@ -60,19 +68,30 @@
* @return EndpointDefinition containing the information retrieved from the WSDL
*/
public EndpointDefinition createEndpointDefinitionFromWSDL
- (OMElement wsdl, String service, String port) {
+ (String baseUri, OMElement wsdl, String service, String port) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
wsdl.serialize(baos);
InputStream in = new ByteArrayInputStream(baos.toByteArray());
InputSource inputSource = new InputSource(in);
- WSDLFactory fac = WSDLFactory.newInstance();
- WSDLReader reader = fac.newWSDLReader();
- Definition definition = reader.readWSDL(null, inputSource);
-
- return createEndpointDefinitionFromWSDL(definition, service, port);
-
+ WSDLLocator wsdlLocator = new CustomWSDLLocator(inputSource,baseUri);
+ Document doc = null;
+ try {
+ doc = XMLUtils.newDocument(inputSource);
+ } catch (ParserConfigurationException e) {
+ handleException("Parser Configuration Error", e);
+ } catch (SAXException e) {
+ handleException("Parser SAX Error", e);
+ } catch (IOException e) {
+ handleException(WSDLException.INVALID_WSDL+ "IO Error",e);
+ }
+ if (doc != null) {
+ WSDLFactory fac = WSDLFactory.newInstance();
+ WSDLReader reader = fac.newWSDLReader();
+ Definition definition = reader.readWSDL(wsdlLocator, doc.getDocumentElement());
+ return createEndpointDefinitionFromWSDL(definition, service, port);
+ }
} catch (XMLStreamException e) {
handleException("Error retrieving the WSDL definition from the inline WSDL.");
} catch (WSDLException e) {
@@ -91,7 +110,7 @@
*
* @return EndpointDefinition containing the information retrieved from the WSDL
*/
- public EndpointDefinition createEndpointDefinitionFromWSDL
+ private EndpointDefinition createEndpointDefinitionFromWSDL
(String wsdlURI, String service, String port) {
try {
@@ -170,5 +189,10 @@
private static void handleException(String msg) {
log.error(msg);
throw new SynapseException(msg);
+ }
+
+ private static void handleException(String msg, Exception e) {
+ log.error(msg, e);
+ throw new SynapseException(msg, e);
}
}
Copied: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomURIResolver.java (from r612706, webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapURIResolver.java)
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomURIResolver.java?p2=webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomURIResolver.java&p1=webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapURIResolver.java&r1=612706&r2=612800&rev=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapURIResolver.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomURIResolver.java Thu Jan 17 04:05:24 2008
@@ -19,6 +19,7 @@
package org.apache.synapse.core.axis2;
+import org.apache.synapse.config.SynapseConfigUtils;
import org.apache.synapse.config.SynapseConfiguration;
import org.apache.ws.commons.schema.resolver.URIResolver;
import org.xml.sax.InputSource;
@@ -26,17 +27,28 @@
/**
* Class that adapts a ResourceMap to URIResolver.
*/
-public class ResourceMapURIResolver implements URIResolver {
- private final ResourceMap resourceMap;
- private final SynapseConfiguration synCfg;
-
- public ResourceMapURIResolver(ResourceMap resourceMap,
+public class CustomURIResolver implements URIResolver {
+ private ResourceMap resourceMap;
+ private SynapseConfiguration synCfg;
+
+ public CustomURIResolver() {
+ }
+
+ public CustomURIResolver(ResourceMap resourceMap,
SynapseConfiguration synCfg) {
+ this();
this.resourceMap = resourceMap;
this.synCfg = synCfg;
}
-
+
public InputSource resolveEntity(String targetNamespace, String schemaLocation, String baseUri) {
- return resourceMap.resolve(synCfg, schemaLocation);
+ InputSource result = null;
+ if (resourceMap != null) {
+ result = resourceMap.resolve(synCfg, schemaLocation);
+ }
+ if (result == null) {
+ result = SynapseConfigUtils.resolveRelativeURI(baseUri, schemaLocation);
+ }
+ return result;
}
}
Copied: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomWSDLLocator.java (from r612706, webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapWSDLLocator.java)
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomWSDLLocator.java?p2=webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomWSDLLocator.java&p1=webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapWSDLLocator.java&r1=612706&r2=612800&rev=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMapWSDLLocator.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/CustomWSDLLocator.java Thu Jan 17 04:05:24 2008
@@ -19,28 +19,34 @@
package org.apache.synapse.core.axis2;
-import javax.wsdl.xml.WSDLLocator;
-
+import org.apache.synapse.config.SynapseConfigUtils;
import org.apache.synapse.config.SynapseConfiguration;
import org.xml.sax.InputSource;
+import javax.wsdl.xml.WSDLLocator;
+
/**
* Class that adapts a ResourceMap object to WSDLLocator.
*/
-public class ResourceMapWSDLLocator implements WSDLLocator {
+public class CustomWSDLLocator implements WSDLLocator {
private final InputSource baseInputSource;
private final String baseURI;
- private final ResourceMap resourceMap;
- private final SynapseConfiguration synCfg;
-
+ private ResourceMap resourceMap;
+ private SynapseConfiguration synCfg;
+
private String latestImportURI;
-
- public ResourceMapWSDLLocator(InputSource baseInputSource,
+
+ public CustomWSDLLocator(InputSource baseInputSource,
+ String baseURI) {
+ this.baseInputSource = baseInputSource;
+ this.baseURI = baseURI;
+ }
+
+ public CustomWSDLLocator(InputSource baseInputSource,
String baseURI,
ResourceMap resourceMap,
SynapseConfiguration synCfg) {
- this.baseInputSource = baseInputSource;
- this.baseURI = baseURI;
+ this(baseInputSource, baseURI);
this.resourceMap = resourceMap;
this.synCfg = synCfg;
}
@@ -54,8 +60,14 @@
}
public InputSource getImportInputSource(String parentLocation, String relativeLocation) {
- InputSource result = resourceMap.resolve(synCfg, relativeLocation);
- latestImportURI = relativeLocation;
+ InputSource result = null;
+ if (resourceMap != null) {
+ result = resourceMap.resolve(synCfg, relativeLocation);
+ }
+ if (result == null) {
+ result = SynapseConfigUtils.resolveRelativeURI(parentLocation, relativeLocation);
+ }
+ this.latestImportURI = relativeLocation;
return result;
}
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java Thu Jan 17 04:05:24 2008
@@ -276,24 +276,37 @@
wsdlToAxisServiceBuilder.setBaseUri(
wsdlURI != null ? wsdlURI.toString() : "");
- if (resourceMap != null) {
+ if (trace()) {
+ trace.info("Setting up custom resolvers");
+ }
+ // Set up the URIResolver
- if (trace()) {
- trace.info("Setting up custom resolvers");
- }
- // Set up the URIResolver
+ if (resourceMap != null) {
+ // if the resource map is available use it
wsdlToAxisServiceBuilder.setCustomResolver(
- new ResourceMapURIResolver(resourceMap, synCfg));
+ new CustomURIResolver(resourceMap, synCfg));
// Axis 2 also needs a WSDLLocator for WSDL 1.1 documents
if (wsdlToAxisServiceBuilder instanceof WSDL11ToAxisServiceBuilder) {
((WSDL11ToAxisServiceBuilder)
wsdlToAxisServiceBuilder).setCustomWSLD4JResolver(
- new ResourceMapWSDLLocator(new InputSource(wsdlInputStream),
+ new CustomWSDLLocator(new InputSource(wsdlInputStream),
wsdlURI != null ? wsdlURI.toString() : "",
resourceMap, synCfg));
}
+ } else {
+ //if the resource map isn't available ,
+ //then each import URIs will be resolved using base URI
+ wsdlToAxisServiceBuilder.setCustomResolver(
+ new CustomURIResolver());
+ // Axis 2 also needs a WSDLLocator for WSDL 1.1 documents
+ if (wsdlToAxisServiceBuilder instanceof WSDL11ToAxisServiceBuilder) {
+ ((WSDL11ToAxisServiceBuilder)
+ wsdlToAxisServiceBuilder).setCustomWSLD4JResolver(
+ new CustomWSDLLocator(new InputSource(wsdlInputStream),
+ wsdlURI != null ? wsdlURI.toString() : ""));
+ }
}
-
+
if (trace()) {
trace.info("Populating Axis2 service using WSDL");
if (trace.isTraceEnabled()) {
Modified: webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMap.java
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMap.java?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMap.java (original)
+++ webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/core/axis2/ResourceMap.java Thu Jan 17 04:05:24 2008
@@ -19,14 +19,6 @@
package org.apache.synapse.core.axis2;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import javax.xml.stream.XMLStreamException;
-
import org.apache.axiom.om.OMElement;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,6 +26,13 @@
import org.apache.synapse.config.SynapseConfiguration;
import org.xml.sax.InputSource;
+import javax.xml.stream.XMLStreamException;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
/**
* A resource map.
*
@@ -45,7 +44,7 @@
* object.
*/
public class ResourceMap {
- private static final Log log = LogFactory.getLog(ResourceMapURIResolver.class);
+ private static final Log log = LogFactory.getLog(ResourceMap.class);
private final Map/*<String,String>*/ resources = new LinkedHashMap();
Modified: webservices/synapse/branches/1.1.1/repository/conf/wrapper.conf
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/repository/conf/wrapper.conf?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/repository/conf/wrapper.conf (original)
+++ webservices/synapse/branches/1.1.1/repository/conf/wrapper.conf Thu Jan 17 04:05:24 2008
@@ -34,6 +34,7 @@
wrapper.java.additional.6=-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration
wrapper.java.additional.7=-Dlog4j.configuration=file:lib/log4j.properties
wrapper.java.additional.8=-Djava.io.tmpdir=work/temp/synapse
+wrapper.java.additional.9=-Dresolve.root=repository
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=128
Modified: webservices/synapse/branches/1.1.1/src/main/bin/synapse.bat
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/src/main/bin/synapse.bat?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/src/main/bin/synapse.bat (original)
+++ webservices/synapse/branches/1.1.1/src/main/bin/synapse.bat Thu Jan 17 04:05:24 2008
@@ -126,7 +126,7 @@
echo Using JAVA_HOME: %JAVA_HOME%
echo Using SYNAPSE_XML: %_SYNAPSE_XML%
-%_JAVACMD% -server -Xms128M -Xmx128M %_PORT% %_SYNAPSE_XML% -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Dsynapse.home="%SYNAPSE_HOME%" -Daxis2.xml="%SYNAPSE_HOME%\repository\conf\axis2.xml" -Djava.endorsed.dirs=%SYNAPSE_ENDORSED% -Djava.io.tmpdir=$SYNAPSE_HOME\work\temp\synapse %_XDEBUG% -cp %SYNAPSE_CLASS_PATH% org.apache.synapse.SynapseServer "%SYNAPSE_HOME%\repository"
+%_JAVACMD% -server -Xms128M -Xmx128M %_PORT% %_SYNAPSE_XML% -D-Dresolve.root=%SYNAPSE_HOME%\repository -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Dsynapse.home="%SYNAPSE_HOME%" -Daxis2.xml="%SYNAPSE_HOME%\repository\conf\axis2.xml" -Djava.endorsed.dirs=%SYNAPSE_ENDORSED% -Djava.io.tmpdir=$SYNAPSE_HOME\work\temp\synapse %_XDEBUG% -cp %SYNAPSE_CLASS_PATH% org.apache.synapse.SynapseServer "%SYNAPSE_HOME%\repository"
goto end
:end
Modified: webservices/synapse/branches/1.1.1/src/main/bin/synapse.sh
URL: http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/src/main/bin/synapse.sh?rev=612800&r1=612799&r2=612800&view=diff
==============================================================================
--- webservices/synapse/branches/1.1.1/src/main/bin/synapse.sh (original)
+++ webservices/synapse/branches/1.1.1/src/main/bin/synapse.sh Thu Jan 17 04:05:24 2008
@@ -171,4 +171,4 @@
echo "Using JAVA_HOME: $JAVA_HOME"
echo "Using SYNAPSE_XML: $SYNAPSE_XML"
-$JAVA_HOME/bin/java -server -Xms128M -Xmx128M $XDEBUG $PORT $SYNAPSE_XML -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Dsynapse.home=$SYNAPSE_HOME -Daxis2.xml=$SYNAPSE_HOME/repository/conf/axis2.xml -Djava.endorsed.dirs=$SYNAPSE_ENDORSED -Djava.io.tmpdir=$SYNAPSE_HOME/work/temp/synapse -classpath $SYNAPSE_CLASSPATH org.apache.synapse.SynapseServer $SYNAPSE_HOME/repository
+$JAVA_HOME/bin/java -server -Xms128M -Xmx128M $XDEBUG $PORT $SYNAPSE_XML -Dresolve.root=$SYNAPSE_HOME/repository -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Dsynapse.home=$SYNAPSE_HOME -Daxis2.xml=$SYNAPSE_HOME/repository/conf/axis2.xml -Djava.endorsed.dirs=$SYNAPSE_ENDORSED -Djava.io.tmpdir=$SYNAPSE_HOME/work/temp/synapse -classpath $SYNAPSE_CLASSPATH org.apache.synapse.SynapseServer $SYNAPSE_HOME/repository
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org