JBossWS SVN: r1256 - tags/jbossws-1.0.1.GA/src/test
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-18 14:38:25 -0400 (Wed, 18 Oct 2006)
New Revision: 1256
Modified:
tags/jbossws-1.0.1.GA/src/test/build.xml
Log:
compile tests with jbossws-client.jar in build.lib.dir
Modified: tags/jbossws-1.0.1.GA/src/test/build.xml
===================================================================
--- tags/jbossws-1.0.1.GA/src/test/build.xml 2006-10-18 18:25:05 UTC (rev 1255)
+++ tags/jbossws-1.0.1.GA/src/test/build.xml 2006-10-18 18:38:25 UTC (rev 1256)
@@ -119,15 +119,15 @@
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
- <!-- override jbossxb in jbossall-client.jar -->
- <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+ <pathelement location="${build.lib.dir}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
+ <!-- override jbossxb in jbossall-client.jar -->
+ <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
- <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
</path>
@@ -439,4 +439,4 @@
<delete dir="${build.test.dir}"/>
</target>
-</project>
\ No newline at end of file
+</project>
19 years, 6 months
JBossWS SVN: r1255 - in trunk/src: main/java/org/jboss/ws/binding main/java/org/jboss/ws/deployment main/java/org/jboss/ws/jaxrpc main/java/org/jboss/ws/jaxrpc/encoding main/java/org/jboss/ws/jaxws/client main/java/org/jboss/ws/metadata main/java/org/jboss/ws/utils test/java/org/jboss/test/ws/common/utils test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest test/java/org/jboss/test/ws/jaxrpc/marshall test/resources/jaxrpc/encoded/marshalltest/WEB-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-10-18 14:25:05 -0400 (Wed, 18 Oct 2006)
New Revision: 1255
Modified:
trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java
trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/HexSerializer.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArrayDeserializer.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArraySerializer.java
trunk/src/main/java/org/jboss/ws/jaxws/client/ClientProxy.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/utils/HolderUtils.java
trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java
trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
trunk/src/test/resources/jaxrpc/encoded/marshalltest/WEB-INF/wsdl/MarshallTestService.wsdl
Log:
Remove dead primitive conversion code in JavaUtils
Fix soap encoding tests
Improved JAX-WS / JAX-RPC holder integration
Modified: trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -156,7 +156,6 @@
Class valueType = paramValue.getClass();
if (HolderUtils.isHolderType(valueType))
{
- valueType = HolderUtils.getValueType(valueType);
paramValue = HolderUtils.getHolderValue(paramValue);
}
}
@@ -263,8 +262,10 @@
if (HolderUtils.isHolderType(inputType))
{
- inputType = HolderUtils.getValueType(inputType);
+ // At runtime we lose the generic info for JAX-WS types,
+ // So we use the actual instance type if possible
value = HolderUtils.getHolderValue(value);
+ inputType = (value == null) ? HolderUtils.getValueType(inputType) : value.getClass();
}
// Verify that the java type matches a registered xmlType
@@ -303,7 +304,7 @@
if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode() == ParameterMode.OUT)
{
- retValue = HolderUtils.getHolderInstance(paramValue, targetParameterType);
+ retValue = HolderUtils.createHolderInstance(paramValue, targetParameterType);
QName xmlName = paramMetaData.getXmlName();
setResponseParamValue(xmlName, retValue);
@@ -314,6 +315,9 @@
Class valueType = retValue.getClass();
if (JavaUtils.isAssignableFrom(targetParameterType, valueType) == false)
throw new WSException("Parameter " + targetParameterType.getName() + " is not assignable from: " + getTypeName(retValue));
+
+ if (valueType.isArray())
+ retValue = JavaUtils.syncArray(retValue, targetParameterType);
}
log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + " -> " + getTypeName(retValue) + "(" + index + ")");
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -425,7 +425,6 @@
throw new IllegalArgumentException("A one-way operation can not have output parameters [" + "method = "
+ method.getName() + ", parameter = " + i + "]");
- // FIXME - Improve JAX-RPC and JAX-WS Holder unification
if (HolderUtils.isHolderType(javaType))
{
genericType = HolderUtils.getGenericValueType(genericType);
@@ -444,7 +443,10 @@
if (mode != ParameterMode.OUT)
wrappedParameters.add(wrappedParameter);
if (mode != ParameterMode.IN)
+ {
wrappedOutputParameters.add(wrappedParameter);
+ wrappedParameter.holder = true;
+ }
}
else
{
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/CallProxy.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -154,7 +154,7 @@
throw new WSException("Return value not supported by: " + opMetaData);
if (JavaUtils.isPrimitive(retType))
- retObj = JavaUtils.getPrimitiveValue(retObj);
+ retObj = JavaUtils.getPrimitiveValueArray(retObj);
}
return retObj;
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -157,7 +157,7 @@
// INOUT Parameter
if (HolderUtils.isHolderType(targetType))
{
- value = HolderUtils.getHolderInstance(value, targetType);
+ value = HolderUtils.createHolderInstance(value, targetType);
outParameters.put(param.index, value);
}
@@ -236,9 +236,16 @@
Object value = method.invoke(resStruct, new Object[] {});
log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
if (param.index < 0)
+ {
retValue = value;
+ }
else
- methodParams[param.index] = HolderUtils.getHolderInstance(value, targetTypes[param.index]);
+ {
+ Class targetType = targetTypes[param.index];
+ if (HolderUtils.isHolderType(targetType))
+ value = HolderUtils.createHolderInstance(value, targetType);
+ methodParams[param.index] = value;
+ }
}
}
catch (RuntimeException rte)
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -67,7 +67,7 @@
}
else
{
- value = JavaUtils.getPrimitiveValue(value);
+ value = JavaUtils.getPrimitiveValueArray(value);
String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/HexSerializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/HexSerializer.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/HexSerializer.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -50,7 +50,7 @@
{
log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
- value = JavaUtils.getPrimitiveValue(value);
+ value = JavaUtils.getPrimitiveValueArray(value);
String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArrayDeserializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -142,7 +142,7 @@
Element childElement = (Element)it.next();
String compXMLFragment = DOMWriter.printNode(childElement, false);
compValue = compDeserializer.deserialize(compXmlName, compXmlType, compXMLFragment, serContext);
- compValue = JavaUtils.getWrapperValue(compValue);
+ compValue = JavaUtils.getWrapperValueArray(compValue);
}
subArr[i] = compValue;
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArraySerializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArraySerializer.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/SOAPArraySerializer.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -104,7 +104,7 @@
// Get the corresponding wrapper type
if (JavaUtils.isPrimitive(value.getClass()))
- value = JavaUtils.getWrapperValue(value);
+ value = JavaUtils.getWrapperValueArray(value);
xmlFragment = new StringBuilder("<" + Constants.PREFIX_SOAP11_ENC + ":Array ");
if (value instanceof Object[])
Modified: trunk/src/main/java/org/jboss/ws/jaxws/client/ClientProxy.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/client/ClientProxy.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/jaxws/client/ClientProxy.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -160,7 +160,7 @@
throw new WSException("Return value not supported by: " + opName);
if (JavaUtils.isPrimitive(retType))
- retObj = JavaUtils.getPrimitiveValue(retObj);
+ retObj = JavaUtils.getPrimitiveValueArray(retObj);
}
return retObj;
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -196,7 +196,7 @@
{
log.debug("Found possible matching java method: " + method);
javaMethod = method;
- break;
+ // continue on, in case there is a better matching method
}
}
}
@@ -233,81 +233,6 @@
return isMessageEndpoint;
}
- private boolean compareMethodParams(Class[] methodParams, boolean matchByTypeName)
- {
- log.trace("Compare method params by type name: " + matchByTypeName);
-
- boolean pass = (parameters.size() == methodParams.length);
- if (pass == false)
- log.trace("Unmatched parameter count: " + parameters.size() + "!=" + methodParams.length);
-
- for (int i = 0; pass && i < methodParams.length; i++)
- {
- ParameterMetaData paramMetaData = parameters.get(i);
- pass = matchParameter(paramMetaData, methodParams[i], matchByTypeName);
- }
- return pass;
- }
-
- private boolean matchParameter(ParameterMetaData paramMetaData, Class methodParam, boolean matchByTypeName)
- {
- QName xmlType = paramMetaData.getXmlType();
- String javaType = paramMetaData.getJavaTypeName();
-
- boolean pass = true;
- if (paramMetaData != returnParam && paramMetaData.getMode() != ParameterMode.IN)
- {
- if (HolderUtils.isHolderType(methodParam))
- {
- methodParam = HolderUtils.getValueType(methodParam);
- }
- else
- {
- pass = false;
- }
- }
-
- if (pass == true)
- {
- // In case the parameter java type has not been initialized
- // This happens when the UMDM is build from WSDL only (i.e. JAXWS Service)
- TypeMappingImpl typeMapping = epMetaData.getServiceMetaData().getTypeMapping();
- if (javaType == null)
- {
- javaType = methodParam.getName();
- paramMetaData.setJavaTypeName(javaType);
- log.debug("Set parameter java type from method param: " + javaType);
-
- if (epMetaData.getType() == Type.JAXWS)
- {
- typeMapping.register(methodParam, xmlType, new JAXBSerializerFactory(), new JAXBDeserializerFactory());
- }
- }
-
- if (matchByTypeName)
- {
- pass = methodParam.getName().equals(javaType);
- }
- else
- {
- String paramTypeName = methodParam.getName();
- Class paramType = paramMetaData.getJavaType();
- pass = JavaUtils.isAssignableFrom(methodParam, paramType);
-
- if (typeMapping.isRegistered(methodParam, xmlType))
- {
- log.debug("Adjust parameter type from " + paramType.getName() + " to " + paramTypeName);
- paramMetaData.setJavaTypeName(paramTypeName);
- pass = true;
- }
- }
- }
-
- String name = (matchByTypeName) ? paramMetaData.getJavaTypeName() : paramMetaData.getJavaType().getName();
- log.trace((pass ? "Matched" : "Unmatched") + " parameter: " + name + " == " + methodParam.getName());
- return pass;
- }
-
public boolean isOneWay()
{
return oneWay;
Modified: trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -24,6 +24,7 @@
// $Id$
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -101,6 +102,7 @@
public String type;
public String[] typeArguments;
public String variable;
+ public boolean holder = false;
public int index = -2;
public WrappedParameter()
@@ -121,15 +123,15 @@
}
}
- private static boolean matchParameter(Method method, int index, Class expectedType, Set<Integer> matches, boolean exact)
+ private static boolean matchParameter(Method method, int index, Class expectedType, Set<Integer> matches, boolean exact, boolean holder)
{
Class returnType = method.getReturnType();
- Class[] parameters = method.getParameterTypes();
+ Type[] parameters = method.getGenericParameterTypes();
- if (index == -1 && matchTypes(returnType, expectedType, exact))
+ if (index == -1 && matchTypes(returnType, expectedType, exact, false))
return true;
- if (index < parameters.length && matchTypes(parameters[index], expectedType, exact))
+ if (index < parameters.length && matchTypes(parameters[index], expectedType, exact, holder))
{
matches.add(index);
return true;
@@ -138,17 +140,17 @@
return false;
}
- private static boolean matchTypes(Class actualType, Class expectedType, boolean exact)
+ private static boolean matchTypes(Type actualType, Class expectedType, boolean exact, boolean holder)
{
- Class valueType = holderValueClass(actualType);
+ Type valueType = (holder) ? holderValueType(actualType) : actualType;
+ Class valueClass = JavaUtils.erasure(valueType);
+ boolean matched = (exact) ? valueClass.getName().equals(expectedType.getName())
+ : JavaUtils.isAssignableFrom(valueClass, expectedType);
- boolean matched = (exact) ? valueType.getName().equals(expectedType.getName())
- : JavaUtils.isAssignableFrom(valueType, expectedType);
-
return matched;
}
- private static Class holderValueClass(Class holder)
+ private static Type holderValueType(Type holder)
{
if (! HolderUtils.isHolderType(holder))
return holder;
@@ -382,7 +384,7 @@
// Standard type
if (wrappedParameters == null)
- return matchParameter(method, getIndex(), getJavaType(), matches, exact);
+ return matchParameter(method, getIndex(), getJavaType(), matches, exact, mode != ParameterMode.IN);
// Wrapped type
for (WrappedParameter wrapped : wrappedParameters)
@@ -395,7 +397,7 @@
: ParameterWrapping.getWrappedType(wrapped.variable, wrapperType);
if (type == null)
return false;
- if (! matchParameter(method, wrapped.index, type, matches, exact))
+ if (! matchParameter(method, wrapped.index, type, matches, exact, wrapped.holder))
return false;
}
catch (Exception ex)
Modified: trunk/src/main/java/org/jboss/ws/utils/HolderUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/HolderUtils.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/utils/HolderUtils.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -88,32 +88,37 @@
import org.jboss.logging.Logger;
-/** JAXRPC Holder utilities
+/**
+ * HolderUtils provides static utility functions for both JAX-RPC
+ * and JAX-WS holders.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
* @since 22-Dec-2004
*/
public class HolderUtils
{
- /*
- * FIXME Need to have smoother holder unifaction between JAX-RPC and JAX-WS
- */
-
- // provide logging
private static final Logger log = Logger.getLogger(HolderUtils.class);
/** True if the given type is a holder. */
public static boolean isHolderType(Class javaType)
{
- if (javaType == null)
- throw new IllegalArgumentException("Illegal null parameter");
-
return Holder.class.isAssignableFrom(javaType) || javax.xml.ws.Holder.class.isAssignableFrom(javaType);
}
- /** Get the Holder for a given valueType.
+ /** True if the given type is a holder. */
+ public static boolean isHolderType(Type javaType)
+ {
+ return isHolderType(JavaUtils.erasure(javaType));
+ }
+
+ /**
+ * Gets the JAX-RPC holder for a specific value type.
+ *
+ * @param valueType the value
+ * @return the holder, or null if there is no match
*/
- public static Class getHolderType(Class valueType)
+ public static Class getJAXRPCHolderType(Class valueType)
{
if (valueType == null)
throw new IllegalArgumentException("Illegal null parameter");
@@ -169,31 +174,42 @@
return null;
}
- /** Get the value type for a given holder.
+ /**
+ * Gets the value type of a JAX-WS or JAX-RPC holder.
+ *
+ * @param holderType the generic type for JAX-WS, a standard class for JAX-RPC
+ * @return the value type
*/
- public static Class getValueType(Class holderType)
+ public static Class getValueType(Type holderType)
{
- if (holderType == null)
- throw new IllegalArgumentException("Illegal null parameter");
+ Class holderClass = JavaUtils.erasure(holderType);
- if (!Holder.class.isAssignableFrom(holderType) && !javax.xml.ws.Holder.class.isAssignableFrom(holderType))
- throw new IllegalArgumentException("Is not a holder: " + holderType.getName());
+ boolean jaxwsHolder = javax.xml.ws.Holder.class.isAssignableFrom(holderClass);
+ if (!Holder.class.isAssignableFrom(holderClass) && !jaxwsHolder)
+ throw new IllegalArgumentException("Is not a holder: " + holderClass.getName());
+ if (jaxwsHolder)
+ return JavaUtils.erasure(getGenericValueType(holderType));
+
// Holder is supposed to have a public value field.
Field field;
try
{
- field = holderType.getField("value");
+ field = holderClass.getField("value");
}
catch (NoSuchFieldException e)
{
- throw new IllegalArgumentException("Cannot find public value field: " + holderType);
+ throw new IllegalArgumentException("Cannot find public value field: " + holderClass);
}
return field.getType();
}
- /** Gets the Holder value.
+ /**
+ * Gets the value object of a JAX-WS or JAX-RPC holder instance.
+ *
+ * @param holder the holder object instance
+ * @return the value object instance
*/
public static Object getHolderValue(Object holder)
{
@@ -219,12 +235,18 @@
}
}
- /** Gets the Holder value.
+ /**
+ * Sets the value object of a JAX-WS or JAX-RPC holder instance. This method
+ * will also dynamically convert primitive and wrapper arrays to match the
+ * target array type.
+ *
+ * @param holder the holder instance
+ * @param value the value, can be null
*/
public static void setHolderValue(Object holder, Object value)
{
if (holder == null)
- throw new IllegalArgumentException("Illegal null parameter");
+ throw new IllegalArgumentException("Holder instance was null");
if (!Holder.class.isInstance(holder) && !javax.xml.ws.Holder.class.isInstance(holder))
throw new IllegalArgumentException("Is not a holder: " + holder);
@@ -234,6 +256,9 @@
if (value != null && JavaUtils.isAssignableFrom(valueType, value.getClass()) == false)
throw new IllegalArgumentException("Holder [" + holder.getClass().getName() + "] value not assignable: " + value);
+ if (valueType.isArray())
+ value = JavaUtils.syncArray(value, valueType);
+
try
{
Field valueField = holder.getClass().getField("value");
@@ -250,21 +275,36 @@
}
}
+ /**
+ * Gets the generic value type of a JAX-WS Holder.
+ * If there is no generic information, Object.class will be returned
+ *
+ * @param holder JAX-WS holder type
+ * @return generic value type
+ */
public static Type getGenericValueType(Type holder)
{
- return (holder instanceof ParameterizedType) ? ((ParameterizedType)holder).getActualTypeArguments()[0] : holder;
+ return (holder instanceof ParameterizedType) ? ((ParameterizedType)holder).getActualTypeArguments()[0] : Object.class;
}
- public static Object getHolderInstance(Object value, Class<?> target)
+
+ /**
+ * Creates a JAX-WS or JAX-RPC holder instance.
+ *
+ * @param value the value instance
+ * @param holderType the holder type
+ * @return a new holder
+ */
+ public static Object createHolderInstance(Object value, Class<?> holderType)
{
- if (! isHolderType(target))
- return value;
+ if (! isHolderType(holderType))
+ throw new IllegalArgumentException("Not a holder type:" + holderType.getName());
Object holder;
try
{
- holder = target.newInstance();
+ holder = holderType.newInstance();
}
catch (RuntimeException rte)
{
@@ -272,11 +312,11 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException("Cannot instanciate holder: " + target);
+ throw new IllegalArgumentException("Cannot instanciate holder: " + holderType);
}
setHolderValue(holder, value);
return holder;
}
-}
+}
\ No newline at end of file
Modified: trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -294,30 +294,14 @@
}
/**
- * Get the corresponding primitive value for a give wrapper value.
- * Also handles arrays of which.
+ * Converts an n-dimensional array of wrapper types to primitive types
*/
- public static Object getPrimitiveValue(Object value)
+ public static Object getPrimitiveValueArray(Object value)
{
if (value == null)
return null;
Class javaType = value.getClass();
- if (javaType == Integer.class)
- return ((Integer)value).intValue();
- if (javaType == Short.class)
- return ((Short)value).shortValue();
- if (javaType == Boolean.class)
- return ((Boolean)value).booleanValue();
- if (javaType == Byte.class)
- return ((Byte)value).byteValue();
- if (javaType == Long.class)
- return ((Long)value).longValue();
- if (javaType == Double.class)
- return ((Double)value).doubleValue();
- if (javaType == Float.class)
- return ((Float)value).floatValue();
-
if (javaType.isArray())
{
int length = Array.getLength(value);
@@ -325,8 +309,7 @@
for (int i = 0; i < length; i++)
{
Object srcObj = Array.get(value, i);
- Object destObj = getPrimitiveValue(srcObj);
- Array.set(destArr, i, destObj);
+ Array.set(destArr, i, getPrimitiveValueArray(srcObj));
}
return destArr;
}
@@ -384,30 +367,14 @@
}
/**
- * Get the corresponding wrapper value for a give primitive value.
- * Also handles arrays of which.
+ * Converts an n-dimensional array of primitive types to wrapper types
*/
- public static Object getWrapperValue(Object value)
+ public static Object getWrapperValueArray(Object value)
{
if (value == null)
return null;
Class javaType = value.getClass();
- if (javaType == int.class)
- return Integer.valueOf("" + value);
- if (javaType == short.class)
- return Short.valueOf("" + value);
- if (javaType == boolean.class)
- return Boolean.valueOf("" + value);
- if (javaType == byte.class)
- return Byte.valueOf("" + value);
- if (javaType == long.class)
- return Long.valueOf("" + value);
- if (javaType == double.class)
- return Double.valueOf("" + value);
- if (javaType == float.class)
- return Float.valueOf("" + value);
-
if (javaType.isArray())
{
int length = Array.getLength(value);
@@ -415,8 +382,7 @@
for (int i = 0; i < length; i++)
{
Object srcObj = Array.get(value, i);
- Object destObj = getWrapperValue(srcObj);
- Array.set(destArr, i, destObj);
+ Array.set(destArr, i, getWrapperValueArray(srcObj));
}
return destArr;
}
@@ -424,6 +390,11 @@
return value;
}
+ public static Object syncArray(Object array, Class target)
+ {
+ return (JavaUtils.isPrimitive(target)) ? JavaUtils.getPrimitiveValueArray(array) : JavaUtils.getWrapperValueArray(array);
+ }
+
/**
* Return true if the dest class is assignable from the src.
* Also handles arrays and primitives.
Modified: trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -44,22 +44,22 @@
public void testGetMultipleArrayWrapperValue() throws Exception
{
int[][] primParams = new int[][] { { 0, 1, 2 }, { 1, 2, 3 }, { 2, 3, 4 } };
- Integer[][] params = (Integer[][])JavaUtils.getWrapperValue(primParams);
+ Integer[][] params = (Integer[][])JavaUtils.getWrapperValueArray(primParams);
assertNotNull("Unexpected null", params);
- assertEquals(primParams[0], (int[])JavaUtils.getPrimitiveValue(params[0]));
- assertEquals(primParams[1], (int[])JavaUtils.getPrimitiveValue(params[1]));
- assertEquals(primParams[2], (int[])JavaUtils.getPrimitiveValue(params[2]));
+ assertEquals(primParams[0], (int[])JavaUtils.getPrimitiveValueArray(params[0]));
+ assertEquals(primParams[1], (int[])JavaUtils.getPrimitiveValueArray(params[1]));
+ assertEquals(primParams[2], (int[])JavaUtils.getPrimitiveValueArray(params[2]));
}
public void testGetMultipleArrayPrimitiveValue() throws Exception
{
Integer[][] wrapParams = new Integer[][] { { new Integer(0), new Integer(1), new Integer(2) }, { new Integer(1), new Integer(2), new Integer(3) },
{ new Integer(2), new Integer(3), new Integer(4) } };
- int[][] params = (int[][])JavaUtils.getPrimitiveValue(wrapParams);
+ int[][] params = (int[][])JavaUtils.getPrimitiveValueArray(wrapParams);
assertNotNull("Unexpected null", params);
- assertEquals(wrapParams[0], (Integer[])JavaUtils.getWrapperValue(params[0]));
- assertEquals(wrapParams[1], (Integer[])JavaUtils.getWrapperValue(params[1]));
- assertEquals(wrapParams[2], (Integer[])JavaUtils.getWrapperValue(params[2]));
+ assertEquals(wrapParams[0], (Integer[])JavaUtils.getWrapperValueArray(params[0]));
+ assertEquals(wrapParams[1], (Integer[])JavaUtils.getWrapperValueArray(params[1]));
+ assertEquals(wrapParams[2], (Integer[])JavaUtils.getWrapperValueArray(params[2]));
}
public void testGetPrimitiveType() throws Exception
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -462,32 +462,32 @@
buf.append(",myBoolean=" + myBoolean);
buf.append(",myBoolean1=" + myBoolean1);
buf.append(",myBoolean1Array=" + (myBoolean1Array != null ? Arrays.asList(myBoolean1Array) : null));
- buf.append(",myBooleanArray=" + (myBooleanArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myBooleanArray)) : null));
+ buf.append(",myBooleanArray=" + (myBooleanArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myBooleanArray)) : null));
buf.append(",myByte=" + myByte);
buf.append(",myByte1=" + myByte1);
- buf.append(",myByteArray=" + (myByteArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myByteArray)) : null));
+ buf.append(",myByteArray=" + (myByteArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myByteArray)) : null));
buf.append(",myCalendar=" + myCalendar);
buf.append(",myCalendarArray=" + (myCalendarArray != null ? Arrays.asList(myCalendarArray) : null));
buf.append(",myDouble=" + myDouble);
buf.append(",myDouble1=" + myDouble1);
buf.append(",myDouble1Array=" + (myDouble1Array != null ? Arrays.asList(myDouble1Array) : null));
- buf.append(",myDoubleArray=" + (myDoubleArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myDoubleArray)) : null));
+ buf.append(",myDoubleArray=" + (myDoubleArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myDoubleArray)) : null));
buf.append(",myFloat=" + myFloat);
buf.append(",myFloat1=" + myFloat1);
buf.append(",myFloat1Array=" + (myFloat1Array != null ? Arrays.asList(myFloat1Array) : null));
- buf.append(",myFloatArray=" + (myFloatArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myFloatArray)) : null));
+ buf.append(",myFloatArray=" + (myFloatArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myFloatArray)) : null));
buf.append(",myInt=" + myInt);
buf.append(",myInt1=" + myInt1);
buf.append(",myInt1Array=" + (myInt1Array != null ? Arrays.asList(myInt1Array) : null));
- buf.append(",myIntArray=" + (myIntArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myIntArray)) : null));
+ buf.append(",myIntArray=" + (myIntArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myIntArray)) : null));
buf.append(",myLong=" + myLong);
buf.append(",myLong1=" + myLong1);
buf.append(",myLong1Array=" + (myLong1Array != null ? Arrays.asList(myLong1Array) : null));
- buf.append(",myLongArray=" + (myLongArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myLongArray)) : null));
+ buf.append(",myLongArray=" + (myLongArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myLongArray)) : null));
buf.append(",myShort=" + myShort);
buf.append(",myShort1=" + myShort1);
buf.append(",myShort1Array=" + (myShort1Array != null ? Arrays.asList(myShort1Array) : null));
- buf.append(",myShortArray=" + (myShortArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myShortArray)) : null));
+ buf.append(",myShortArray=" + (myShortArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myShortArray)) : null));
buf.append(",myString=" + myString);
buf.append(",myStringArray=" + (myStringArray != null ? Arrays.asList(myStringArray) : null));
buf.append("]");
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -463,32 +463,32 @@
buf.append(",myBoolean=" + myBoolean);
buf.append(",myBoolean1=" + myBoolean1);
buf.append(",myBoolean1Array=" + (myBoolean1Array != null ? Arrays.asList(myBoolean1Array) : null));
- buf.append(",myBooleanArray=" + (myBooleanArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myBooleanArray)) : null));
+ buf.append(",myBooleanArray=" + (myBooleanArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myBooleanArray)) : null));
buf.append(",myByte=" + myByte);
buf.append(",myByte1=" + myByte1);
- buf.append(",myByteArray=" + (myByteArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myByteArray)) : null));
+ buf.append(",myByteArray=" + (myByteArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myByteArray)) : null));
buf.append(",myCalendar=" + myCalendar);
buf.append(",myCalendarArray=" + (myCalendarArray != null ? Arrays.asList(myCalendarArray) : null));
buf.append(",myDouble=" + myDouble);
buf.append(",myDouble1=" + myDouble1);
buf.append(",myDouble1Array=" + (myDouble1Array != null ? Arrays.asList(myDouble1Array) : null));
- buf.append(",myDoubleArray=" + (myDoubleArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myDoubleArray)) : null));
+ buf.append(",myDoubleArray=" + (myDoubleArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myDoubleArray)) : null));
buf.append(",myFloat=" + myFloat);
buf.append(",myFloat1=" + myFloat1);
buf.append(",myFloat1Array=" + (myFloat1Array != null ? Arrays.asList(myFloat1Array) : null));
- buf.append(",myFloatArray=" + (myFloatArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myFloatArray)) : null));
+ buf.append(",myFloatArray=" + (myFloatArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myFloatArray)) : null));
buf.append(",myInt=" + myInt);
buf.append(",myInt1=" + myInt1);
buf.append(",myInt1Array=" + (myInt1Array != null ? Arrays.asList(myInt1Array) : null));
- buf.append(",myIntArray=" + (myIntArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myIntArray)) : null));
+ buf.append(",myIntArray=" + (myIntArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myIntArray)) : null));
buf.append(",myLong=" + myLong);
buf.append(",myLong1=" + myLong1);
buf.append(",myLong1Array=" + (myLong1Array != null ? Arrays.asList(myLong1Array) : null));
- buf.append(",myLongArray=" + (myLongArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myLongArray)) : null));
+ buf.append(",myLongArray=" + (myLongArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myLongArray)) : null));
buf.append(",myShort=" + myShort);
buf.append(",myShort1=" + myShort1);
buf.append(",myShort1Array=" + (myShort1Array != null ? Arrays.asList(myShort1Array) : null));
- buf.append(",myShortArray=" + (myShortArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValue(myShortArray)) : null));
+ buf.append(",myShortArray=" + (myShortArray != null ? Arrays.asList((Object[])JavaUtils.getWrapperValueArray(myShortArray)) : null));
buf.append(",myString=" + myString);
buf.append(",myStringArray=" + (myStringArray != null ? Arrays.asList(myStringArray) : null));
buf.append("]");
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-10-18 18:25:05 UTC (rev 1255)
@@ -166,15 +166,15 @@
public void testByteWrapperArray() throws Exception
{
- Byte[] in = (Byte[])JavaUtils.getWrapperValue("ByteArray".getBytes());
+ Byte[] in = (Byte[])JavaUtils.getWrapperValueArray("ByteArray".getBytes());
Byte[] out = byteWrapperArrayTest(in);
assertEquals(in, out);
}
public void testByteWrapperMultiArray() throws Exception
{
- Byte[] ar1 = (Byte[])JavaUtils.getWrapperValue("ByteArray".getBytes());
- Byte[] ar2 = (Byte[])JavaUtils.getWrapperValue("ArrayByte".getBytes());
+ Byte[] ar1 = (Byte[])JavaUtils.getWrapperValueArray("ByteArray".getBytes());
+ Byte[] ar2 = (Byte[])JavaUtils.getWrapperValueArray("ArrayByte".getBytes());
Byte[][] in = new Byte[][] { ar1, ar2 };
Byte[][] out = byteWrapperMultiArrayTest(in);
assertEquals(in, out);
Modified: trunk/src/test/resources/jaxrpc/encoded/marshalltest/WEB-INF/wsdl/MarshallTestService.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/encoded/marshalltest/WEB-INF/wsdl/MarshallTestService.wsdl 2006-10-18 15:39:22 UTC (rev 1254)
+++ trunk/src/test/resources/jaxrpc/encoded/marshalltest/WEB-INF/wsdl/MarshallTestService.wsdl 2006-10-18 18:25:05 UTC (rev 1255)
@@ -307,6 +307,7 @@
</restriction>
</complexContent>
</complexType>
+ <element name="MyServiceException" type="tns:MyServiceException"/>
</schema>
</types>
<message name="MarshallTest_bigDecimalArrayTest">
@@ -492,7 +493,7 @@
<message name="MarshallTest_myServiceExceptionTest"/>
<message name="MarshallTest_myServiceExceptionTestResponse"/>
<message name="MyServiceException">
- <part name="MyServiceException" type="ns3:MyServiceException"/>
+ <part name="MyServiceException" element="ns3:MyServiceException"/>
</message>
<message name="MarshallTest_shortArrayTest">
<part name="arrayOfshort_1" type="ns3:ArrayOfshort"/>
@@ -1230,4 +1231,4 @@
<soap:address location="http://@jbosstest.host.name@:8080/J2WMT/jaxrpc/MarshallTest"/>
</port>
</service>
-</definitions>
\ No newline at end of file
+</definitions>
19 years, 6 months
JBossWS SVN: r1254 - branches/jbossws-1.0
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-18 11:39:22 -0400 (Wed, 18 Oct 2006)
New Revision: 1254
Modified:
branches/jbossws-1.0/ant.properties.example
Log:
tomact path
Modified: branches/jbossws-1.0/ant.properties.example
===================================================================
--- branches/jbossws-1.0/ant.properties.example 2006-10-18 12:57:51 UTC (rev 1253)
+++ branches/jbossws-1.0/ant.properties.example 2006-10-18 15:39:22 UTC (rev 1254)
@@ -12,7 +12,7 @@
jboss.server.instance=default
# Tomcat Home
-#tomcat.home=/usr/java/apache/apache-tomcat-5.5.20
+#tomcat.home=/usr/java/apache/tomcat
#tomcat.manager.username=manager
#tomcat.manager.password=manager
19 years, 6 months
JBossWS SVN: r1253 - in branches/jbossws-1.0: . src/main/java/org/jboss/ws/common src/main/java/org/jboss/ws/deployment src/main/java/org/jboss/ws/integration/jboss src/main/java/org/jboss/ws/integration/tomcat src/main/java/org/jboss/ws/jaxrpc src/main/java/org/jboss/ws/jaxrpc/handler src/main/java/org/jboss/ws/metadata src/main/java/org/jboss/ws/server src/main/resources/jbossws.war/JBoss/WEB-INF src/main/resources/jbossws.war/Tomcat/WEB-INF src/test src/test/etc src/test/java/org/jboss/
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-18 08:57:51 -0400 (Wed, 18 Oct 2006)
New Revision: 1253
Added:
branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
Removed:
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java
Modified:
branches/jbossws-1.0/ant.properties.example
branches/jbossws-1.0/build.xml
branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
branches/jbossws-1.0/src/test/build.xml
branches/jbossws-1.0/src/test/etc/log4j.xml
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt
Log:
Work on Tomcat integration.
More to come.
Modified: branches/jbossws-1.0/ant.properties.example
===================================================================
--- branches/jbossws-1.0/ant.properties.example 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/ant.properties.example 2006-10-18 12:57:51 UTC (rev 1253)
@@ -12,7 +12,7 @@
jboss.server.instance=default
# Tomcat Home
-#tomcat.home=/usr/java/apache/apache-tomcat-5.5.17
+#tomcat.home=/usr/java/apache/apache-tomcat-5.5.20
#tomcat.manager.username=manager
#tomcat.manager.password=manager
Modified: branches/jbossws-1.0/build.xml
===================================================================
--- branches/jbossws-1.0/build.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/build.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -305,6 +305,9 @@
<include name="META-INF/standard-jaxrpc-client-config.xml"/>
<include name="META-INF/standard-jaxrpc-endpoint-config.xml"/>
</fileset>
+ <!--classes dir="${build.resources.dir}/jbossws.war/Tomcat/WEB-INF">
+ <include name="log4j.xml"/>
+ </classes-->
</war>
<!-- Build jbossws.sar -->
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -44,6 +44,7 @@
import org.jboss.ws.binding.UnboundHeader;
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxrpc.Style;
+import org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.metadata.ClientEndpointMetaData;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
@@ -305,18 +306,20 @@
{
// Call the response handlers
handlerPass = callResponseHandlerChain(portName, HandlerType.POST);
-
- // unbind the return values
+ handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.ENDPOINT);
+ handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.PRE);
+
if (handlerPass)
{
+ // BP-1.0 R1027
+ HandlerChainBaseImpl.checkMustUnderstand(msgContext, new String[]{});
+
+ // unbind the return values
SOAPMessage resMessage = msgContext.getSOAPMessage();
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
+
+ retObj = syncOutputParams(inputParams, epInv);
}
-
- handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.ENDPOINT);
- handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.PRE);
-
- retObj = syncOutputParams(inputParams, epInv);
}
return retObj;
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,85 @@
+/*
+ * 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.common;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.server.ServiceEndpointManager;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public abstract class CommonContextServlet extends HttpServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(CommonContextServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected abstract void initServiceEndpointManager();
+
+ /** Process GET requests.
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ PrintWriter writer = res.getWriter();
+ res.setContentType("text/html");
+
+ writer.print("<html>");
+ setupHTMLResponseHeader(writer);
+
+ writer.print("<body>");
+ writer.print(epManager.showServiceEndpointTable());
+ writer.print("</body>");
+ writer.print("</html>");
+ writer.close();
+ }
+
+ private void setupHTMLResponseHeader(PrintWriter writer)
+ {
+ Package wsPackage = Package.getPackage("org.jboss.ws");
+ writer.println("<head>");
+ writer.println("<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>");
+ writer.println("<title>JBossWS / "+wsPackage.getImplementationVersion()+"</title>");
+ writer.println("<link rel='stylesheet' href='./styles.css'>");
+ writer.println("</head>");
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -130,7 +130,12 @@
log.debug("END buildMetaData: " + wsMetaData);
wsMetaData.eagerInitialize();
- wsMetaData.validate();
+
+ // Only validate if configuration was provided
+ // In case of DII the handlers may be configured later
+ if (serviceRefMetaData != null)
+ wsMetaData.validate();
+
return serviceMetaData;
}
catch (RuntimeException rte)
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,58 @@
+/*
+ * 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.integration.jboss;
+
+// $Id$
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.server.ServiceEndpointManager;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public class JBossContextServlet extends CommonContextServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(JBossContextServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected void initServiceEndpointManager()
+ {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ epManager = factory.getServiceEndpointManager();
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,110 +0,0 @@
-/*
- * 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.integration.tomcat;
-
-// $Id$
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.server.ServiceEndpointManager;
-import org.jboss.ws.server.ServiceEndpointManagerFactory;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Mar-2005
- */
-public class ContextServlet extends HttpServlet
-{
- // provide logging
- protected final Logger log = Logger.getLogger(ContextServlet.class);
-
- protected ServiceEndpointManager epManager;
-
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
- initServiceEndpointManager();
- }
-
- private void initServiceEndpointManager()
- {
- try
- {
- URL beansXML = new File(getServletContext().getRealPath("/META-INF/jboss-beans.xml")).toURL();
- if (beansXML == null)
- throw new IllegalStateException("Invalid null kernel deployment");
-
- new KernelBootstrap().bootstrap(beansXML);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot bootstrap kernel", ex);
- }
-
- // Initialize the ServiceEndpointManager
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- epManager = factory.getServiceEndpointManager();
- }
-
- /** Process GET requests.
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- PrintWriter writer = res.getWriter();
- res.setContentType("text/html");
-
- writer.print("<html>");
- setupHTMLResponseHeader(writer);
-
- writer.print("<body>");
- writer.print(epManager.showServiceEndpointTable());
- writer.print("</body>");
- writer.print("</html>");
- writer.close();
- }
-
- private void setupHTMLResponseHeader(PrintWriter writer)
- {
- writer.println("<head>");
- writer.println("<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>");
- writer.println("<title>JBossWS</title>");
- writer.println("<link rel='stylesheet' href='./styles.css'>");
- writer.println("</head>");
- }
-}
Deleted: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,96 +0,0 @@
-/*
- * 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.integration.tomcat;
-
-// $Id$
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import javax.servlet.ServletContext;
-
-/**
- * A URLClassLoader that provides access to the webapp base dir
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-May-2006
- */
-public class CrossContextLoader extends URLClassLoader
-{
- public CrossContextLoader(URL[] urls, ClassLoader parent)
- {
- super(urls, parent);
- }
-
- public static CrossContextLoader newInstance(ServletContext context)
- {
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- if (parent instanceof CrossContextLoader)
- throw new IllegalStateException("Circular classloader parent association");
-
- CrossContextLoader loader = new CrossContextLoader(new URL[] {}, parent);
-
- String path = context.getRealPath("/");
- File contextDir = new File(path);
- if (contextDir.exists() == false || contextDir.isDirectory() == false)
- throw new IllegalStateException("Cannot find expanded dir: " + contextDir);
-
- // Add URL to context root
- loader.addURL(toURL(contextDir));
-
- File jbosswsDir = new File(path + "../jbossws");
- if (jbosswsDir.exists() == false || jbosswsDir.isDirectory() == false)
- throw new IllegalStateException("Cannot find expanded dir: " + jbosswsDir);
-
- // Add URL to jbossws context root
- loader.addURL(toURL(jbosswsDir));
-
- // Add jars in jbossws/WEB-INF/lib
- File libDir = new File(path + "../jbossws/WEB-INF/lib");
- if (libDir.exists() && libDir.isDirectory())
- {
- File[] files = libDir.listFiles();
- for (int i=0; i < files.length; i++)
- {
- File file = files[i];
- loader.addURL(toURL(file));
- }
- }
-
- return loader;
- }
-
- private static URL toURL(File file)
- {
- try
- {
- return file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- return null;
- }
- }
-}
Copied: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java (from rev 1250, branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java)
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 08:34:55 UTC (rev 1250)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,84 @@
+/*
+ * 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.integration.tomcat;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URL;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.server.ServiceEndpointManager;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public class TomcatContextServlet extends CommonContextServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(TomcatContextServlet.class);
+
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected void initServiceEndpointManager()
+ {
+ try
+ {
+ URL beansXML = new File(getServletContext().getRealPath("/META-INF/jboss-beans.xml")).toURL();
+ if (beansXML == null)
+ throw new IllegalStateException("Invalid null kernel deployment");
+
+ new KernelBootstrap().bootstrap(beansXML);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot bootstrap kernel", ex);
+ }
+
+ // Initialize the ServiceEndpointManager
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ epManager = factory.getServiceEndpointManager();
+ }
+}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -23,15 +23,12 @@
// $Id$
-import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
@@ -57,20 +54,8 @@
public void init(ServletConfig config) throws ServletException
{
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- CrossContextLoader jbwsLoader = CrossContextLoader.newInstance(config.getServletContext());
- Thread.currentThread().setContextClassLoader(jbwsLoader);
-
- super.init(config);
- deployServiceEndpoints(getServletContext());
- }
- catch (Exception e)
- {
- log.error("Unable to init servlet", e);
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
+ super.init(config);
+ deployServiceEndpoints(getServletContext());
}
public void destroy()
@@ -79,24 +64,6 @@
super.destroy();
}
- public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- if ((ctxLoader instanceof CrossContextLoader) == false)
- {
- CrossContextLoader jbwsLoader = CrossContextLoader.newInstance(getServletContext());
- Thread.currentThread().setContextClassLoader(jbwsLoader);
- }
- super.service(req, res);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
/**
* Bootstrap the Microkernel and initialize the
* ServiceEndpointManager
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -45,9 +45,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.xop.XOPContext;
import org.jboss.ws.binding.UnboundHeader;
-import org.jboss.ws.common.CommonBindingProvider;
import org.jboss.ws.common.CommonClient;
import org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC;
@@ -62,6 +60,7 @@
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.utils.JavaUtils;
+import org.jboss.ws.xop.XOPContext;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
@@ -552,6 +551,9 @@
// Check or generate the the schema if this call is unconfigured
generateOrUpdateSchemas(opMetaData);
+
+ // Validate the meta data model. In case of DII, the model may not be valid before the invocation
+ opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().validate();
// Associate a message context with the current thread
SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
@@ -584,21 +586,14 @@
@Override
protected boolean callResponseHandlerChain(QName portName, HandlerType type)
{
- boolean status = true;
- String[] roles = null;
-
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
-
HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
+
+ boolean status = true;
if (handlerChain != null)
{
- roles = handlerChain.getRoles();
status = handlerChain.handleResponse(msgContext, type);
}
-
- // BP-1.0 R1027
- HandlerChainBaseImpl.checkMustUnderstand(msgContext, roles);
-
return status;
}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -34,7 +34,12 @@
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
+import org.jboss.logging.Logger;
import org.jboss.ws.jaxrpc.handler.ClientHandlerChain;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.ServiceMetaData;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
/**
* Provides support for the programmatic configuration of
@@ -52,11 +57,21 @@
*/
public class HandlerRegistryImpl implements HandlerRegistry
{
+ // provide logging
+ private static Logger log = Logger.getLogger(HandlerRegistryImpl.class);
+
// Map<QName,HandlerChain> the endpoint name to a HandlerChain
private Map<QName, HandlerChain> handlerChains = new HashMap<QName, HandlerChain>();
// Maps the port name to a list of HandlerInfo objects
private Map<QName, List<HandlerInfo>> handlerInfos = new HashMap<QName, List<HandlerInfo>>();
+ // The service this registry is associated with
+ private ServiceMetaData serviceMetaData;
+ public HandlerRegistryImpl(ServiceMetaData serviceMetaData)
+ {
+ this.serviceMetaData = serviceMetaData;
+ }
+
public List getHandlerChain(QName portName)
{
List<HandlerInfo> list = handlerInfos.get(portName);
@@ -82,10 +97,24 @@
/** Register a handler chain for the given endpoint name
*/
- void registerClientHandlerChain(QName portName, List<HandlerInfo> infos, Set roles)
+ void registerClientHandlerChain(QName portName, List<HandlerInfo> infos, Set<String> roles)
{
ClientHandlerChain chain = new ClientHandlerChain(infos, roles);
handlerChains.put(portName, chain);
handlerInfos.put(portName, infos);
+
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot obtain endpoint meta data for: " + portName);
+
+ epMetaData.clearHandlers();
+ for (HandlerInfo info : infos)
+ {
+ HandlerMetaDataJAXRPC handler = new HandlerMetaDataJAXRPC(epMetaData, HandlerType.ENDPOINT);
+ handler.setHandlerClassName(info.getHandlerClass().getName());
+ handler.setSoapRoles(roles);
+ log.debug("Add handler to: " + portName + handler);
+ epMetaData.addHandler(handler);
+ }
}
}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -78,7 +78,7 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData();
serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -94,7 +94,7 @@
builder.setClassLoader(ctxClassLoader);
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityURL, null);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -110,7 +110,7 @@
builder.setClassLoader(ctxClassLoader);
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, serviceRefMetaData);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
public ServiceMetaData getServiceMetaData()
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -26,6 +26,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import org.jboss.ws.metadata.EndpointMetaData;
+
// $Id$
/**
@@ -56,10 +58,13 @@
static final String PROPERTY_AUTH_TYPE_BASIC = "org.jboss.ws.authType.basic";
/** Authentication type, WSEE */
static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
-
+ /** Enable MTOM on the stub */
static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
- // if you add a property here, make sure its registered in CallProxy
+ /**
+ * Get the endpoint meta data for this stub
+ */
+ EndpointMetaData getEndpointMetaData();
/**
* Add a header that is not bound to an input parameter.
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -502,13 +502,13 @@
* soap:mustUnderstand attribute with the value "1") targeted at the
* receiver (via soap:actor) that the receiver does not understand.
*/
- public static void checkMustUnderstand(SOAPMessageContextJAXRPC msgContext, String[] roles)
+ public static void checkMustUnderstand(CommonMessageContext msgContext, String[] roles)
{
SOAPHeaderElement mustUnderstandHeaderElement = null;
List roleList = (roles != null ? Arrays.asList(roles) : new ArrayList());
try
{
- SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getMessage();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
// A SOAPHeaderElement is possibly bound to the endpoint operation
// in order to check that we need a the opMetaData
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -131,6 +131,7 @@
public void setConfigFile(String configFile)
{
this.configFile = configFile;
+ this.endpointConfig = null;
}
public String getConfigName()
@@ -141,6 +142,7 @@
public void setConfigName(String configName)
{
this.configName = configName;
+ this.endpointConfig = null;
}
public abstract Object getEndpointConfig();
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -69,7 +69,9 @@
// The list of service meta data
private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
// Used by eager initialization
- private boolean eagerInitialized = false;
+ private boolean eagerInitialized;
+ // Used by validate
+ private boolean validated;
public UnifiedMetaData()
{
@@ -147,9 +149,13 @@
public void validate()
{
- for (ServiceMetaData service : services)
+ if (validated == false)
{
- service.validate();
+ for (ServiceMetaData service : services)
+ {
+ service.validate();
+ }
+ validated = true;
}
}
Deleted: branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,88 +0,0 @@
-/*
- * 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.server;
-
-// $Id: AbstractContextServlet.java 396 2006-05-23 09:48:45Z thomas.diesler(a)jboss.com $
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Mar-2005
- */
-public class ContextServlet extends HttpServlet
-{
- // provide logging
- protected final Logger log = Logger.getLogger(ContextServlet.class);
-
- protected ServiceEndpointManager epManager;
-
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
- initServiceEndpointManager();
- }
-
- protected void initServiceEndpointManager()
- {
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- epManager = factory.getServiceEndpointManager();
- }
-
- /** Process GET requests.
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- PrintWriter writer = res.getWriter();
- res.setContentType("text/html");
-
- writer.print("<html>");
- setupHTMLResponseHeader(writer);
-
- writer.print("<body>");
- writer.print(epManager.showServiceEndpointTable());
- writer.print("</body>");
- writer.print("</html>");
- writer.close();
- }
-
- private void setupHTMLResponseHeader(PrintWriter writer)
- {
- Package wsPackage = Package.getPackage("org.jboss.ws");
- writer.println("<head>");
- writer.println("<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>");
- writer.println("<title>JBossWS / "+wsPackage.getImplementationVersion()+"</title>");
- writer.println("<link rel='stylesheet' href='./styles.css'>");
- writer.println("</head>");
- }
-}
Modified: branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -14,7 +14,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.server.ContextServlet</servlet-class>
+ <servlet-class>org.jboss.ws.integration.jboss.JBossContextServlet</servlet-class>
</servlet>
<servlet>
Added: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite: http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="/usr/java/apache/tomcat/logs/jbossws.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ws">
+ <priority value="DEBUG"/>
+ </category>
+
+ <category name="org.jboss.remoting">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="jbossws.SOAPMessage">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+
+ <!--
+ <category name="org.jboss.xb">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+<!--
+ <appender-ref ref="CONSOLE"/>
+-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -13,7 +13,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet</servlet-class>
+ <servlet-class>org.jboss.ws.integration.tomcat.TomcatContextServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/build.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -21,6 +21,7 @@
<property name="build.dir" value="${basedir}/output"/>
<property name="build.lib.dir" value="${build.dir}/lib"/>
+ <property name="build.resources.dir" value="${build.dir}/resources"/>
<property name="build.test.dir" value="${build.dir}/tests"/>
<property name="test.dir" value="${basedir}/src/test"/>
<property name="test.etc.dir" value="${test.dir}/etc"/>
@@ -125,21 +126,30 @@
<!-- Check that the latest build has been deployed -->
<condition property="jbossws.deployed">
- <filesmatch file1="${jboss.client}/${jbossws.client.jar}" file2="${build.lib.dir}/${jbossws.client.jar}"/>
+ <and>
+ <filesmatch file1="${jboss.client}/${jbossws.client.jar}" file2="${build.lib.dir}/${jbossws.client.jar}"/>
+ <equals arg1="${jbossws.target.server}" arg2="jboss"/>
+ </and>
</condition>
- <fail message="jbossws not deployed, run 'ant deploy-jbossws'" unless="jbossws.deployed"/>
+ <condition property="jbossws.deployed">
+ <and>
+ <filesmatch file1="${tomcat.home}/common/lib/jbossws-core.jar" file2="${build.lib.dir}/jbossws-core.jar"/>
+ <equals arg1="${jbossws.target.server}" arg2="tomcat"/>
+ </and>
+ </condition>
+ <fail message="jbossws not deployed, run the deploy target" unless="jbossws.deployed"/>
<!-- Define excluded tests -->
- <property name="jbossws.target.server.${jbossws.target.server}" value="true"/>
<condition property="tests.excludesfile" value="${test.resources.dir}/tests-no-excludes.txt">
- <isset property="jbossws.target.server.jboss"/>
+ <equals arg1="${jbossws.target.server}" arg2="jboss"/>
</condition>
<condition property="tests.excludesfile" value="${test.resources.dir}/tests-tomcat-excludes.txt">
- <isset property="jbossws.target.server.tomcat"/>
+ <equals arg1="${jbossws.target.server}" arg2="tomcat"/>
</condition>
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
+ <pathelement location="${build.lib.dir}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
@@ -147,7 +157,6 @@
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
- <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
</path>
@@ -173,13 +182,14 @@
<pathelement location="${build.lib.dir}/${jbossws.build}-jboss-integration.jar"/>
<pathelement location="${build.lib.dir}/${jbossws.build}-tomcat-integration.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
- <pathelement location="${jboss.lib}/jboss-system.jar"/>
- <pathelement location="${jboss.server.lib}/jboss.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-system.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss.jar"/>
+ <pathelement location="${thirdparty.dir}/policy-1.0.jar"/>
<pathelement location="${thirdparty.dir}/qdox.jar"/>
+ <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ <pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
+ <pathelement location="${thirdparty.dir}/wstx-lgpl-2.9.3.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
- <pathelement location="${thirdparty.dir}/policy-1.0.jar"/>
- <pathelement location="${thirdparty.dir}/wstx-lgpl-2.9.3.jar"/>
- <pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
</path>
<!-- Check that jBPM BPEL has been deployed -->
Modified: branches/jbossws-1.0/src/test/etc/log4j.xml
===================================================================
--- branches/jbossws-1.0/src/test/etc/log4j.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/etc/log4j.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -56,13 +56,19 @@
<priority value="DEBUG"/>
</category>
- <category name="org.jboss.remoting">
+ <category name="org.jboss.remoting">
<priority value="INFO"/>
</category>
+
+ <!-- Apache security is verbose -->
+ <category name="org.apache.xml.security">
+ <priority value="INFO"/>
+ </category>
- <category name="jbossws.SOAPMessage">
+ <!-- Enable SOAP message tracing -->
+ <category name="jbossws.SOAPMessage">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
- </category>
+ </category>
<!--
<category name="org.jboss.xb">
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,26 +1,28 @@
/*
- * 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.
- */
+ * 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.test.ws.jaxrpc.samples.wssecurity;
+// $Id: $
+
import java.io.File;
import java.net.URL;
import java.util.HashMap;
@@ -49,8 +51,6 @@
*/
public class StorePassEncryptTestCase extends JBossWSTest
{
- /** Construct the test case with a given name
- */
/** Deploy the test */
public static Test suite() throws Exception
@@ -72,7 +72,7 @@
private Hello getPort() throws Exception
{
- if (isTargetServerJBoss())
+ if (!isTargetServerJBoss())
{
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
@@ -81,32 +81,23 @@
}
else
{
- try
- {
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- URL wsdlURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/wsdl/HelloService.wsdl").toURL();
- URL mappingURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/jaxrpc-mapping.xml").toURL();
- URL securityURL = new File("resources/jaxrpc/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL();
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/wsdl/HelloService.wsdl").toURL();
+ URL mappingURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/jaxrpc-mapping.xml").toURL();
+ URL securityURL = new File("resources/jaxrpc/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL();
- QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
- QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+ QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
- HandlerRegistry registry = service.getDynamicHandlerRegistry();
- List infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new QName[]{}));
- registry.setHandlerChain(portName, infos);
+ HandlerRegistry registry = service.getDynamicHandlerRegistry();
+ List infos = registry.getHandlerChain(portName);
+ infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new QName[] {}));
+ registry.setHandlerChain(portName, infos);
- Hello port = (Hello)service.getPort(Hello.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-store-pass-encrypt");
- return port;
- }
- catch (Exception e)
- {
- System.out.println("Exception is : " + e);
- e.printStackTrace();
- throw e;
- }
+ Hello port = (Hello)service.getPort(Hello.class);
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-store-pass-encrypt");
+ return port;
}
}
}
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,62 +0,0 @@
-/*
- * 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.test.ws.jaxrpc.wsse;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * This test simulates simulates the usage of a jboss-ws-security keystore and truststore use cases
- *
- * @author <a href="mailto:magesh.bojan@jboss.com">Magesh Kumar B</a>
- * @version $Revision$
- */
-public class StorePassEncryptTestCase extends JBossWSTest
-{
- /** Construct the test case with a given name
- */
-
- /** Deploy the test */
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(StorePassEncryptTestCase.class, "jaxrpc-wsse-store-pass-encrypt-class-cmd.war, jaxrpc-wsse-store-pass-encrypt-class-cmd-client.jar");
- }
-
- /**
- * Test JSE endpoint
- */
- public void testEndpoint() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
- Hello hello = (Hello)service.getPort(Hello.class);
-
- UserType in0 = new UserType("Kermit");
- UserType retObj = hello.echoUserType(in0);
- assertEquals(in0, retObj);
- }
-}
Modified: branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt
===================================================================
--- branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,6 +1,7 @@
-org/jboss/test/ws/samples/dynamichandler/**
-org/jboss/test/ws/samples/jmstransport/**
-org/jboss/test/ws/samples/jsr109ejb/**
-org/jboss/test/ws/samples/jsr181ejb/**
-org/jboss/test/ws/samples/secureejb/**
-org/jboss/test/ws/jbws1011/**
+org/jboss/test/ws/jaxrpc/samples/dynamichandler/**
+org/jboss/test/ws/jaxrpc/samples/jmstransport/**
+org/jboss/test/ws/jaxrpc/samples/jsr109ejb/**
+org/jboss/test/ws/jaxrpc/samples/secureejb/**
+org/jboss/test/ws/jaxrpc/samples/wsbpel/**
+org/jboss/test/ws/jaxrpc/jbws1011/**
+org/jboss/test/ws/jaxws/samples/jsr181ejb/**
19 years, 6 months
JBossWS SVN: r1252 - in branches/dlofthouse/JBWS-1179/src/test: ant java/org/jboss/test/ws/jaxrpc java/org/jboss/test/ws/jaxrpc/jbws1179 resources/jaxrpc resources/jaxrpc/jbws1179 resources/jaxrpc/jbws1179/META-INF resources/jaxrpc/jbws1179/WEB-INF resources/jaxrpc/jbws1179/WEB-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-18 06:02:48 -0400 (Wed, 18 Oct 2006)
New Revision: 1252
Added:
branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/
branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/JBWS1179TestCase.java
branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.java
branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/application-client.xml
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/jboss-client.xml
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/web.xml
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/webservices.xml
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/TestService.wsdl
branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/wstools-config.xml
Modified:
branches/dlofthouse/JBWS-1179/src/test/ant/build-jars-jaxrpc.xml
Log:
JBWS-1179 - Test Case
Modified: branches/dlofthouse/JBWS-1179/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/ant/build-jars-jaxrpc.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/ant/build-jars-jaxrpc.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -717,6 +717,32 @@
</metainf>
</jar>
+ <!-- jbossws-jbws1179 -->
+ <war warfile="${build.test.dir}/libs/jaxrpc-jbws1179.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1179/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1179/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${build.test.dir}/libs/jaxrpc-jbws1179-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1179/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1179/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbossws-jbws1186 -->
<war warfile="${build.test.dir}/libs/jaxrpc-jbws1186.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1186/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/JBWS1179TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/JBWS1179TestCase.java 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/JBWS1179TestCase.java 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,78 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1179;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18-October-2006
+ */
+public class JBWS1179TestCase extends JBossWSTest
+{
+
+ public static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1179TestCase.class, "jaxrpc-jbws1179.war, jaxrpc-jbws1179-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+
+ protected int getActiveSessions() throws Exception
+ {
+ MBeanServerConnection server = getServer();
+ ObjectName objectName = new ObjectName("jboss.web:host=localhost,path=/jaxrpc-jbws1179,type=Manager");
+
+ return ((Integer)server.getAttribute(objectName, "activeSessions")).intValue();
+ }
+
+ public void testCallCreateNoSession() throws Exception
+ {
+ int originalSessions = getActiveSessions();
+
+ port.echoMessage("Hello");
+
+ int finalSessions = getActiveSessions();
+
+ assertEquals("activeSessions after call", originalSessions, finalSessions);
+ }
+}
Property changes on: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/JBWS1179TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.java 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.java 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,37 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1179;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18-October-2006
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Property changes on: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,37 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1179;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18-October-2006
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echoMessage(String message)
+ {
+ return message;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1179/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/application-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/application-client.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/application-client.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>TestService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1179.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/jboss-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/jboss-client.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/jboss-client.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1179/TestEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/jaxrpc-mapping.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/jaxrpc-mapping.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,37 @@
+<?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>org.jboss.test.ws.jaxrpc.jbws1179</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1179/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1179.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1179'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1179.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1179'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1179'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1179'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1179'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/web.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/web.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1179.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/webservices.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/webservices.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/webservices.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1179' 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_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port>impl:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1179.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/TestService.wsdl 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/TestService.wsdl 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1179' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1179' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1179' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1179' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/wstools-config.xml
===================================================================
--- branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/wstools-config.xml 2006-10-18 10:00:31 UTC (rev 1251)
+++ branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/wstools-config.xml 2006-10-18 10:02:48 UTC (rev 1252)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" 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">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1179.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1179" type-namespace="http://org.jboss.test.ws/jbws1179/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
Property changes on: branches/dlofthouse/JBWS-1179/src/test/resources/jaxrpc/jbws1179/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
19 years, 6 months
JBossWS SVN: r1251 - branches/dlofthouse
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-18 06:00:31 -0400 (Wed, 18 Oct 2006)
New Revision: 1251
Added:
branches/dlofthouse/JBWS-1179/
Log:
JBWS-1179 - Branch for JBWS-1179
Copied: branches/dlofthouse/JBWS-1179 (from rev 1250, branches/jbossws-1.0)
19 years, 6 months
JBossWS SVN: r1250 - trunk/src/main/etc
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-18 04:34:55 -0400 (Wed, 18 Oct 2006)
New Revision: 1250
Modified:
trunk/src/main/etc/jbossws-component-info.xml
trunk/src/main/etc/jbossws14-component-info.xml
Log:
Fix repository id
Modified: trunk/src/main/etc/jbossws-component-info.xml
===================================================================
--- trunk/src/main/etc/jbossws-component-info.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ trunk/src/main/etc/jbossws-component-info.xml 2006-10-18 08:34:55 UTC (rev 1250)
@@ -2,7 +2,7 @@
<component id="jboss/jbossws"
licenseType="lgpl"
- version="@version.id@"
+ version="@repository.id@"
description="JBossWS an implementation of J2EE Web Services">
<artifact id="jbossws.sar"/>
Modified: trunk/src/main/etc/jbossws14-component-info.xml
===================================================================
--- trunk/src/main/etc/jbossws14-component-info.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ trunk/src/main/etc/jbossws14-component-info.xml 2006-10-18 08:34:55 UTC (rev 1250)
@@ -2,7 +2,7 @@
<component id="jboss/jbossws14"
licenseType="lgpl"
- version="@version.id@"
+ version="@repository.id@"
description="JBossWS an implementation of J2EE Web Services">
<artifact id="jbossws14.sar"/>
19 years, 6 months
JBossWS SVN: r1249 - in branches/dlofthouse/JBWS-1093/src/test: ant java/org/jboss/test/ws/jaxrpc java/org/jboss/test/ws/jaxrpc/jbws1093 resources/jaxrpc resources/jaxrpc/jbws1093 resources/jaxrpc/jbws1093/META-INF resources/jaxrpc/jbws1093/WEB-INF resources/jaxrpc/jbws1093/WEB-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-17 18:00:26 -0400 (Tue, 17 Oct 2006)
New Revision: 1249
Added:
branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/
branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
Modified:
branches/dlofthouse/JBWS-1093/src/test/ant/build-jars-jaxrpc.xml
Log:
JBWS-1093 - Test Case
Modified: branches/dlofthouse/JBWS-1093/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/ant/build-jars-jaxrpc.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/ant/build-jars-jaxrpc.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -565,6 +565,33 @@
</metainf>
</jar>
+ <!-- jbossws-jbws1093 -->
+ <war warfile="${build.test.dir}/libs/jaxrpc-jbws1093.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${build.test.dir}/libs/jaxrpc-jbws1093-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1093/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1093/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpc-jbws1107 -->
<war warfile="${build.test.dir}/libs/jaxrpc-jbws1107.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1107/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,99 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1093;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+
+/**
+ * Test case to test that when a deployment contains both an endpoint and a
+ * servlet both are deployed correctly and can be accessed.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 17-October-2006
+ */
+public class JBWS1093TestCase extends JBossWSTest
+{
+
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1093TestCase.class, "jaxrpc-jbws1093.war, jaxrpc-jbws1093-client.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ if (isTargetServerJBoss())
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ else
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new File("resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl").toURL();
+ URL mappingURL = new File("resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName qname = new QName("http://org.jboss.test.ws/jbws1093", "TestService");
+ Service service = factory.createService(wsdlURL, qname, mappingURL);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+ }
+
+ public void testAccessServlet() throws Exception
+ {
+ String host = System.getProperty("jbosstest.host.name");
+ URL servletURL = new URL("http://" + host + ":8080" + "/jaxrpc-jbws1093/ServletTest");
+
+ InputStream is = servletURL.openStream();
+ InputStreamReader isr = new InputStreamReader(is);
+ BufferedReader br = new BufferedReader(isr);
+
+ String line = br.readLine();
+
+ assertEquals(ServletTest.MESSAGE, line);
+ }
+
+ public void testAccessEnpoint() throws Exception
+ {
+ assertEquals(ServletTest.MESSAGE, port.echoString(ServletTest.MESSAGE));
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,53 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1093;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * JBWS-1093 - This servlet is called ServletTest to check that we are
+ * not identifying servlets by the classname ending in 'Servlet'.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 17-October-2006
+ */
+public class ServletTest extends HttpServlet
+{
+
+ private static final long serialVersionUID = 8465532467878198647L;
+
+ public static final String MESSAGE = "Success!!";
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ ServletOutputStream sos = response.getOutputStream();
+ sos.println(MESSAGE);
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,36 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1093;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since 17-October-2006
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoString(final String message) throws RemoteException;
+
+}
Property changes on: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,38 @@
+/*
+ * 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.test.ws.jaxrpc.jbws1093;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since 17-October-2006
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echoString(String message) throws RemoteException
+ {
+ return message;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>TestService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1093/TestEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,37 @@
+<?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>org.jboss.test.ws.jaxrpc.jbws1093</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1093/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1093'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1093'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1093'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoString</java-method-name>
+ <wsdl-operation>echoString</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1093'>wsdlMsgNS:TestEndpoint_echoString</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1093'>wsdlMsgNS:TestEndpoint_echoStringResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>ServletTest</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1093.ServletTest</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletTest</servlet-name>
+ <url-pattern>/ServletTest</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1093' 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_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port>impl:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1093' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1093' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoString'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoStringResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoString' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoString'/>
+ <output message='tns:TestEndpoint_echoStringResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoString'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='http://localhost:8080//jbossws-jbws1093/TestEndpoint?wsdl'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml 2006-10-17 21:56:15 UTC (rev 1248)
+++ branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml 2006-10-17 22:00:26 UTC (rev 1249)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<!-- Set the soap:address location to 'http://localhost:8080//jbossws-jbws1093/TestEndpoint?wsdl' to run with Tomcat -->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" 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">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1093" type-namespace="http://org.jboss.test.ws/jbws1093/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
Property changes on: branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
19 years, 6 months
JBossWS SVN: r1248 - branches/dlofthouse
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-17 17:56:15 -0400 (Tue, 17 Oct 2006)
New Revision: 1248
Added:
branches/dlofthouse/JBWS-1093/
Log:
Branch for JBWS-1093
Copied: branches/dlofthouse/JBWS-1093 (from rev 1247, branches/jbossws-1.0)
19 years, 6 months
JBossWS SVN: r1247 - in trunk/src: main/java/org/jboss/ws/metadata/wsdl test/java/org/jboss/test/ws/common/wsdl11
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-10-17 16:05:06 -0400 (Tue, 17 Oct 2006)
New Revision: 1247
Modified:
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
Log:
Clear binding cache per definition
Fix WSDL11TestCase
Fix eventing test cases
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-10-17 19:03:21 UTC (rev 1246)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-10-17 20:05:06 UTC (rev 1247)
@@ -1089,6 +1089,9 @@
{
log.trace("BEGIN processServices: " + srcWsdl.getDocumentBaseURI());
+ // Each definition needs a clear binding cache
+ allBindings = null;
+
if (srcWsdl.getServices().size() > 0)
{
Iterator it = srcWsdl.getServices().values().iterator();
@@ -1116,6 +1119,9 @@
processServices(importDefinition);
}
}
+
+ // The binding cache must be clear after imports, so that undefined bindings can be located
+ allBindings = null;
}
log.trace("END processServices: " + srcWsdl.getDocumentBaseURI());
Modified: trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-10-17 19:03:21 UTC (rev 1246)
+++ trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-10-17 20:05:06 UTC (rev 1247)
@@ -36,6 +36,7 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
@@ -65,7 +66,7 @@
// check the echoString operation
WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation(new NCName("echoString"));
- assertEquals("document", wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_IRI, wsdlOperation.getStyle());
WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoString"));
assertEquals(new QName(TARGET_NAMESPACE, "echoString"), wsdlInput.getXMLType());
@@ -74,7 +75,7 @@
// check the echoSimpleUserType operation
wsdlOperation = wsdlInterface.getOperation(new NCName("echoSimpleUserType"));
- assertEquals("document", wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_IRI, wsdlOperation.getStyle());
wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserType"), wsdlInput.getXMLType());
@@ -98,43 +99,17 @@
public void testRpcLitSimple() throws Exception
{
- File wsdlFile = new File("resources/common/wsdl11/RpcLitSimple.wsdl");
- assertTrue(wsdlFile.exists());
-
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
- WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new NCName("JaxRpcTestService"));
-
- // check if the schema has been extracted
- WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
- assertNotNull(WSDLUtils.getSchemaModel(wsdlTypes));
-
- // check the echoString operation
- WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation(new NCName("echoString"));
- assertEquals("rpc", wsdlOperation.getStyle());
-
- WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName("String_1"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- wsdlInput = wsdlOperation.getInput(new QName("String_2"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- WSDLInterfaceOperationOutput wsdlOutput = wsdlOperation.getOutput(new QName("result"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlOutput.getXMLType());
-
- // check the echoSimpleUserType operation
- wsdlOperation = wsdlInterface.getOperation(new NCName("echoSimpleUserType"));
- assertEquals("rpc", wsdlOperation.getStyle());
-
- wsdlInput = wsdlOperation.getInput(new QName("String_1"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- wsdlInput = wsdlOperation.getInput(new QName("SimpleUserType_2"));
- assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), wsdlInput.getXMLType());
- wsdlOutput = wsdlOperation.getOutput(new QName("result"));
- assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), wsdlOutput.getXMLType());
+ verifyRPC("resources/common/wsdl11/RpcLitSimple.wsdl");
}
public void testRpcLitImport() throws Exception
{
- File wsdlFile = new File("resources/common/wsdl11/RpcLitImport.wsdl");
+ verifyRPC("resources/common/wsdl11/RpcLitImport.wsdl");
+ }
+
+ private void verifyRPC(String fileName) throws Exception
+ {
+ File wsdlFile = new File(fileName);
assertTrue(wsdlFile.exists());
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
@@ -147,27 +122,32 @@
// check the echoString operation
WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation(new NCName("echoString"));
- assertEquals("rpc", wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_RPC, wsdlOperation.getStyle());
- WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName("String_1"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- wsdlInput = wsdlOperation.getInput(new QName("String_2"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- WSDLInterfaceOperationOutput wsdlOutput = wsdlOperation.getOutput(new QName("result"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlOutput.getXMLType());
+ WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInputs()[0];
+ WSDLRPCPart childPart = wsdlInput.getChildPart("String_1");
+ assertEquals(Constants.TYPE_LITERAL_STRING, childPart.getType());
+ childPart = wsdlInput.getChildPart("String_2");
+ assertEquals(Constants.TYPE_LITERAL_STRING, childPart.getType());
+ WSDLInterfaceOperationOutput wsdlOutput = wsdlOperation.getOutputs()[0];
+ childPart = wsdlOutput.getChildPart("result");
+ assertEquals(Constants.TYPE_LITERAL_STRING, childPart.getType());
// check the echoSimpleUserType operation
wsdlOperation = wsdlInterface.getOperation(new NCName("echoSimpleUserType"));
- assertEquals("rpc", wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_RPC, wsdlOperation.getStyle());
- wsdlInput = wsdlOperation.getInput(new QName("String_1"));
- assertEquals(Constants.TYPE_LITERAL_STRING, wsdlInput.getXMLType());
- wsdlInput = wsdlOperation.getInput(new QName("SimpleUserType_2"));
- assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), wsdlInput.getXMLType());
- wsdlOutput = wsdlOperation.getOutput(new QName("result"));
- assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), wsdlOutput.getXMLType());
+ wsdlInput = wsdlOperation.getInputs()[0];
+ childPart = wsdlInput.getChildPart("String_1");
+ assertEquals(Constants.TYPE_LITERAL_STRING, childPart.getType());
+ childPart = wsdlInput.getChildPart("SimpleUserType_2");
+ assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), childPart.getType());
+ wsdlOutput = wsdlOperation.getOutputs()[0];
+ childPart = wsdlOutput.getChildPart("result");
+ assertEquals(new QName(TARGET_NAMESPACE, "SimpleUserType"), childPart.getType());
}
+
public void testEventSourceBinding() throws Exception
{
File wsdlFile = new File("resources/common/wsdl11/inherit/wind_inherit.wsdl");
19 years, 6 months