Author: thomas.diesler(a)jboss.com
Date: 2006-11-21 05:49:43 -0500 (Tue, 21 Nov 2006)
New Revision: 1484
Modified:
trunk/src/main/java/org/jboss/ws/common/CommonClient.java
trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java
trunk/src/main/java/org/jboss/ws/jaxrpc/MetaDataSynchronization.java
trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceObjectFactory.java
trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java
trunk/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java
trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/FaultMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/HandlerMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
trunk/src/test/resources/jaxws/samples/jsr181ejb/wstools-config.xml
trunk/src/test/resources/jaxws/samples/jsr181pojo/wstools-config.xml
trunk/src/test/resources/jaxws/samples/wsaddressing/wstools-config.xml
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/wstools-config.xml
trunk/src/test/resources/jaxws/wsaddressing/replyto/ReplyTo-META-INF/wstools-config.xml
Log:
[JBWS-1113] Improve performance of Service.getPort()
Modified: trunk/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 10:46:14 UTC (rev
1483)
+++ trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 10:49:43 UTC (rev
1484)
@@ -55,7 +55,6 @@
import org.jboss.ws.soap.SOAPBodyImpl;
import org.jboss.ws.soap.SOAPConnectionImpl;
import org.jboss.ws.utils.HolderUtils;
-import org.jboss.ws.utils.JavaUtils;
/**
* Provides support for the dynamic invocation of a service endpoint.
@@ -181,6 +180,8 @@
if (epMetaData == null)
{
UnifiedMetaData wsMetaData = new UnifiedMetaData();
+ wsMetaData.setClassLoader(Thread.currentThread().getContextClassLoader());
+
ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new
QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
wsMetaData.addService(serviceMetaData);
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java 2006-11-21 10:46:14 UTC (rev
1483)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java 2006-11-21 10:49:43 UTC (rev
1484)
@@ -33,7 +33,6 @@
import java.util.Map;
import java.util.Set;
-import javax.xml.rpc.Call;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Stub;
import javax.xml.rpc.soap.SOAPFaultException;
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/MetaDataSynchronization.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/MetaDataSynchronization.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/MetaDataSynchronization.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -49,6 +49,7 @@
if (epMetaData.getServiceEndpointInterface() != seiClass)
throw new IllegalArgumentException("Endpoint meta data SEI missmatch,
expected: " + epMetaData.getServiceEndpointInterfaceName());
+ /*
Method[] methods = seiClass.getMethods();
for (int i = 0; i < methods.length; i++)
{
@@ -63,5 +64,6 @@
if (opMetaData == null)
throw new ServiceException("Cannot obtain operation meta data for
method: " + method);
}
+ */
}
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceObjectFactory.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceObjectFactory.java 2006-11-21 10:46:14
UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceObjectFactory.java 2006-11-21 10:49:43
UTC (rev 1484)
@@ -180,22 +180,6 @@
QName serviceName = serviceRefMetaData.getServiceQName();
JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
jaxrpcService = new ServiceImpl(serviceName, wsdlURL, javaWsdlMapping,
securityConfig, serviceRefMetaData);
-
- // Setup endpoint meta data
- ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- for (UnifiedPortComponentRefMetaData pcRefMetaData :
serviceRefMetaData.getPortComponentRefs())
- {
- String seiName = pcRefMetaData.getServiceEndpointInterface();
- for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
- {
- String epSEIName = epMetaData.getServiceEndpointInterfaceName();
- if (seiName.equals(epSEIName) || epSEIName == null)
- {
- epMetaData.setServiceEndpointInterfaceName(seiName);
- epMetaData.setProperties(pcRefMetaData.getCallProperties());
- }
- }
- }
}
else
{
@@ -307,8 +291,7 @@
HandlerMetaDataJAXRPC jaxrpcMetaData =
(HandlerMetaDataJAXRPC)handlerMetaData;
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
- ClassLoader cl = epMetaData.getClassLoader();
- Class hClass = cl.loadClass(jaxrpcMetaData.getHandlerClass());
+ Class hClass = jaxrpcMetaData.getHandlerClass();
HashMap hConfig = new HashMap();
for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -154,7 +154,7 @@
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
Class hClass;
- String handlerClass = jaxrpcMetaData.getHandlerClass();
+ String handlerClass = jaxrpcMetaData.getHandlerClassName();
try
{
// Load the handler class using the deployments top level CL
Modified: trunk/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -119,12 +119,16 @@
public void generate(FaultMetaData fmd)
{
+ // If a wrapper already present, no need to generate one
String faultBeanName = fmd.getFaultBeanName();
if (faultBeanName == null || JavaUtils.isLoaded(faultBeanName, loader))
return;
+ log.debug("Generating fault bean: " + faultBeanName);
+
+ QName xmlType = fmd.getXmlType();
+
Class exception = fmd.getJavaType();
-
try
{
SortedMap<String, Class<?>> properties =
getExceptionProperties(exception);
@@ -142,8 +146,12 @@
}
catch (Exception e)
{
- throw new WSException("Could not generate wrapper type: " +
faultBeanName, e);
+ throw new WSException("Could not generate fault wrapper bean: " +
faultBeanName, e);
}
+
+ // Add the generated type to the types meta data
+ TypesMetaData types =
fmd.getOperationMetaData().getEndpointMetaData().getServiceMetaData().getTypesMetaData();
+ types.addTypeMapping(new TypeMappingMetaData(types, xmlType, faultBeanName));
}
private static String getterPrefix(CtClass type)
Modified: trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -135,7 +135,7 @@
{
HandlerMetaDataJAXWS jaxwsMetaData = (HandlerMetaDataJAXWS)handlerMetaData;
String handlerName = jaxwsMetaData.getHandlerName();
- String className = jaxwsMetaData.getHandlerClass();
+ String className = jaxwsMetaData.getHandlerClassName();
Set<QName> soapHeaders = jaxwsMetaData.getSoapHeaders();
try
Modified: trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-11-21 10:46:14
UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-11-21 10:49:43
UTC (rev 1484)
@@ -24,8 +24,8 @@
// $Id$
import java.lang.reflect.Method;
-import java.net.URLClassLoader;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -37,8 +37,8 @@
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.Constants;
import org.jboss.ws.common.CommonSOAPBinding;
import org.jboss.ws.jaxrpc.Style;
import org.jboss.ws.jaxrpc.TypeMappingImpl;
@@ -70,7 +70,7 @@
}
// The parent meta data.
- private ServiceMetaData service;
+ private ServiceMetaData serviceMetaData;
// The REQUIRED endpoint config
protected WSCommonConfig endpointConfig;
@@ -89,6 +89,8 @@
private String endpointAddress;
// The endpoint interface name
private String seiName;
+ // The endpoint interface
+ private Class seiClass;
// The optional authentication method
private String authMethod;
// The optional transport guarantee
@@ -111,12 +113,12 @@
private List<HandlerMetaData> handlers = new
ArrayList<HandlerMetaData>();
// True if the handlers are initialized
private boolean handlersInitialized;
- // The operation meta data cache
- private transient Map<Method,OperationMetaData> methodCache = new
HashMap<Method,OperationMetaData>();
+ // Maps the java method to the operation meta data
+ private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method,
OperationMetaData>();
public EndpointMetaData(ServiceMetaData service, QName qname, QName interfaceQName,
Type type)
{
- this.service = service;
+ this.serviceMetaData = service;
this.portName = qname;
this.interfaceQName = interfaceQName;
this.type = type;
@@ -127,7 +129,7 @@
public ServiceMetaData getServiceMetaData()
{
- return service;
+ return serviceMetaData;
}
public QName getQName()
@@ -148,6 +150,7 @@
public void setConfigFile(String configFile)
{
this.configFile = configFile;
+ this.endpointConfig = null;
}
public String getConfigName()
@@ -158,6 +161,7 @@
public void setConfigName(String configName)
{
this.configName = configName;
+ this.endpointConfig = null;
}
public abstract Object getEndpointConfig();
@@ -189,9 +193,20 @@
return seiName;
}
- public void setServiceEndpointInterfaceName(String endpointInterfaceName)
+ public void setServiceEndpointInterfaceName(String seiName)
{
- this.seiName = endpointInterfaceName;
+ this.seiName = seiName;
+ this.seiClass = null;
+
+ UnifiedMetaData wsMetaData = serviceMetaData.getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
+ {
+ if (UnifiedMetaData.isFinalRelease() == false)
+ log.warn("Set SEI name after eager initialization", new
IllegalStateException());
+
+ // reinitialize
+ initializeInternal();
+ }
}
/** Get the class loader associated with the endpoint meta data */
@@ -201,28 +216,31 @@
return classLoader;
}
- /** Lazily load the SEI. The SEI class loader may not be available at creation time.
+ /**
+ * Load the service endpoint interface.
+ * It should only be cached during eager initialization.
*/
public Class getServiceEndpointInterface()
{
- String seiName = getServiceEndpointInterfaceName();
- if (seiName == null)
- throw new WSException("ServiceEndpointInterface name not available");
-
- Class seiClass = null;
- try
+ Class tmpClass = seiClass;
+ if (tmpClass == null && seiName != null)
{
- ClassLoader classLoader = getClassLoader();
- if (classLoader == null)
- throw new WSException("Class loader not available");
-
- seiClass = classLoader.loadClass(seiName);
+ try
+ {
+ ClassLoader classLoader = getClassLoader();
+ tmpClass = classLoader.loadClass(seiName);
+ if (serviceMetaData.getUnifiedMetaData().isEagerInitialized())
+ {
+ log.warn("Loading SEI after eager initialization");
+ seiClass = tmpClass;
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load service endpoint interface: " +
seiName, ex);
+ }
}
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load SEI: " + seiName, ex);
- }
- return seiClass;
+ return tmpClass;
}
public Use getEncodingStyle()
@@ -385,7 +403,14 @@
public OperationMetaData getOperation(Method method)
{
- OperationMetaData opMetaData = methodCache.get(method);
+ if (opMetaDataCache.size() == 0)
+ {
+ // This can happen when the SEI mapping was not found
+ log.warn("Access to empty operation meta data cache,
reinitializing");
+ initializeInternal();
+ }
+
+ OperationMetaData opMetaData = opMetaDataCache.get(method);
if (opMetaData == null)
{
for (OperationMetaData aux : operations)
@@ -402,7 +427,7 @@
if (doesMatch)
{
- methodCache.put(method, aux);
+ opMetaDataCache.put(method, aux);
opMetaData = aux;
break;
}
@@ -459,25 +484,63 @@
this.handlersInitialized = flag;
}
+ public void validate()
+ {
+ for (HandlerMetaData handler : handlers)
+ handler.validate();
+
+ for (OperationMetaData opMetaData : operations)
+ opMetaData.validate();
+ }
+
/**
* @see UnifiedMetaData#eagerInitialize()
*/
public void eagerInitialize()
{
- for (OperationMetaData operation : operations)
- operation.eagerInitialize();
+ initializeInternal();
+ }
- TypeMappingImpl typeMapping = service.getTypeMapping();
- for (TypeMappingMetaData tmMetaData :
service.getTypesMetaData().getTypeMappings())
+ private void initializeInternal()
+ {
+ eagerInitializeOperations();
+ eagerInitializeTypes();
+ }
+
+ private void eagerInitializeOperations()
+ {
+ seiClass = getServiceEndpointInterface();
+ if (seiClass != null)
{
+ List<Method> unsynchronizedMethods = new ArrayList<Method>();
+ unsynchronizedMethods.addAll(Arrays.asList(seiClass.getMethods()));
+
+ for (OperationMetaData opMetaData : operations)
+ {
+ opMetaData.eagerInitialize(unsynchronizedMethods);
+ Method method = opMetaData.getJavaMethod();
+ if (method != null)
+ {
+ opMetaDataCache.put(method, opMetaData);
+ unsynchronizedMethods.remove(method);
+ }
+ }
+ }
+ }
+
+ private void eagerInitializeTypes()
+ {
+ TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
+ for (TypeMappingMetaData tmMetaData :
serviceMetaData.getTypesMetaData().getTypeMappings())
+ {
String javaTypeName = tmMetaData.getJavaTypeName();
QName xmlType = tmMetaData.getXmlType();
if (xmlType != null)
{
- List<Class> classes = typeMapping.getJavaTypes(xmlType);
+ List<Class> registeredTypes = typeMapping.getJavaTypes(xmlType);
boolean registered = false;
- for (Class current : classes) {
+ for (Class current : registeredTypes) {
if (current.getName().equals(javaTypeName))
{
registered = true;
@@ -487,13 +550,11 @@
if (registered == false)
{
- ClassLoader classLoader = service.getUnifiedMetaData().getClassLoader();
- if (classLoader == null)
- throw new WSException("ClassLoader not available in meta
data");
-
try
{
+ ClassLoader classLoader = getClassLoader();
Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
+
if (JavaUtils.isPrimitive(javaTypeName))
javaType = JavaUtils.getWrapperType(javaType);
Modified: trunk/src/main/java/org/jboss/ws/metadata/FaultMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/FaultMetaData.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/FaultMetaData.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -25,6 +25,7 @@
import javax.xml.namespace.QName;
+import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.utils.JavaUtils;
@@ -38,8 +39,11 @@
*/
public class FaultMetaData
{
+ // provide logging
+ private final Logger log = Logger.getLogger(FaultMetaData.class);
+
// The parent operation
- private OperationMetaData operation;
+ private OperationMetaData opMetaData;
private QName xmlName;
private QName xmlType;
@@ -61,14 +65,14 @@
if (javaTypeName == null)
throw new IllegalArgumentException("Invalid null javaTypeName argument,
for: " + xmlName);
- this.operation = operation;
+ this.opMetaData = operation;
this.xmlName = xmlName;
this.javaTypeName = javaTypeName;
}
public OperationMetaData getOperationMetaData()
{
- return operation;
+ return opMetaData;
}
public QName getXmlName()
@@ -94,59 +98,51 @@
return javaTypeName;
}
+ /** Load the java type.
+ * It should only be cached during eager initialization.
+ */
public Class getJavaType()
{
- if (javaTypeName == null)
- return null;
-
- ClassLoader loader = getClassLoader();
-
- if (javaType == null || (!javaType.isPrimitive() &&
javaType.getClassLoader() != loader))
+ Class tmpJavaType = javaType;
+ if (tmpJavaType == null && javaTypeName != null)
{
try
{
- javaType = JavaUtils.loadJavaType(javaTypeName, loader);
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
+
+ if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
+ {
+ log.warn("Loading java type after eager initialization");
+ javaType = tmpJavaType;
+ }
}
catch (ClassNotFoundException ex)
{
throw new WSException("Cannot load java type: " + javaTypeName,
ex);
}
}
-
- return javaType;
+ return tmpJavaType;
}
public Class getFaultBean()
{
- if (faultBeanName == null)
- return null;
-
- ClassLoader loader = getClassLoader();
-
- if (faultBean == null || (!faultBean.isPrimitive() &&
faultBean.getClassLoader() != loader))
+ Class tmpFaultBean = faultBean;
+ if (tmpFaultBean == null && faultBeanName != null)
{
try
{
- faultBean = JavaUtils.loadJavaType(faultBeanName, loader);
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpFaultBean = JavaUtils.loadJavaType(faultBeanName, loader);
}
catch (ClassNotFoundException ex)
{
throw new WSException("Cannot load fault bean: " + faultBeanName,
ex);
}
}
-
- return faultBean;
+ return tmpFaultBean;
}
- private ClassLoader getClassLoader()
- {
- ClassLoader loader =
operation.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().getClassLoader();
- if (loader == null)
- throw new WSException("ClassLoader not available");
-
- return loader;
- }
-
public String getFaultBeanName()
{
return faultBeanName;
@@ -159,10 +155,15 @@
public void eagerInitialize()
{
- (new DynamicWrapperGenerator(getClassLoader())).generate(this);
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ new DynamicWrapperGenerator(loader).generate(this);
+
// Initialize the cache
- getJavaType();
- getFaultBean();
+ javaType = getJavaType();
+ if (javaType == null)
+ throw new WSException("Cannot load java type: " + javaTypeName);
+
+ faultBean = getFaultBean();
}
public String toString()
Modified: trunk/src/main/java/org/jboss/ws/metadata/HandlerMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/HandlerMetaData.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/HandlerMetaData.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -31,6 +31,9 @@
import javax.xml.namespace.QName;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+
/**
* The common metdata data for a handler element
*
@@ -39,38 +42,43 @@
*/
public abstract class HandlerMetaData implements Serializable
{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerMetaData.class);
+
public enum HandlerType
{
PRE, ENDPOINT, POST, ALL
};
- private transient EndpointMetaData endpointMetaData;
+ private transient EndpointMetaData epMetaData;
// The required <handler-name> element
private String handlerName;
// The required <handler-class> element
- private String handlerClass;
+ private String handlerClassName;
// The required handler type
private HandlerType handlerType;
// The optional <soap-header> elements
private Set<QName> soapHeaders = new HashSet<QName>();
// The optional <init-param> elements
private List<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
+ // The cached handler class
+ private Class handlerClass;
- public HandlerMetaData(EndpointMetaData endpointMetaData, HandlerType type)
+ public HandlerMetaData(EndpointMetaData epMetaData, HandlerType type)
{
- this.endpointMetaData = endpointMetaData;
+ this.epMetaData = epMetaData;
this.handlerType = type;
}
- public void setEndpointMetaData(EndpointMetaData endpointMetaData)
+ public void setEndpointMetaData(EndpointMetaData epMetaData)
{
- this.endpointMetaData = endpointMetaData;
+ this.epMetaData = epMetaData;
}
public EndpointMetaData getEndpointMetaData()
{
- return endpointMetaData;
+ return epMetaData;
}
public void setHandlerName(String value)
@@ -83,16 +91,37 @@
return handlerName;
}
- public void setHandlerClass(String handlerClass)
+ public void setHandlerClassName(String handlerClass)
{
- this.handlerClass = handlerClass;
+ this.handlerClassName = handlerClass;
}
- public String getHandlerClass()
+ public String getHandlerClassName()
{
- return handlerClass;
+ return handlerClassName;
}
+ public Class getHandlerClass()
+ {
+ if (handlerClassName == null)
+ throw new IllegalStateException("Handler class name cannot be null");
+
+ Class localClass = handlerClass;
+ if (localClass == null)
+ {
+ try
+ {
+ ClassLoader loader = epMetaData.getClassLoader();
+ localClass = loader.loadClass(handlerClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load handler: " + handlerClassName,
ex);
+ }
+ }
+ return localClass;
+ }
+
public HandlerType getHandlerType()
{
return handlerType;
@@ -118,8 +147,30 @@
return initParams;
}
- public static class HandlerInitParam
+ public void validate()
{
+ List<String> securityHandlers = new ArrayList<String>();
+
securityHandlers.add(org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerInbound.class.getName());
+
securityHandlers.add(org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound.class.getName());
+
securityHandlers.add(org.jboss.ws.wsse.jaxws.WSSecurityHandlerInbound.class.getName());
+
securityHandlers.add(org.jboss.ws.wsse.jaxws.WSSecurityHandlerOutbound.class.getName());
+
+ if (securityHandlers.contains(handlerClassName))
+ {
+ if (epMetaData.getServiceMetaData().getSecurityConfiguration() == null)
+ log.warn("WS-Security requires security configuration");
+ }
+ }
+
+ public void eagerInitialize()
+ {
+ handlerClass = getHandlerClass();
+ }
+
+ public static class HandlerInitParam implements Serializable
+ {
+ private static final long serialVersionUID = -8687875291620457318L;
+
// The required <handler-name> element
private String paramName;
// The required <handler-class> element
@@ -135,7 +186,6 @@
this.paramName = paramName;
}
-
public String getParamValue()
{
return paramValue;
Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-11-21 10:46:14
UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-11-21 10:49:43
UTC (rev 1484)
@@ -155,63 +155,70 @@
{
return javaName;
}
-
- /** Lazily load the java method. The SEI class loader may not be available at creation
time
- */
+
public Method getJavaMethod()
{
- ClassLoader loader =
getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().getClassLoader();
- if (javaMethod == null ||
javaMethod.getDeclaringClass().getClassLoader().equals(loader) == false)
+ Method tmpMethod = javaMethod;
+ Class seiClass = epMetaData.getServiceEndpointInterface();
+ if (tmpMethod == null && seiClass != null)
{
- javaMethod = null;
- try
+ for (Method method : seiClass.getMethods())
{
- Class seiClass = epMetaData.getServiceEndpointInterface();
- if (seiClass == null)
- throw new WSException("ServiceEndpointInterface not
available");
-
- for (Method method : seiClass.getMethods())
+ if (isJavaMethod(method))
{
- String methodName = method.getName();
-
- if (javaName.equals(methodName))
+ tmpMethod = method;
+
+ UnifiedMetaData wsMetaData =
epMetaData.getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
{
- log.trace("Found java method: " + method);
+ if (UnifiedMetaData.isFinalRelease() == false)
+ log.warn("Loading java method after eager initialization",
new IllegalStateException());
+
+ javaMethod = method;
+ }
+
+ break;
+ }
+ }
+
+ if (tmpMethod == null)
+ throw new WSException("Cannot find java method: " + javaName);
+ }
+ return tmpMethod;
+ }
- // compare params by java type name
- if (matchParameters(method, true))
- {
- log.debug("Found best matching java method: " + method);
- javaMethod = method;
- break;
- }
+ public boolean isJavaMethod(Method method)
+ {
+ boolean isJavaMethod = method.equals(javaMethod);
+ if (isJavaMethod == false)
+ {
+ String methodName = method.getName();
+ if (javaName.equals(methodName))
+ {
+ log.trace("Found java method: " + method);
- // compare params by assignability
- if (matchParameters(method, false))
- {
- log.debug("Found possible matching java method: " +
method);
- javaMethod = method;
- // continue on, in case there is a better matching method
- }
- }
+ // compare params by java type name
+ if (matchParameters(method, true))
+ {
+ log.debug("Found best matching java method: " + method);
+ isJavaMethod = true;
}
- if (javaMethod == null)
- throw new WSException("Cannot find java method: " + javaName);
+ // compare params by assignability
+ if (!isJavaMethod && matchParameters(method, false))
+ {
+ log.debug("Found possible matching java method: " + method);
+ isJavaMethod = true;
+ }
}
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot load java method: " + javaName);
- }
}
-
- return javaMethod;
+
+ if (log.isTraceEnabled())
+ log.trace("Synchronized java method:\n" + method + "\nwith:
" + toString());
+
+ return isJavaMethod;
}
-
+
private boolean matchParameters(Method method, boolean exact)
{
Class[] paramTypes = method.getParameterTypes();
@@ -439,8 +446,11 @@
/**
* @see UnifiedMetaData#eagerInitialize()
*/
- public void eagerInitialize()
+ public void eagerInitialize(List<Method> unsynchronizedMethods)
{
+ // reset java method
+ javaMethod = null;
+
for (ParameterMetaData parameter : parameters)
parameter.eagerInitialize();
@@ -449,6 +459,28 @@
for (FaultMetaData fault : faults)
fault.eagerInitialize();
+
+ // Method initialization
+ for (Method method : unsynchronizedMethods)
+ {
+ if (isJavaMethod(method))
+ {
+ javaMethod = method;
+ break;
+ }
+ }
+
+ // Report unsynchronized java method
+ if (javaMethod == null)
+ {
+ StringBuilder errMsg = new StringBuilder("Cannot synchronize to any of
these methods:");
+ for (Method method : unsynchronizedMethods)
+ {
+ errMsg.append("\n" + method);
+ }
+ errMsg.append("\n" + toString());
+ throw new IllegalStateException(errMsg.toString());
+ }
}
public String toString()
Modified: trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-21 10:46:14
UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-21 10:49:43
UTC (rev 1484)
@@ -52,8 +52,9 @@
*/
public class ParameterMetaData
{
- private static Logger log = Logger.getLogger(ParameterMetaData.class);
-
+ // provide logging
+ private final Logger log = Logger.getLogger(ParameterMetaData.class);
+
// The parent operation
private OperationMetaData opMetaData;
@@ -170,31 +171,42 @@
return javaTypeName;
}
- public void setJavaTypeName(String javaTypeName)
+ public void setJavaTypeName(String typeName)
{
- this.javaTypeName = javaTypeName;
+ // Warn if this is called after eager initialization
+ UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized() && UnifiedMetaData.isFinalRelease() ==
false)
+ log.warn("Set java type name after eager initialization", new
IllegalStateException());
+
+ javaTypeName = typeName;
+ javaType = null;
}
+ /** Load the java type.
+ * It should only be cached during eager initialization.
+ */
public Class getJavaType()
{
- ClassLoader loader = getClassLoader();
-
- if (javaTypeName == null)
- return null;
-
- if (javaType == null || ((!javaType.isPrimitive()) &&
javaType.getClassLoader() != loader))
+ Class tmpJavaType = javaType;
+ if (tmpJavaType == null && javaTypeName != null)
{
try
{
- javaType = JavaUtils.loadJavaType(javaTypeName, loader);
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
+
+ if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
+ {
+ // This should not happen, see the warning in setJavaTypeName
+ javaType = tmpJavaType;
+ }
}
catch (ClassNotFoundException ex)
{
throw new WSException("Cannot load java type: " + javaTypeName,
ex);
}
}
-
- return javaType;
+ return tmpJavaType;
}
public ParameterMode getMode()
@@ -341,8 +353,9 @@
wrapped.setAccessor(factory.create(wrapped));
}
- // Initialize the cache
- getJavaType();
+ javaType = getJavaType();
+ if (javaType == null)
+ throw new WSException("Cannot load java type: " + javaTypeName);
}
private ClassLoader getClassLoader()
Modified: trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -41,6 +41,7 @@
import org.jboss.ws.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.jaxrpc.Use;
import org.jboss.ws.jbossxb.SchemaBindingBuilder;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -339,6 +340,26 @@
return schemaBinding;
}
+ public void validate()
+ {
+ // Validate that there is at least one handler configured
+ // if we have a security configuration
+ if (securityConfiguration != null)
+ {
+ int handlerCount = 0;
+ for (EndpointMetaData epMetaData : endpoints.values())
+ {
+ handlerCount += epMetaData.getHandlerMetaData(HandlerType.ALL).size();
+ }
+ if (handlerCount == 0)
+ log.warn("WS-Security requires a security handler to be
configured");
+ }
+
+ // Validate endpoints
+ for (EndpointMetaData epMetaData : endpoints.values())
+ epMetaData.validate();
+ }
+
/**
* @see UnifiedMetaData#eagerInitialize()
*/
@@ -351,7 +372,7 @@
WSDLTypes types = definitions.getWsdlTypes();
if (types != null)
{
- JBossXSModel model = WSDLUtils.getSchemaModel(types);;
+ JBossXSModel model = WSDLUtils.getSchemaModel(types);
if (model != null)
model.eagerInitialize();
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -29,6 +29,7 @@
import java.util.Map;
import java.util.StringTokenizer;
+import org.jboss.logging.Logger;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.server.ServiceEndpointManager;
@@ -49,6 +50,9 @@
*/
public class UnifiedMetaData
{
+ // provide logging
+ private static Logger log = Logger.getLogger(UnifiedMetaData.class);
+
// The canonical deployment name
private String deploymentName;
// The modules class loader
@@ -58,7 +62,7 @@
// The implementation version
private static String implementationVersion;
// True if this is a final release
- private static boolean isDevRelease;
+ private static boolean isFinalRelease;
// Map<String, WSDLDefinitions> the wsdl-file to the wsdl Document
// Note the same wsdl can be used in multiple webservice descriptions
Map<String, WSDLDefinitions> wsdlMap = new HashMap<String,
WSDLDefinitions>();
@@ -67,20 +71,11 @@
Map<String, JavaWsdlMapping> jaxrpcMap = new HashMap<String,
JavaWsdlMapping>();
// The list of service meta data
private List<ServiceMetaData> services = new
ArrayList<ServiceMetaData>();
-
// Used by eager initialization
- private boolean initialized = false;
+ private boolean eagerInitialized;
+ // Used by validate
+ private boolean validated;
- public String getDeploymentName()
- {
- return deploymentName;
- }
-
- public void setDeploymentName(String deploymentName)
- {
- this.deploymentName = deploymentName;
- }
-
public UnifiedMetaData()
{
this.classLoader = Thread.currentThread().getContextClassLoader();
@@ -88,6 +83,9 @@
public ClassLoader getClassLoader()
{
+ if (classLoader == null)
+ throw new IllegalStateException ("Class loader not available");
+
return classLoader;
}
@@ -96,6 +94,16 @@
this.classLoader = classLoader;
}
+ public String getDeploymentName()
+ {
+ return deploymentName;
+ }
+
+ public void setDeploymentName(String deploymentName)
+ {
+ this.deploymentName = deploymentName;
+ }
+
public String getSecurityDomain()
{
return securityDomain;
@@ -140,6 +148,23 @@
return jaxrpcMap.get(jaxrpcFile);
}
+ public void validate()
+ {
+ if (validated == false)
+ {
+ for (ServiceMetaData service : services)
+ {
+ service.validate();
+ }
+ validated = true;
+ }
+ }
+
+ public boolean isEagerInitialized()
+ {
+ return eagerInitialized;
+ }
+
/**
* Eagerly initialize all cache values that are normally lazy-loaded. This
* allows for concurrent read-only access to a
<code>UnifiedMetaData</code>
@@ -147,12 +172,14 @@
*/
public void eagerInitialize()
{
- if (initialized == false)
+ if (eagerInitialized == false)
{
+ log.debug("Eagerly initialize the meta data model");
for (ServiceMetaData service : services)
+ {
service.eagerInitialize();
-
- initialized = true;
+ }
+ eagerInitialized = true;
}
}
@@ -161,15 +188,16 @@
if (implementationVersion == null)
{
implementationVersion =
ServiceEndpointManager.class.getPackage().getImplementationVersion();
- isDevRelease = new
StringTokenizer(implementationVersion).nextToken().endsWith(".DEV");
+ if (implementationVersion != null)
+ isFinalRelease = new
StringTokenizer(implementationVersion).nextToken().endsWith(".GA");
}
return implementationVersion;
}
- public static boolean isDevRelease()
+ public static boolean isFinalRelease()
{
getImplementationVersion();
- return isDevRelease;
+ return isFinalRelease;
}
public String toString()
@@ -188,4 +216,4 @@
}
return buffer.toString();
}
-}
\ No newline at end of file
+}
Modified: trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -147,7 +147,7 @@
{
HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClass(getHandlerClass());
+ hmd.setHandlerClassName(getHandlerClass());
hmd.seiInitParams(getInitParams());
hmd.setSoapHeaders(getSoapHeaders());
hmd.setSoapRoles(getSoapRoles());
@@ -159,7 +159,7 @@
{
HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClass(getHandlerClass());
+ hmd.setHandlerClassName(getHandlerClass());
hmd.seiInitParams(getInitParams());
hmd.setProtocolBindings(getProtocolBindings());
hmd.setServiceNamePattern(getServiceNamePattern());
Modified: trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -36,7 +36,6 @@
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
-import org.jboss.kernel.Kernel;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.binding.BindingException;
@@ -105,7 +104,7 @@
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
UnifiedMetaData wsMetaData = epMetaData.getServiceMetaData().getUnifiedMetaData();
wsMetaData.eagerInitialize();
-
+
seMetrics.start();
seInfo.setState(State.STARTED);
}
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java 2006-11-21 10:46:14 UTC (rev
1483)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java 2006-11-21 10:49:43 UTC (rev
1484)
@@ -284,7 +284,7 @@
// DOM expansion should only happen when a handler accesses the DOM API.
// We do not allow DOM expansion on a dev release.
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
- if (msgContext != null && UnifiedMetaData.isDevRelease())
+ if (msgContext != null && UnifiedMetaData.isFinalRelease() == false)
{
Boolean allowExpand =
(Boolean)msgContext.getProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
if (Boolean.TRUE.equals(allowExpand) == false)
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-11-21 10:46:14 UTC
(rev 1483)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-11-21 10:49:43 UTC
(rev 1484)
@@ -811,7 +811,7 @@
// DOM expansion should only happen when a handler accesses the DOM API.
// We do not allow DOM expansion on a dev release.
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
- if (msgContext != null && UnifiedMetaData.isDevRelease())
+ if (msgContext != null && UnifiedMetaData.isFinalRelease() == false)
{
Boolean allowExpand =
(Boolean)msgContext.getProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
if (Boolean.TRUE.equals(allowExpand) == false)
Modified:
trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-11-21
10:46:14 UTC (rev 1483)
+++
trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -84,6 +84,7 @@
throw new WSException("A service endpoint interface should extend
Remote");
um = new UnifiedMetaData();
+ um.setClassLoader(Thread.currentThread().getContextClassLoader());
String seiName = WSDLUtils.getInstance().getJustClassName(seiClass.getName());
if (serviceName == null)
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2006-11-21
10:46:14 UTC (rev 1483)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -106,7 +106,7 @@
while (it.hasNext())
{
HandlerMetaData handlerMetaData = it.next();
- if
(handlerMetaData.getHandlerClass().equals(ServerSideHandler.class.getName()))
+ if
(handlerMetaData.getHandlerClassName().equals(ServerSideHandler.class.getName()))
it.remove();
}
server.invoke(oname, "stopServiceEndpoint", new Object[]{serviceID}, new
String[]{"javax.management.ObjectName"});
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -57,7 +57,7 @@
assertNotNull(wsdlDef);
}
- public void testHervletAccess() throws Exception
+ public void testServletAccess() throws Exception
{
HttpURLConnection con = (HttpURLConnection)new URL("http://" +
getServerHost() + ":8080/test/TestServlet").openConnection();
BufferedReader isr = new BufferedReader(new
InputStreamReader(con.getInputStream()));
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -31,9 +31,11 @@
@WebService(name = "EJB3Bean", targetNamespace =
"http://org.jboss.ws/jbws944")
@SOAPBinding(style = SOAPBinding.Style.RPC)
+
@Remote(EJB3RemoteInterface.class)
@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless(name = "FooBean01")
+
public class EJB3Bean01 implements EJB3RemoteInterface
{
@WebMethod
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-11-21
10:49:43 UTC (rev 1484)
@@ -36,7 +36,9 @@
import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
/**
- * Tests JBWS-944
+ * EJB3 jmx name is incorrectly derrived
+ *
+ *
http://jira.jboss.org/jira/browse/JBWS-944
*
* @author Thomas.Diesler(a)jboss.org
* @author Jason.Greene(a)jboss.com
Modified: trunk/src/test/resources/jaxws/samples/jsr181ejb/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jaxws/samples/jsr181ejb/wstools-config.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/resources/jaxws/samples/jsr181ejb/wstools-config.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -8,6 +8,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace package="org.jboss.test.ws.jaxws.samples.jsr181ejb"
namespace="http://org.jboss.ws/samples/jsr181ejb"/>
+ </global>
<wsdl-java
file="resources/jaxws/samples/jsr181ejb/META-INF/wsdl/TestService.wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>
Modified: trunk/src/test/resources/jaxws/samples/jsr181pojo/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jaxws/samples/jsr181pojo/wstools-config.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/resources/jaxws/samples/jsr181pojo/wstools-config.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -8,6 +8,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace package="org.jboss.test.ws.jaxws.samples.jsr181pojo"
namespace="http://org.jboss.ws/samples/jsr181pojo"/>
+ </global>
<wsdl-java
file="resources/jaxws/samples/jsr181pojo/META-INF/wsdl/TestService.wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>
Modified: trunk/src/test/resources/jaxws/samples/wsaddressing/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jaxws/samples/wsaddressing/wstools-config.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++ trunk/src/test/resources/jaxws/samples/wsaddressing/wstools-config.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -8,6 +8,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace
package="org.jboss.test.ws.jaxws.samples.wsaddressing"
namespace="http://org.jboss.ws/samples/wsaddressing"/>
+ </global>
<wsdl-java
file="resources/jaxws/samples/wsaddressing/META-INF/wsdl/TestService.wsdl">
<mapping file="jaxrpc-mapping.xml"/>
</wsdl-java>
Modified:
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/jaxrpc-mapping.xml
===================================================================
---
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/jaxrpc-mapping.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/jaxrpc-mapping.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
<package-mapping>
- <package-type>ws.jboss.org.addressing.replyto</package-type>
+ <package-type>org.jboss.test.ws.jaxws.wsaddressing.replyto</package-type>
<namespaceURI>http://org.jboss.ws/addressing/replyto</namespaceURI>
</package-mapping>
<service-interface-mapping>
-
<service-interface>ws.jboss.org.addressing.replyto.InitialEndpointService</service-interface>
+
<service-interface>org.jboss.test.ws.jaxws.wsaddressing.replyto.InitialEndpointService</service-interface>
<wsdl-service-name
xmlns:serviceNS='http://org.jboss.ws/addressing/replyto'>serviceNS:InitialEndpointService</wsdl-service-name>
<port-mapping>
<port-name>InitialEndpointPort</port-name>
@@ -12,7 +12,7 @@
</port-mapping>
</service-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>ws.jboss.org.addressing.replyto.InitialEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.wsaddressing.replyto.InitialEndpoint</service-endpoint-interface>
<wsdl-port-type
xmlns:portTypeNS='http://org.jboss.ws/addressing/replyto'>portTypeNS:InitialEndpoint</wsdl-port-type>
<wsdl-binding
xmlns:bindingNS='http://org.jboss.ws/addressing/replyto'>bindingNS:InitialEndpointBinding</wsdl-binding>
<service-endpoint-method-mapping>
Modified:
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/wstools-config.xml
===================================================================
---
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/wstools-config.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++
trunk/src/test/resources/jaxws/wsaddressing/replyto/Initial-META-INF/wstools-config.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -8,6 +8,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace
package="org.jboss.test.ws.jaxws.wsaddressing.replyto"
namespace="http://org.jboss.ws/addressing/replyto"/>
+ </global>
<wsdl-java
file="http://localhost:8080/jaxws-wsaddressing-initial/InitialService?wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>
Modified:
trunk/src/test/resources/jaxws/wsaddressing/replyto/ReplyTo-META-INF/wstools-config.xml
===================================================================
---
trunk/src/test/resources/jaxws/wsaddressing/replyto/ReplyTo-META-INF/wstools-config.xml 2006-11-21
10:46:14 UTC (rev 1483)
+++
trunk/src/test/resources/jaxws/wsaddressing/replyto/ReplyTo-META-INF/wstools-config.xml 2006-11-21
10:49:43 UTC (rev 1484)
@@ -8,6 +8,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace
package="org.jboss.test.ws.jaxws.wsaddressing.replyto"
namespace="http://org.jboss.ws/addressing/replyto"/>
+ </global>
<wsdl-java
file="http://localhost:8080/jaxws-wsaddressing-replyto/ReplyToService?wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>