Author: thomas.diesler(a)jboss.com
Date: 2006-12-19 11:40:39 -0500 (Tue, 19 Dec 2006)
New Revision: 1670
Modified:
trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
trunk/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
Log:
Fix handling of client meta data, remove dependency on resourceLoader.
[JBCTS-481] Fix jaxrpc/api/javax_xml_rpc/Stub
Modified: trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -32,9 +32,7 @@
import java.io.ObjectInputStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import java.net.URLEncoder;
import java.rmi.Remote;
import java.util.ArrayList;
@@ -127,31 +125,6 @@
throw new NamingException("Cannot unmarshall service ref meta data,
cause: " + e.toString());
}
- // reconstruct the resourceCl
- ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- URL url = new
URL((String)ref.get(ServiceReferenceable.DEPLOYMENT_URL).getContent());
- URLClassLoader resourceCL = new URLClassLoader(new URL[] { url }, contextCL);
- serviceRefMetaData.setResourceCL(resourceCL);
-
- // Rewrite the config-file content
- String configFile = serviceRefMetaData.getConfigFile();
- if (configFile != null)
- {
- try
- {
- new URL(configFile);
- }
- catch (MalformedURLException ex)
- {
- URL configURL = resourceCL.getResource(configFile);
- if (configURL != null)
- {
- configFile = configURL.toExternalForm();
- serviceRefMetaData.setConfigFile(configFile);
- }
- }
- }
-
// Unmarshall the WSSecurityConfiguration
WSSecurityConfiguration securityConfig = null;
RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
@@ -171,15 +144,15 @@
}
ServiceImpl jaxrpcService = null;
- URL wsdlURL = serviceRefMetaData.getWsdlURL();
- if (wsdlURL != null)
+ URL wsdlLocation = serviceRefMetaData.getWsdlLocation();
+ if (wsdlLocation != null)
{
log.debug("Create jaxrpc service from wsdl");
// Create the actual service object
QName serviceName = serviceRefMetaData.getServiceQName();
JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
- jaxrpcService = new ServiceImpl(serviceName, wsdlURL, javaWsdlMapping,
securityConfig, serviceRefMetaData);
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping,
securityConfig, serviceRefMetaData);
}
else
{
@@ -244,6 +217,7 @@
********************************************************/
// load the service interface class
+ ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
Class siClass = contextCL.loadClass(serviceRefMetaData.getServiceInterface());
if (Service.class.isAssignableFrom(siClass) == false)
throw new JAXRPCException("The service interface does not implement
javax.xml.rpc.Service: " + siClass.getName());
Modified: trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -26,6 +26,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
@@ -35,9 +36,11 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
+import org.jboss.logging.Logger;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
@@ -55,6 +58,9 @@
*/
public class ServiceReferenceable implements Referenceable
{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceReferenceable.class);
+
public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
public static final String DEPLOYMENT_URL = "DEPLOYMENT_URL";
public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
@@ -95,6 +101,7 @@
// Add a reference to the ServiceRefMetaData and WSDLDefinitions
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
+ // FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
if (getSecurityConfigURL() != null)
myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
@@ -169,9 +176,19 @@
private URL getSecurityConfigURL()
{
- ClassLoader ctxClassLoader = refMetaData.getResourceCL();
- String descriptorLoc = udi.metaData instanceof UnifiedWebMetaData ?
"WEB-INF" : "META-INF";
- URL securityURL = ctxClassLoader.getResource(descriptorLoc + "/" +
WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
- return securityURL;
+ String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ?
"WEB-INF" : "META-INF";
+ descriptorPath = descriptorPath + "/" +
WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
+ try
+ {
+ URL securityURL = udi.getMetaDataFile(descriptorPath);
+ InputStream inputStream = new ResourceURL(securityURL).openStream();
+ inputStream.close();
+ return securityURL;
+ }
+ catch (IOException ex)
+ {
+ log.debug("Cannot find security config: " + descriptorPath);
+ return null;
+ }
}
}
\ No newline at end of file
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -62,18 +62,28 @@
WebMetaData webMetaData = allMetaData.iterator().next();
try
{
- ClassLoader anLoader = unit.getClassLoader();
-
Iterator it = webMetaData.getServlets().iterator();
while (it.hasNext())
{
Servlet servlet = (Servlet)it.next();
+ String servletClassName = servlet.getServletClass();
+
// Skip JSPs
- if (servlet.getServletClass() == null ||
servlet.getServletClass().length() == 0)
+ if (servletClassName == null)
continue;
- String beanName = servlet.getServletClass();
- Class<?> servletClass = anLoader.loadClass(beanName);
+ Class<?> servletClass = null;
+ try
+ {
+ ClassLoader loader = unit.getClassLoader();
+ servletClass = loader.loadClass(servletClassName.trim());
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClassName);
+ continue;
+ }
+
if (servletClass.isAnnotationPresent(WebService.class) ||
servletClass.isAnnotationPresent(WebServiceProvider.class))
{
isWebServiceDeployment = true;
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -71,7 +71,8 @@
String className = (deployment != null ? deployment.getClass().getName() : null);
if ((deployment instanceof DeploymentUnit) == false)
throw new IllegalArgumentException("Expected " +
DeploymentUnit.class.getName() + ", but was: " + className);
-
+
+ DeploymentUnit unit = (DeploymentUnit)deployment;
try
{
while (serviceRefs.hasNext())
@@ -79,6 +80,20 @@
ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
String serviceRefName = serviceRef.getServiceRefName();
+ // Build the container independent deployment info
+ UnifiedDeploymentInfo udi = new
JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+
+ // Convert wsdlFile to URL
+ String wsdlFile = serviceRef.getWsdlFile();
+ if (wsdlFile != null)
+ serviceRef.setWsdlFile(udi.getMetaDataFile(wsdlFile).toExternalForm());
+
+ // Convert mappingFile to URL
+ String mappingFile = serviceRef.getMappingFile();
+ if (mappingFile != null)
+
serviceRef.setMappingFile(udi.getMetaDataFile(mappingFile).toExternalForm());
+
UnifiedServiceRefMetaData wsServiceRef =
ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(serviceRef);
JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
@@ -87,10 +102,6 @@
Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
wsServiceRef.setWsdlDefinition(wsdlDefinition);
- // build the container independent deployment info
- UnifiedDeploymentInfo udi = new
JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, (DeploymentUnit)deployment);
-
ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
Util.bind(envCtx, serviceRefName, ref);
@@ -106,7 +117,7 @@
private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
{
JavaWsdlMapping javaWsdlMapping = null;
- URL mappingURL = serviceRef.getJavaWsdlMappingURL();
+ URL mappingURL = serviceRef.getMappingLocation();
if (mappingURL != null)
{
try
@@ -128,7 +139,7 @@
Definition wsdlDefinition = null;
{
URL wsdlOverride = serviceRef.getWsdlOverride();
- URL wsdlURL = serviceRef.getWsdlURL();
+ URL wsdlURL = serviceRef.getWsdlLocation();
if (wsdlOverride == null && wsdlURL != null)
{
try
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2006-12-19
13:13:51 UTC (rev 1669)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -21,16 +21,29 @@
*/
package org.jboss.ws.integration.jboss50;
+import java.util.Iterator;
+
import javax.management.ObjectName;
+import javax.naming.Context;
-import org.jboss.webservice.ServiceRefHandler;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* MBean interface.
*/
-public interface ServiceRefHandlerMBean extends ServiceRefHandler
+public interface ServiceRefHandlerMBean
{
// default object name
public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
+
+ /**
+ * Binds a JAXRPC Service into the callers ENC for every service-ref element
+ *
+ * @param envCtx ENC to bind the javax.rpc.xml.Service object to
+ * @param serviceRefs An iterator of the service-ref elements in the client deployment
descriptor
+ * @param deployment The client's deployment unit
+ * @throws DeploymentException if it goes wrong
+ */
+ void setupServiceRefEnvironment(Context envCtx, Iterator serviceRefs, Object
deployment);
}
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2006-12-19
13:13:51 UTC (rev 1669)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -23,11 +23,17 @@
// $Id$
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import javax.xml.namespace.QName;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
@@ -45,13 +51,13 @@
*/
public class ServiceRefMetaDataAdaptor
{
- public static UnifiedServiceRefMetaData
buildUnifiedServiceRefMetaData(ServiceRefMetaData srmd)
+ public static UnifiedServiceRefMetaData
buildUnifiedServiceRefMetaData(ServiceRefMetaData srmd) throws Exception
{
UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
usrmd.setServiceRefName(srmd.getServiceRefName());
usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlFile(srmd.getWsdlFile());
- usrmd.setJaxrpcMappingFile(srmd.getJaxrpcMappingFile());
+ usrmd.setWsdlLocation(getWsdlLocation(srmd));
+ usrmd.setMappingLocation(getMetaDataURL(srmd.getMappingFile()));
usrmd.setServiceQName(srmd.getServiceQName());
LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
@@ -94,8 +100,21 @@
usrmd.setConfigFile(srmd.getConfigFile());
usrmd.setWsdlOverride(srmd.getWsdlOverride());
usrmd.setCallProperties(srmd.getCallProperties());
- usrmd.setResourceCL(srmd.getResourceCL());
return usrmd;
}
+
+ private static URL getWsdlLocation(ServiceRefMetaData srmd) throws
MalformedURLException
+ {
+ URL wsdlLocation = srmd.getWsdlOverride();
+ if (wsdlLocation == null)
+ wsdlLocation = getMetaDataURL(srmd.getWsdlFile());
+
+ return wsdlLocation;
+ }
+
+ private static URL getMetaDataURL(String resourcePath) throws MalformedURLException
+ {
+ return (resourcePath != null ? new URL(resourcePath) : null);
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -1,24 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.ws.metadata.config;
+// $Id: $
+
+
/**
* Provides configuration for JBossWS components.<br>
* Currently this is implemented by <code>EndpointMetaData</code>.
*
* @author Heiko.Braun(a)jboss.org
- * @version $Id$
* @since 15.12.2006
*
* @see org.jboss.ws.metadata.umdm.EndpointMetaData
*/
-public interface ConfigurationProvider {
+public interface ConfigurationProvider
+{
- static final String DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE =
"META-INF/standard-jaxrpc-endpoint-config.xml";
- static final String DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE =
"META-INF/standard-jaxws-endpoint-config.xml";
- static final String DEFAULT_ENDPOINT_CONFIG_NAME = "Standard
Endpoint";
+ static final String DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE =
"META-INF/standard-jaxrpc-endpoint-config.xml";
+ static final String DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE =
"META-INF/standard-jaxws-endpoint-config.xml";
+ static final String DEFAULT_ENDPOINT_CONFIG_NAME = "Standard Endpoint";
- static final String DEFAULT_JAXRPC_CLIENT_CONFIG =
"META-INF/standard-jaxrpc-client-config.xml";
- static final String DEFAULT_JAXWS_CLIENT_CONFIG =
"META-INF/standard-jaxws-client-config.xml";
- static final String DEFAULT_CLIENT_CONFIG_NAME = "Standard
Client";
+ static final String DEFAULT_JAXRPC_CLIENT_CONFIG =
"META-INF/standard-jaxrpc-client-config.xml";
+ static final String DEFAULT_JAXWS_CLIENT_CONFIG =
"META-INF/standard-jaxws-client-config.xml";
+ static final String DEFAULT_CLIENT_CONFIG_NAME = "Standard Client";
/**
* Callback for components that require configuration through jbossws-dd
Modified: trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-19
13:13:51 UTC (rev 1669)
+++
trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -25,7 +25,6 @@
import java.io.Serializable;
import java.net.URL;
-import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
@@ -44,16 +43,16 @@
*/
public class UnifiedServiceRefMetaData implements Serializable
{
- private static final long serialVersionUID = 122554634182144069L;
+ private static final long serialVersionUID = -6845188004746036291L;
// The required <service-ref-name> element
private String serviceRefName;
// The required <service-interface> element
private String serviceInterface;
// The optional <wsdl-file> element
- private String wsdlFile;
+ private URL wsdlLocation;
// The optional <jaxrpc-mapping-file> element
- private String jaxrpcMappingFile;
+ private URL mappingLocation;
// The optional <service-qname> element
private QName serviceQName;
// The LinkedHashMap<String, UnifiedPortComponentRefMetaData> for
<port-component-ref> elements
@@ -75,50 +74,16 @@
// The java/wsdl mapping, if we have one
private Object javaWsdlMapping;
- //The ClassLoader to load additional resources
- private transient URLClassLoader resourceCL;
-
- /** Set the resource classloader that can load the wsdl file
- * On the client side this is set expicitly after unmarshalling.
- */
- public void setResourceCL(URLClassLoader resourceCL)
+ public URL getMappingLocation()
{
- if (resourceCL == null)
- throw new IllegalArgumentException("ResourceClassLoader cannot be
null");
-
- this.resourceCL = resourceCL;
+ return mappingLocation;
}
- public URLClassLoader getResourceCL()
+ public void setMappingLocation(URL mappingLocation)
{
- if (resourceCL == null)
- resourceCL = new URLClassLoader(new URL[] {},
Thread.currentThread().getContextClassLoader());
-
- return resourceCL;
+ this.mappingLocation = mappingLocation;
}
- public String getJaxrpcMappingFile()
- {
- return jaxrpcMappingFile;
- }
-
- public void setJaxrpcMappingFile(String jaxrpcMappingFile)
- {
- this.jaxrpcMappingFile = jaxrpcMappingFile;
- }
-
- public URL getJavaWsdlMappingURL()
- {
- URL mappingURL = null;
- if (jaxrpcMappingFile != null)
- {
- mappingURL = getResourceCL().findResource(jaxrpcMappingFile);
- if (mappingURL == null)
- throw new IllegalStateException("Cannot find resource: " +
jaxrpcMappingFile);
- }
- return mappingURL;
- }
-
public Object getJavaWsdlMapping()
{
return javaWsdlMapping;
@@ -183,14 +148,14 @@
this.serviceRefName = serviceRefName;
}
- public String getWsdlFile()
+ public URL getWsdlLocation()
{
- return wsdlFile;
+ return wsdlLocation;
}
- public void setWsdlFile(String wsdlFile)
+ public void setWsdlLocation(URL wsdlLocation)
{
- this.wsdlFile = wsdlFile;
+ this.wsdlLocation = wsdlLocation;
}
public String getConfigFile()
@@ -218,24 +183,11 @@
return wsdlOverride;
}
-
public void setWsdlOverride(URL wsdlOverride)
{
this.wsdlOverride = wsdlOverride;
}
- public URL getWsdlURL()
- {
- URL wsdlURL = wsdlOverride;
- if (wsdlURL == null && wsdlFile != null)
- {
- wsdlURL = getResourceCL().findResource(wsdlFile);
- if (wsdlURL == null)
- throw new IllegalStateException("Cannot find resource: " +
wsdlFile);
- }
- return wsdlURL;
- }
-
public Properties getCallProperties()
{
return callProperties;
Modified: trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -23,6 +23,19 @@
// $Id$
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.Service.Mode;
+
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -38,16 +51,13 @@
import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.metadata.config.*;
+import org.jboss.ws.metadata.config.CommonConfig;
+import org.jboss.ws.metadata.config.Configurable;
+import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.config.EndpointFeature;
+import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.Service.Mode;
-import java.lang.reflect.Method;
-import java.util.*;
-
/**
* A Service component describes a set of endpoints.
*
Modified: trunk/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -120,7 +120,8 @@
if (index == -1 && matchTypes(returnType, expectedType, exact, false))
return true;
- if (index < parameters.length && matchTypes(parameters[index],
expectedType, exact, holder))
+ boolean indexInBounds = -1 < index && index < parameters.length;
+ if (indexInBounds && matchTypes(parameters[index], expectedType, exact,
holder))
{
matches.add(index);
return true;
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2006-12-19
13:13:51 UTC (rev 1669)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2006-12-19
16:40:39 UTC (rev 1670)
@@ -27,6 +27,7 @@
import java.util.HashMap;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.SimpleTypeBindings;
@@ -80,24 +81,21 @@
/**
* Factory method for JavaWsdlMapping
*/
- public WSSecurityConfiguration parse(URL configurationFile) throws IOException
+ public WSSecurityConfiguration parse(URL configURL) throws IOException
{
- if (configurationFile == null)
- {
+ if (configURL == null)
throw new IllegalArgumentException("URL cannot be null");
- }
- // setup the XML binding Unmarshaller
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- InputStream is = configurationFile.openStream();
+ InputStream is = new ResourceURL(configURL).openStream();
try
{
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
WSSecurityConfiguration configuration = (WSSecurityConfiguration)
unmarshaller.unmarshal(is, this, null);
return configuration;
}
catch (JBossXBException e)
{
- IOException ioex = new IOException("Cannot parse: " +
configurationFile);
+ IOException ioex = new IOException("Cannot parse: " + configURL);
Throwable cause = e.getCause();
if (cause != null)
ioex.initCause(cause);