JBossWS SVN: r11884 - in common/trunk/src/main/java/org/jboss/wsf/common: invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-30 04:46:06 -0400 (Tue, 30 Mar 2010)
New Revision: 11884
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/injection/InjectionHelper.java
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandler.java
common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
Log:
[JBWS-2970] every endpoint will provide associated JNDI context at runtime, not at deployment time
Modified: common/trunk/src/main/java/org/jboss/wsf/common/injection/InjectionHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/injection/InjectionHelper.java 2010-03-30 08:39:54 UTC (rev 11883)
+++ common/trunk/src/main/java/org/jboss/wsf/common/injection/InjectionHelper.java 2010-03-30 08:46:06 UTC (rev 11884)
@@ -28,7 +28,6 @@
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.naming.Context;
-import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.ws.WebServiceContext;
@@ -54,7 +53,6 @@
{
private static final Logger LOG = Logger.getLogger(InjectionHelper.class);
- private static final String POJO_JNDI_PREFIX = "java:comp/env/";
private static final ClassProcessor<Method> POST_CONSTRUCT_METHOD_FINDER = new PostConstructMethodFinder();
private static final ClassProcessor<Method> PRE_DESTROY_METHOD_FINDER = new PreDestroyMethodFinder();
@@ -93,22 +91,25 @@
* @see javax.annotation.Resource
* @see javax.ejb.EJB
*/
- public static void injectResources(final Object instance, final InjectionsMetaData injections)
+ public static void injectResources(final Object instance, final InjectionsMetaData injections, final Context ctx)
{
if (instance == null)
throw new IllegalArgumentException("Object instance cannot be null");
if (injections == null)
return;
-
+
+ if (ctx == null)
+ return;
+
// inject descriptor driven annotations
- injectDescriptorAnnotatedAccessibleObjects(instance, injections);
+ injectDescriptorAnnotatedAccessibleObjects(instance, injections, ctx);
// inject @Resource annotated methods and fields
- injectResourceAnnotatedAccessibleObjects(instance, injections);
+ injectResourceAnnotatedAccessibleObjects(instance, injections, ctx);
// inject @EJB annotated methods and fields
- injectEJBAnnotatedAccessibleObjects(instance, injections);
+ injectEJBAnnotatedAccessibleObjects(instance, injections, ctx);
}
/**
@@ -215,39 +216,15 @@
}
/**
- * Gets JNDI context.
- *
- * @param injections injection metadata to get context from.
- * @return JNDI context
- */
- private static Context getContext(final InjectionsMetaData injections)
- {
- final Context ctx = injections.getContext();
- if (ctx == null)
- {
- try
- {
- return (Context)getDefaultContext().lookup(POJO_JNDI_PREFIX);
- }
- catch (NamingException ne)
- {
- InjectionException.rethrow("Cannot lookup JNDI context: " + POJO_JNDI_PREFIX, ne);
- }
- }
-
- return ctx;
- }
-
- /**
* Performs descriptor driven injections.
*
* @param instance to operate on
* @param injections injections metadata
+ * @param ctx JNDI context
*/
- private static void injectDescriptorAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections)
+ private static void injectDescriptorAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections, final Context ctx)
{
final Collection<InjectionMetaData> injectionMDs = injections.getInjectionsMetaData(instance.getClass());
- final Context ctx = !injectionMDs.isEmpty() ? getContext(injections) : null;
for (InjectionMetaData injectionMD : injectionMDs)
{
@@ -295,16 +272,15 @@
*
* @param instance to operate on
* @param injections injections meta data
+ * @param ctx JNDI context
* @see org.jboss.wsf.common.injection.finders.ResourceFieldFinder
* @see org.jboss.wsf.common.injection.finders.ResourceMethodFinder
* @see javax.annotation.Resource
*/
- private static void injectResourceAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections)
+ private static void injectResourceAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections, final Context ctx)
{
final Collection<Field> resourceAnnotatedFields = RESOURCE_FIELD_FINDER.process(instance.getClass());
final Collection<Method> resourceAnnotatedMethods = RESOURCE_METHOD_FINDER.process(instance.getClass());
- final boolean doInjection = !resourceAnnotatedFields.isEmpty() || !resourceAnnotatedMethods.isEmpty();
- final Context ctx = doInjection ? getContext(injections) : null;
// Inject @Resource annotated fields
for (Field field : resourceAnnotatedFields)
@@ -342,16 +318,15 @@
*
* @param instance to operate on
* @param injections injections meta data
+ * @param ctx JNDI context
* @see org.jboss.wsf.common.injection.finders.EJBFieldFinder
* @see org.jboss.wsf.common.injection.finders.EJBMethodFinder
* @see javax.ejb.EJB
*/
- private static void injectEJBAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections)
+ private static void injectEJBAnnotatedAccessibleObjects(final Object instance, final InjectionsMetaData injections, final Context ctx)
{
final Collection<Field> ejbAnnotatedFields = EJB_FIELD_FINDER.process(instance.getClass());
final Collection<Method> ejbAnnotatedMethods = EJB_METHOD_FINDER.process(instance.getClass());
- final boolean doInjection = !ejbAnnotatedFields.isEmpty() || !ejbAnnotatedMethods.isEmpty();
- final Context ctx = doInjection ? getDefaultContext() : null;
// Inject @EJB annotated fields
for (Field field : ejbAnnotatedFields)
@@ -440,28 +415,6 @@
}
/**
- * Returns default JNDI context.
- *
- * @return default JNDI context
- */
- private static Context getDefaultContext()
- {
- Context ctx = null;
-
- try
- {
- ctx = new InitialContext();
- }
- catch (NamingException ne)
- {
- final String message = "Cannot create default JNDI context";
- InjectionException.rethrow(message, ne);
- }
-
- return ctx;
- }
-
- /**
* Invokes method on object with specified arguments.
*
* @param instance to invoke method on
Modified: common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandler.java 2010-03-30 08:39:54 UTC (rev 11883)
+++ common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandler.java 2010-03-30 08:46:06 UTC (rev 11884)
@@ -23,6 +23,9 @@
import java.lang.reflect.Method;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
@@ -67,7 +70,12 @@
{
// does nothing
}
-
+
+ public Context getJNDIContext(final Endpoint ep) throws NamingException
+ {
+ return null;
+ }
+
/**
* Returns implementation method that will be used for invocation.
*
Modified: common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-03-30 08:39:54 UTC (rev 11883)
+++ common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-03-30 08:46:06 UTC (rev 11884)
@@ -23,6 +23,9 @@
import java.security.Principal;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
@@ -48,6 +51,8 @@
public final class InvocationHandlerJAXWS extends AbstractInvocationHandlerJSE
{
+ private static final String POJO_JNDI_PREFIX = "java:comp/env/";
+
/**
* Constructor.
*/
@@ -70,7 +75,8 @@
final Object targetBean = this.getTargetBean(invocation);
this.log.debug("Injecting resources on JAXWS JSE endpoint: " + targetBean);
- InjectionHelper.injectResources(targetBean, injectionsMD);
+ if (injectionsMD != null)
+ InjectionHelper.injectResources(targetBean, injectionsMD, endpoint.getJNDIContext());
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
final ResourceInjectorFactory resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
@@ -106,6 +112,11 @@
ThreadLocalAwareWebServiceContext.getInstance().setMessageContext(null);
}
+ public Context getJNDIContext(final Endpoint ep) throws NamingException
+ {
+ return (Context)new InitialContext().lookup(POJO_JNDI_PREFIX);
+ }
+
/**
* Returns WebServiceContext associated with this invocation.
*
14 years, 6 months
JBossWS SVN: r11883 - in spi/trunk/src/main/java/org/jboss/wsf/spi: deployment/integration and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-30 04:39:54 -0400 (Tue, 30 Mar 2010)
New Revision: 11883
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
Log:
[JBWS-2970] every endpoint will provide associated JNDI context at runtime, not at deployment time
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-03-30 08:31:07 UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-03-30 08:39:54 UTC (rev 11883)
@@ -24,6 +24,8 @@
import java.util.List;
import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.NamingException;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
@@ -127,4 +129,7 @@
/** Ask configured processors for processing of the given record **/
void processRecord(Record record);
+
+ /** Returns associated JNDI context with this endpoint. */
+ Context getJNDIContext();
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java 2010-03-30 08:31:07 UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java 2010-03-30 08:39:54 UTC (rev 11883)
@@ -51,12 +51,6 @@
String getComponentClassName();
/**
- * Returns JNDI context associated with EJB container.
- * @return
- */
- Context getContext();
-
- /**
* Get a unified meta data view represented by an annotation.
*
* @param t
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2010-03-30 08:31:07 UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2010-03-30 08:39:54 UTC (rev 11883)
@@ -24,6 +24,8 @@
import java.lang.reflect.UndeclaredThrowableException;
import javax.management.MBeanException;
+import javax.naming.Context;
+import javax.naming.NamingException;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -36,14 +38,17 @@
*/
public abstract class InvocationHandler
{
- /** Create a container specific invocation **/
+ /** Create a container specific invocation */
public abstract Invocation createInvocation();
/** Invoke the the service endpoint */
public abstract void invoke(Endpoint ep, Invocation inv) throws Exception;
- /** Initilize the invocation handler **/
+ /** Initilize the invocation handler */
public abstract void init(Endpoint ep);
+
+ /** Returns JNDI context associated with endpoint */
+ public abstract Context getJNDIContext(Endpoint ep) throws NamingException;
protected void handleInvocationException(Throwable th) throws Exception
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2010-03-30 08:31:07 UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2010-03-30 08:39:54 UTC (rev 11883)
@@ -27,8 +27,6 @@
import java.util.LinkedList;
import java.util.Map;
-import javax.naming.Context;
-
/**
* Injections metadata container.
*
@@ -55,40 +53,25 @@
private final Map<Class<? extends Annotation>, ReferenceResolver> referenceResolvers;
/**
- * JNDI context.
- */
- private final Context ctx;
-
- /**
* Constructor.
*
* @param injections injection definitions list
- * @param ctx JNDI context
+ * @param resolvers reference resolvers
*/
- public InjectionsMetaData(Collection<InjectionMetaData> injections, Map<Class<? extends Annotation>, ReferenceResolver> referenceResolvers, Context ctx)
+ public InjectionsMetaData(Collection<InjectionMetaData> injections, Map<Class<? extends Annotation>, ReferenceResolver> resolvers)
{
super();
if (injections == null)
throw new IllegalArgumentException("injections metadata list cannot be null");
- if ((referenceResolvers == null) || (referenceResolvers.size() == 0))
+ if ((resolvers == null) || (resolvers.size() == 0))
throw new IllegalArgumentException("reference resolvers list cannot be null or empty collection");
this.injections = injections;
- this.referenceResolvers = referenceResolvers;
- this.ctx = ctx;
+ this.referenceResolvers = resolvers;
}
/**
- * Returns associated JNDI context.
- * @return associated JNDI context
- */
- public Context getContext()
- {
- return this.ctx;
- }
-
- /**
* Returns all descriptor driven injections metadata for particular class.
*
* @param clazz class to return injection definitions for
14 years, 6 months
JBossWS SVN: r11882 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/extensions/addressing/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-30 04:31:07 -0400 (Tue, 30 Mar 2010)
New Revision: 11882
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBWS-2978]:check the mismatch between soap action and wsa action
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -191,16 +191,15 @@
// R2745 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
// with a quoted empty string value, if in the corresponding WSDL description,
// the soapAction attribute of soapbind:operation is either not present, or
- // present with an empty string as its value.
- String soapAction = null;
+ // present with an empty string as its value.
Map<String, Object> reqContext = getRequestContext();
- Boolean useSOAPAction = (Boolean)reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
- if (Boolean.TRUE.equals(useSOAPAction))
+ String soapAction = (String) reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);;
+ Boolean useSOAPAction = (Boolean) reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
+ if (Boolean.TRUE.equals(useSOAPAction) && soapAction == null)
{
- soapAction = (String)reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);
- if (soapAction == null)
throw new IllegalStateException("Cannot obtain: " + BindingProvider.SOAPACTION_URI_PROPERTY);
}
+
MimeHeaders mimeHeaders = reqMsg.getMimeHeaders();
mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction : "");
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -150,7 +150,12 @@
try
{
if (SOAPMessage.class.isAssignableFrom(type))
- {
+ {
+ //Throw Exception if this is soap fault message
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
+ SOAPFault soapFault = soapBody.getFault();
+ if (soapFault != null)
+ throw new SOAPFaultException(soapFault);
retObj = resMsg;
}
else if (Source.class.isAssignableFrom(type))
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -23,6 +23,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -31,7 +32,13 @@
import org.w3c.dom.Element;
import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.FaultAction;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
@@ -40,6 +47,7 @@
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.SOAPFaultException;
import java.net.URISyntaxException;
import java.util.Collections;
@@ -101,11 +109,40 @@
}
addrProps.readHeaders(soapMessage);
- msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, addrProps);
- msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
- msgContext.put(MessageContext.REFERENCE_PARAMETERS, convertToElementList(addrProps.getReferenceParameters().getElements()));
- msgContext.setScope(MessageContext.REFERENCE_PARAMETERS, Scope.APPLICATION);
- return true;
+ msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, addrProps);
+ msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
+ msgContext.put(MessageContext.REFERENCE_PARAMETERS, convertToElementList(addrProps.getReferenceParameters().getElements()));
+ msgContext.setScope(MessageContext.REFERENCE_PARAMETERS, Scope.APPLICATION);
+
+ //check if soap action matches wsa action
+ String[] soapActions = commonMsgContext.getMessageAbstraction().getMimeHeaders().getHeader("SOAPAction");
+ if (soapActions != null && soapActions.length > 0)
+ {
+ String soapAction = soapActions[0];
+ if (!soapAction.equals("\"\"") && addrProps.getAction() != null)
+ {
+ String wsaAction = addrProps.getAction().getURI().toString();
+ // R1109 The value of the SOAPAction HTTP header field in a HTTP request MESSAGE MUST be a quoted string.
+ if (!soapAction.equals(wsaAction) && !soapAction.equals("\"" + wsaAction + "\""))
+ {
+ try
+ {
+ SOAPFault fault = new SOAPFaultImpl();
+ fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ActionMismatch"));
+ fault.setFaultString("Mismatch between soap action:" + soapAction + " and wsa action:\""
+ + addrProps.getAction().getURI() + "\"");
+ Detail detail = fault.addDetail();
+ detail.addDetailEntry(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ProblemAction"));
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+ }
+ }
+ return true;
}
private static List<Element> convertToElementList(List<Object> objects)
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-30 08:31:07 UTC (rev 11882)
@@ -619,7 +619,20 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
-
+
+ <!-- jaxws-jbws2978 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2978.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2978/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbers.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2978/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978 (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978)
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.jws.WebResult;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-@WebService(name = "AddNumbers", targetNamespace = "http://ws.jboss.org")
-public interface AddNumbers {
- @WebMethod
- @WebResult(targetNamespace = "")
- @RequestWrapper(localName = "addNumbersRequest", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersRequest")
- @ResponseWrapper(localName = "addNumbersResponse", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersResponse")
- public int addNumbersFault1(
- @WebParam(name = "arg0", targetNamespace = "")
- int arg0,
- @WebParam(name = "arg1", targetNamespace = "")
- int arg1);
-}
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.WebResult;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "AddNumbers", targetNamespace = "http://ws.jboss.org")
+public interface AddNumbers {
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbersRequest", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersRequest")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersResponse")
+ public int addNumbersFault1(
+ @WebParam(name = "arg0", targetNamespace = "")
+ int arg0,
+ @WebParam(name = "arg1", targetNamespace = "")
+ int arg1);
+}
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.xml.ws.addressing.Action;
-import javax.xml.ws.soap.Addressing;
-@WebService(name = "AddNumbers", portName = "AddNumbersPort", serviceName = "AddNumbers", targetNamespace = "http://ws.jboss.org")
-@Addressing(enabled = true, required = true)
-public class AddNumbersImpl
-{
-
- @Action(input = "inputAction", output = "outputAction")
- public int addNumbers2(@WebParam(name = "number1") int number1, @WebParam(name = "number2") int number2)
- {
- return number1 + number2;
- }
-}
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.addressing.Action;
+import javax.xml.ws.soap.Addressing;
+@WebService(name = "AddNumbers", portName = "AddNumbersPort", serviceName = "AddNumbers", targetNamespace = "http://ws.jboss.org")
+@Addressing(enabled = true, required = true)
+public class AddNumbersImpl
+{
+
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers2(@WebParam(name = "number1") int number1, @WebParam(name = "number2") int number2)
+ {
+ return number1 + number2;
+ }
+}
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "addNumbersRequest", propOrder = {
- "arg0",
- "arg1"
-})
-public class AddNumbersRequest {
-
- protected int arg0;
- protected int arg1;
-
- /**
- * Gets the value of the arg0 property.
- *
- */
- public int getArg0() {
- return arg0;
- }
-
- /**
- * Sets the value of the arg0 property.
- *
- */
- public void setArg0(int value) {
- this.arg0 = value;
- }
-
- /**
- * Gets the value of the arg1 property.
- *
- */
- public int getArg1() {
- return arg1;
- }
-
- /**
- * Sets the value of the arg1 property.
- *
- */
- public void setArg1(int value) {
- this.arg1 = value;
- }
-
-}
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersRequest", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class AddNumbersRequest {
+
+ protected int arg0;
+ protected int arg1;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the arg1 property.
+ *
+ */
+ public int getArg1() {
+ return arg1;
+ }
+
+ /**
+ * Sets the value of the arg1 property.
+ *
+ */
+ public void setArg1(int value) {
+ this.arg1 = value;
+ }
+
+}
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "addNumbersResponse", propOrder = {
- "_return"
-})
-public class AddNumbersResponse {
-
- @XmlElement(name = "return")
- protected int _return;
-
- /**
- * Gets the value of the return property.
- *
- */
- public int getReturn() {
- return _return;
- }
-
- /**
- * Sets the value of the return property.
- *
- */
- public void setReturn(int value) {
- this._return = value;
- }
-
-}
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersResponse", propOrder = {
+ "_return"
+})
+public class AddNumbersResponse {
+
+ @XmlElement(name = "return")
+ protected int _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public int getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(int value) {
+ this._return = value;
+ }
+
+}
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
-
-import java.io.ByteArrayInputStream;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPFaultException;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * JBWS2978TestCase.
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JBWS2978TestCase extends JBossWSTest
-{
-
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2978";
-
- private final String requestMessage = "<S:Envelope xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'><S:Header><To xmlns='http://www.w3.org/2005/08/addressing'>"
- + TARGET_ENDPOINT_ADDRESS
- + "</To><Action xmlns='http://www.w3.org/2005/08/addressing'>inputAction</Action>"
- + "<MessageID xmlns='http://www.w3.org/2005/08/addressing'>uuid:56d586f8-980c-48cf-982d-77a2f56e5c5b</MessageID>"
- + "<ReplyTo xmlns='http://www.w3.org/2005/08/addressing'><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo>"
- + "</S:Header><S:Body><ns1:addNumbers xmlns:ns1='http://ws.jboss.org'><arg0>10</arg0><arg1>10</arg1></ns1:addNumbers></S:Body></S:Envelope>";
-
- public Service service = null;
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS2978TestCase.class, "jaxws-jbws2978.war");
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://ws.jboss.org", "AddNumbers");
- service = Service.create(wsdlURL, serviceName);
- }
-
- public void testCall() throws Exception
- {
- try
- {
- Dispatch dispatch = service.createDispatch(new QName("http://ws.jboss.org", "AddNumbersPort"), SOAPMessage.class ,
- Service.Mode.MESSAGE);
- SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null,
- new ByteArrayInputStream(requestMessage.getBytes()));
- BindingProvider bp = (BindingProvider)dispatch;
- java.util.Map<String, Object> requestContext = bp.getRequestContext();
- requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, "mismatchAction");
- dispatch.invoke(reqMsg);
- fail("Should throw SOAPFaultExceptoin");
- }
- catch (SOAPFaultException e)
- {
- assertEquals(true, e.getFault().getFaultCode().indexOf("ActionMismatch") > -1);
- }
- }
-}
\ No newline at end of file
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import java.io.ByteArrayInputStream;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * JBWS2978TestCase.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBWS2978TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2978";
+
+ private final String requestMessage = "<S:Envelope xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'><S:Header><To xmlns='http://www.w3.org/2005/08/addressing'>"
+ + TARGET_ENDPOINT_ADDRESS
+ + "</To><Action xmlns='http://www.w3.org/2005/08/addressing'>inputAction</Action>"
+ + "<MessageID xmlns='http://www.w3.org/2005/08/addressing'>uuid:56d586f8-980c-48cf-982d-77a2f56e5c5b</MessageID>"
+ + "<ReplyTo xmlns='http://www.w3.org/2005/08/addressing'><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo>"
+ + "</S:Header><S:Body><ns1:addNumbers xmlns:ns1='http://ws.jboss.org'><arg0>10</arg0><arg1>10</arg1></ns1:addNumbers></S:Body></S:Envelope>";
+
+ public Service service = null;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2978TestCase.class, "jaxws-jbws2978.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org", "AddNumbers");
+ service = Service.create(wsdlURL, serviceName);
+ }
+
+ public void testCall() throws Exception
+ {
+ try
+ {
+ Dispatch dispatch = service.createDispatch(new QName("http://ws.jboss.org", "AddNumbersPort"), SOAPMessage.class ,
+ Service.Mode.MESSAGE);
+ SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null,
+ new ByteArrayInputStream(requestMessage.getBytes()));
+ BindingProvider bp = (BindingProvider)dispatch;
+ java.util.Map<String, Object> requestContext = bp.getRequestContext();
+ requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, "mismatchAction");
+ dispatch.invoke(reqMsg);
+ fail("Should throw SOAPFaultExceptoin");
+ }
+ catch (SOAPFaultException e)
+ {
+ assertEquals(true, e.getFault().getFaultCode().indexOf("ActionMismatch") > -1);
+ }
+ }
+}
\ No newline at end of file
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978 (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978)
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF)
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
- <context-root>/jaxws-jbws2978</context-root>
-</jboss-web>
\ No newline at end of file
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2978</context-root>
+</jboss-web>
\ No newline at end of file
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml 2010-03-30 06:51:46 UTC (rev 11881)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml 2010-03-30 08:31:07 UTC (rev 11882)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" 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">
-
- <servlet>
- <servlet-name>Endpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws2978.AddNumbersImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Endpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
\ No newline at end of file
Copied: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml (from rev 11881, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml)
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml 2010-03-30 08:31:07 UTC (rev 11882)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" 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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2978.AddNumbersImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
14 years, 6 months
JBossWS SVN: r11881 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/extensions/addressing/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-30 02:51:46 -0400 (Tue, 30 Mar 2010)
New Revision: 11881
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBPAPP-4027]:check mismatch between soap action and wsa action
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-29 06:01:11 UTC (rev 11880)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -191,16 +191,15 @@
// R2745 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
// with a quoted empty string value, if in the corresponding WSDL description,
// the soapAction attribute of soapbind:operation is either not present, or
- // present with an empty string as its value.
- String soapAction = null;
+ // present with an empty string as its value.
Map<String, Object> reqContext = getRequestContext();
- Boolean useSOAPAction = (Boolean)reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
- if (Boolean.TRUE.equals(useSOAPAction))
+ String soapAction = (String) reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);;
+ Boolean useSOAPAction = (Boolean) reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
+ if (Boolean.TRUE.equals(useSOAPAction) && soapAction == null)
{
- soapAction = (String)reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);
- if (soapAction == null)
throw new IllegalStateException("Cannot obtain: " + BindingProvider.SOAPACTION_URI_PROPERTY);
}
+
MimeHeaders mimeHeaders = reqMsg.getMimeHeaders();
mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction : "");
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-03-29 06:01:11 UTC (rev 11880)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -149,7 +149,12 @@
try
{
if (SOAPMessage.class.isAssignableFrom(type))
- {
+ {
+ //Throw Exception if this is soap fault message
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
+ SOAPFault soapFault = soapBody.getFault();
+ if (soapFault != null)
+ throw new SOAPFaultException(soapFault);
retObj = resMsg;
}
else if (Source.class.isAssignableFrom(type))
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-29 06:01:11 UTC (rev 11880)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -23,6 +23,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -31,8 +32,13 @@
import org.w3c.dom.Element;
import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.FaultAction;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
@@ -41,6 +47,7 @@
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.SOAPFaultException;
import java.net.URISyntaxException;
import java.util.Collections;
@@ -106,6 +113,35 @@
msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
msgContext.put(MessageContext.REFERENCE_PARAMETERS, convertToElementList(addrProps.getReferenceParameters().getElements()));
msgContext.setScope(MessageContext.REFERENCE_PARAMETERS, Scope.APPLICATION);
+
+ //check if soap action matches wsa action
+ String[] soapActions = commonMsgContext.getMessageAbstraction().getMimeHeaders().getHeader("SOAPAction");
+ if (soapActions != null && soapActions.length > 0)
+ {
+ String soapAction = soapActions[0];
+ if (!soapAction.equals("\"\"") && addrProps.getAction() != null)
+ {
+ String wsaAction = addrProps.getAction().getURI().toString();
+ // R1109 The value of the SOAPAction HTTP header field in a HTTP request MESSAGE MUST be a quoted string.
+ if (!soapAction.equals(wsaAction) && !soapAction.equals("\"" + wsaAction + "\""))
+ {
+ try
+ {
+ SOAPFault fault = new SOAPFaultImpl();
+ fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ActionMismatch"));
+ fault.setFaultString("Mismatch between soap action:" + soapAction + " and wsa action:\""
+ + addrProps.getAction().getURI() + "\"");
+ Detail detail = fault.addDetail();
+ detail.addDetailEntry(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ProblemAction"));
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+ }
+ }
return true;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-29 06:01:11 UTC (rev 11880)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-30 06:51:46 UTC (rev 11881)
@@ -636,6 +636,19 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2978 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2978.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2978/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbers.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2978/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbers.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.WebResult;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "AddNumbers", targetNamespace = "http://ws.jboss.org")
+public interface AddNumbers {
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbersRequest", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersRequest")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2978.AddNumbersResponse")
+ public int addNumbersFault1(
+ @WebParam(name = "arg0", targetNamespace = "")
+ int arg0,
+ @WebParam(name = "arg1", targetNamespace = "")
+ int arg1);
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersImpl.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.addressing.Action;
+import javax.xml.ws.soap.Addressing;
+@WebService(name = "AddNumbers", portName = "AddNumbersPort", serviceName = "AddNumbers", targetNamespace = "http://ws.jboss.org")
+@Addressing(enabled = true, required = true)
+public class AddNumbersImpl
+{
+
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers2(@WebParam(name = "number1") int number1, @WebParam(name = "number2") int number2)
+ {
+ return number1 + number2;
+ }
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersRequest.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersRequest", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class AddNumbersRequest {
+
+ protected int arg0;
+ protected int arg1;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the arg1 property.
+ *
+ */
+ public int getArg1() {
+ return arg1;
+ }
+
+ /**
+ * Sets the value of the arg1 property.
+ *
+ */
+ public void setArg1(int value) {
+ this.arg1 = value;
+ }
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/AddNumbersResponse.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersResponse", propOrder = {
+ "_return"
+})
+public class AddNumbersResponse {
+
+ @XmlElement(name = "return")
+ protected int _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public int getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(int value) {
+ this._return = value;
+ }
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2978;
+
+import java.io.ByteArrayInputStream;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * JBWS2978TestCase.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBWS2978TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2978";
+
+ private final String requestMessage = "<S:Envelope xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'><S:Header><To xmlns='http://www.w3.org/2005/08/addressing'>"
+ + TARGET_ENDPOINT_ADDRESS
+ + "</To><Action xmlns='http://www.w3.org/2005/08/addressing'>inputAction</Action>"
+ + "<MessageID xmlns='http://www.w3.org/2005/08/addressing'>uuid:56d586f8-980c-48cf-982d-77a2f56e5c5b</MessageID>"
+ + "<ReplyTo xmlns='http://www.w3.org/2005/08/addressing'><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo>"
+ + "</S:Header><S:Body><ns1:addNumbers xmlns:ns1='http://ws.jboss.org'><arg0>10</arg0><arg1>10</arg1></ns1:addNumbers></S:Body></S:Envelope>";
+
+ public Service service = null;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2978TestCase.class, "jaxws-jbws2978.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org", "AddNumbers");
+ service = Service.create(wsdlURL, serviceName);
+ }
+
+ public void testCall() throws Exception
+ {
+ try
+ {
+ Dispatch dispatch = service.createDispatch(new QName("http://ws.jboss.org", "AddNumbersPort"), SOAPMessage.class ,
+ Service.Mode.MESSAGE);
+ SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null,
+ new ByteArrayInputStream(requestMessage.getBytes()));
+ BindingProvider bp = (BindingProvider)dispatch;
+ java.util.Map<String, Object> requestContext = bp.getRequestContext();
+ requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, "mismatchAction");
+ dispatch.invoke(reqMsg);
+ fail("Should throw SOAPFaultExceptoin");
+ }
+ catch (SOAPFaultException e)
+ {
+ assertEquals(true, e.getFault().getFaultCode().indexOf("ActionMismatch") > -1);
+ }
+ }
+}
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/jboss-web.xml 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2978</context-root>
+</jboss-web>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2978/WEB-INF/web.xml 2010-03-30 06:51:46 UTC (rev 11881)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" 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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2978.AddNumbersImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
14 years, 6 months
JBossWS SVN: r11880 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/extensions/addressing/jaxws and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-29 02:01:11 -0400 (Mon, 29 Mar 2010)
New Revision: 11880
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbers.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1Response.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/JBWS2977TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBPAPP-4026]:repsect the fault value in @Action
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-28 13:51:26 UTC (rev 11879)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -280,6 +280,7 @@
CommonBinding binding = bindingProvider.getCommonBinding();
try
{
+ MessageContextAssociation.peekMessageContext().put("Exception", ex);
binding.bindFaultMessage(ex);
// call the fault handler chain
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-28 13:51:26 UTC (rev 11879)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -32,6 +32,7 @@
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.FaultAction;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
@@ -171,7 +172,7 @@
AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
if (addrExt != null)
{
- outProps.setAction(ADDR_BUILDER.newURI(addrExt.getOutboundAction()));
+ outProps.setAction(ADDR_BUILDER.newURI(addrExt.getOutboundAction()));
}
else
{
@@ -179,9 +180,25 @@
}
}
- else if (isFault)
+ else if (isFault)
{
- outProps.setAction(ADDR_BUILDER.newURI(ADDR_CONSTANTS.getDefaultFaultAction()));
+ AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
+ if (addrExt != null && msgContext.get("Exception") != null
+ && addrExt.getFaultActions() != null && addrExt.getFaultActions().length > 0)
+ {
+ Exception ex = (Exception)msgContext.get("Exception");
+ for(FaultAction faultAction : addrExt.getFaultActions())
+ {
+ if (faultAction.className().getName().equals(ex.getClass().getName()))
+ {
+ outProps.setAction(ADDR_BUILDER.newURI(faultAction.value()));
+ break;
+ }
+ }
+ }
+ if (outProps.getAction() == null) {
+ outProps.setAction(ADDR_BUILDER.newURI(ADDR_CONSTANTS.getDefaultFaultAction()));
+ }
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java 2010-03-28 13:51:26 UTC (rev 11879)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.extensions.addressing.metadata;
+import javax.xml.ws.FaultAction;
+
import org.jboss.ws.metadata.umdm.MetaDataExtension;
/**
@@ -35,6 +37,7 @@
{
private String inboundAction;
private String outboundAction;
+ private FaultAction[] faultActions;
public AddressingOpMetaExt(String extensionNameSpace)
{
@@ -60,5 +63,13 @@
{
this.outboundAction = outboundAction;
}
+
+ public void setFaultActions(FaultAction[] faultActions) {
+ this.faultActions = faultActions;
+ }
+
+ public FaultAction[] getFaultActions() {
+ return this.faultActions;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-03-28 13:51:26 UTC (rev 11879)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -545,6 +545,7 @@
{
addrExt.setInboundAction(anAction.input());
addrExt.setOutboundAction(anAction.output());
+ addrExt.setFaultActions(anAction.fault());
}
else
// default action values
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-28 13:51:26 UTC (rev 11879)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-29 06:01:11 UTC (rev 11880)
@@ -624,7 +624,19 @@
<webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF">
<include name="jboss-web.xml"/>
</webinf>
- </war>
+ </war>
+
+ <!-- jaxws-jbws2977 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2977.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2977/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2977/AddNumbersImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2977/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbers.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbers.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbers.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.WebResult;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "AddNumbers", targetNamespace = "http://ws.jboss.org")
+public interface AddNumbers {
+
+
+ /**
+ *
+ * @param arg1
+ * @param arg0
+ * @return
+ * returns int
+ * @throws AddNumbersException_Exception
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbersFault1", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2977.AddNumbersFault1")
+ @ResponseWrapper(localName = "addNumbersFault1Response", targetNamespace = "http://ws.jboss.org", className = "org.jboss.test.ws.jaxws.jbws2977.AddNumbersFault1Response")
+ public int addNumbersFault1(
+ @WebParam(name = "arg0", targetNamespace = "")
+ int arg0,
+ @WebParam(name = "arg1", targetNamespace = "")
+ int arg1)
+ throws AddNumbersException;
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class AddNumbersException extends Exception
+{
+ String detail;
+
+ public AddNumbersException(String message, String detail)
+ {
+ super(message);
+ this.detail = detail;
+ }
+
+ public String getDetail()
+ {
+ return detail;
+ }
+}
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersException.java
___________________________________________________________________
Name: svn:executable
+ *
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addNumbersFault1 complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="addNumbersFault1">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="arg1" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersFault1", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class AddNumbersFault1 {
+
+ protected int arg0;
+ protected int arg1;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ */
+ public int getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ */
+ public void setArg0(int value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the arg1 property.
+ *
+ */
+ public int getArg1() {
+ return arg1;
+ }
+
+ /**
+ * Sets the value of the arg1 property.
+ *
+ */
+ public void setArg1(int value) {
+ this.arg1 = value;
+ }
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1Response.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1Response.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersFault1Response.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,75 @@
+
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addNumbersFault1Response complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="addNumbersFault1Response">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersFault1Response", propOrder = {
+ "_return"
+})
+public class AddNumbersFault1Response {
+
+ @XmlElement(name = "return")
+ protected int _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public int getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(int value) {
+ this._return = value;
+ }
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/AddNumbersImpl.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.Action;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.FaultAction;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.SOAPBinding;
+
+/**
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+@WebService(name = "AddNumbers", portName = "AddNumbersPort", targetNamespace = "http://ws.jboss.org", serviceName = "AddNumbers")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = true, required = false)
+public class AddNumbersImpl
+{
+ @Resource
+ WebServiceContext wsc;
+
+ @Action(input = "inputAction", output = "outputAction", fault =
+ {@FaultAction(className = AddNumbersException.class, value = "http://faultAction")})
+ public int addNumbersFault1(int number1, int number2) throws AddNumbersException
+ {
+ throw new AddNumbersException("AddNumbersTestException", "testFault");
+ }
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/JBWS2977TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/JBWS2977TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2977/JBWS2977TestCase.java 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2977;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import junit.framework.Test;
+
+import org.jboss.ws.WSException;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * A JBWS2977TestCase.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBWS2977TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2977";
+
+ public String actionURL = null;
+
+ private static AddNumbers port;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2977TestCase.class, "jaxws-jbws2977.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org", "AddNumbers");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(AddNumbers.class);
+ }
+
+ public void testCall()
+ {
+ List<Handler> handlers = new ArrayList<Handler>();
+ handlers.add(new ClientSOAPHandler());
+ ((BindingProvider) port).getBinding().setHandlerChain(handlers);
+ try
+ {
+ port.addNumbersFault1(1, 0);
+ }
+ catch (AddNumbersException e)
+ {
+ // do nothing
+ }
+
+ assertEquals("http://faultAction", actionURL);
+ }
+
+ class ClientSOAPHandler extends GenericSOAPHandler<LogicalMessageContext>
+ {
+ @Override
+ public boolean handleFault(MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessageContext smc = (SOAPMessageContext) msgContext;
+ SOAPMessage message = smc.getMessage();
+ Iterator iterator = message.getSOAPHeader().getChildElements(
+ new QName("http://www.w3.org/2005/08/addressing", "Action"));
+ if (iterator.hasNext())
+ {
+ SOAPElement element = (SOAPElement) iterator.next();
+ actionURL = element.getValue();
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Error in Handler", e);
+ }
+ return true;
+ }
+ }
+
+}
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/jboss-web.xml 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2977</context-root>
+</jboss-web>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2977/WEB-INF/web.xml 2010-03-29 06:01:11 UTC (rev 11880)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" 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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2977.AddNumbersImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
14 years, 6 months
JBossWS SVN: r11879 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws: jbws2976 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-28 09:51:26 -0400 (Sun, 28 Mar 2010)
New Revision: 11879
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java
Log:
[JBWS-2976]:Add test case
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976 (from rev 11877, framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976)
Deleted: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java 2010-03-28 12:58:09 UTC (rev 11877)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java 2010-03-28 13:51:26 UTC (rev 11879)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.http.HTTPBinding;
-
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JAXWS2976TestCase extends junit.framework.TestCase
-{
- public void testAddingIncomptiableHandler() throws Exception
- {
- try
- {
- Dispatch<Source> source = createDispatchSource();
- List<Handler> handlers = new ArrayList<Handler>();
- handlers.add(new SOAPHandler());
- source.getBinding().setHandlerChain(handlers);
- fail("WebServiceException is not thrown");
- }
- catch (WebServiceException e)
- {
- assertEquals("The adding handler incompatibale WebServiceExceptoin is not thrown ", true, e.getMessage()
- .indexOf("The adding handler in HTTPBinding is incompatiable") > -1);
- }
- }
-
- private Dispatch<Source> createDispatchSource() throws Exception
- {
- javax.xml.ws.Service service = javax.xml.ws.Service.create(new QName("http://ws.jboss.org", "HelloService"));
- service.addPort(new QName("http://ws.jboss.org", "HelloPort"), HTTPBinding.HTTP_BINDING,
- "http://ws.jboss.org/endpointAddress");
- return service.createDispatch(new QName("http://ws.jboss.org", "HelloPort"), Source.class,
- javax.xml.ws.Service.Mode.PAYLOAD);
- }
-}
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java (from rev 11877, framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java)
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java 2010-03-28 13:51:26 UTC (rev 11879)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.http.HTTPBinding;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JAXWS2976TestCase extends junit.framework.TestCase
+{
+ public void testAddingIncomptiableHandler() throws Exception
+ {
+ try
+ {
+ Dispatch<Source> source = createDispatchSource();
+ List<Handler> handlers = new ArrayList<Handler>();
+ handlers.add(new SOAPHandler());
+ source.getBinding().setHandlerChain(handlers);
+ fail("WebServiceException is not thrown");
+ }
+ catch (WebServiceException e)
+ {
+ assertEquals("The adding handler incompatibale WebServiceExceptoin is not thrown ", true, e.getMessage()
+ .indexOf("The adding handler in HTTPBinding is incompatiable") > -1);
+ }
+ }
+
+ private Dispatch<Source> createDispatchSource() throws Exception
+ {
+ javax.xml.ws.Service service = javax.xml.ws.Service.create(new QName("http://ws.jboss.org", "HelloService"));
+ service.addPort(new QName("http://ws.jboss.org", "HelloPort"), HTTPBinding.HTTP_BINDING,
+ "http://ws.jboss.org/endpointAddress");
+ return service.createDispatch(new QName("http://ws.jboss.org", "HelloPort"), Source.class,
+ javax.xml.ws.Service.Mode.PAYLOAD);
+ }
+}
Deleted: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java 2010-03-28 12:58:09 UTC (rev 11877)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java 2010-03-28 13:51:26 UTC (rev 11879)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
-
-import javax.xml.ws.handler.LogicalMessageContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.common.handler.GenericSOAPHandler;
-
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class SOAPHandler extends GenericSOAPHandler<LogicalMessageContext>
-{
- @Override
- protected boolean handleInbound(final MessageContext msgContext)
- {
- //do nothing
- return true;
- }
-}
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java (from rev 11877, framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java)
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java 2010-03-28 13:51:26 UTC (rev 11879)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
+
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class SOAPHandler extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ //do nothing
+ return true;
+ }
+}
14 years, 6 months
JBossWS SVN: r11878 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-28 09:50:52 -0400 (Sun, 28 Mar 2010)
New Revision: 11878
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
Log:
[JBWS-2976]:throw WebserviceException when add the incompatiable handler
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28 12:58:09 UTC (rev 11877)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28 13:50:52 UTC (rev 11878)
@@ -26,7 +26,9 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalHandler;
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
@@ -141,6 +143,13 @@
public void setHandlerChain(List<Handler> handlerChain)
{
+ for (Handler handler : handlerChain)
+ {
+ if (!(handler instanceof LogicalHandler))
+ {
+ throw new WebServiceException("The adding handler in HTTPBinding is incompatiable " + handler.getClass());
+ }
+ }
delegate.setHandlerChain(handlerChain);
}
14 years, 6 months
JBossWS SVN: r11877 - in framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws: jbws2976 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-28 08:58:09 -0400 (Sun, 28 Mar 2010)
New Revision: 11877
Added:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java
Log:
[JBPAPP-4025]:Adding test
Added: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java (rev 0)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java 2010-03-28 12:58:09 UTC (rev 11877)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.http.HTTPBinding;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JAXWS2976TestCase extends junit.framework.TestCase
+{
+ public void testAddingIncomptiableHandler() throws Exception
+ {
+ try
+ {
+ Dispatch<Source> source = createDispatchSource();
+ List<Handler> handlers = new ArrayList<Handler>();
+ handlers.add(new SOAPHandler());
+ source.getBinding().setHandlerChain(handlers);
+ fail("WebServiceException is not thrown");
+ }
+ catch (WebServiceException e)
+ {
+ assertEquals("The adding handler incompatibale WebServiceExceptoin is not thrown ", true, e.getMessage()
+ .indexOf("The adding handler in HTTPBinding is incompatiable") > -1);
+ }
+ }
+
+ private Dispatch<Source> createDispatchSource() throws Exception
+ {
+ javax.xml.ws.Service service = javax.xml.ws.Service.create(new QName("http://ws.jboss.org", "HelloService"));
+ service.addPort(new QName("http://ws.jboss.org", "HelloPort"), HTTPBinding.HTTP_BINDING,
+ "http://ws.jboss.org/endpointAddress");
+ return service.createDispatch(new QName("http://ws.jboss.org", "HelloPort"), Source.class,
+ javax.xml.ws.Service.Mode.PAYLOAD);
+ }
+}
Added: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java (rev 0)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2976/SOAPHandler.java 2010-03-28 12:58:09 UTC (rev 11877)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2976;
+
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+
+/**
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class SOAPHandler extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ //do nothing
+ return true;
+ }
+}
14 years, 6 months
JBossWS SVN: r11876 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-28 08:55:20 -0400 (Sun, 28 Mar 2010)
New Revision: 11876
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
Log:
[JBWS-2976]:throw WebserviceException when add incompatiable handler
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28 10:26:00 UTC (rev 11875)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28 12:55:20 UTC (rev 11876)
@@ -26,7 +26,9 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalHandler;
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
@@ -139,6 +141,13 @@
public void setHandlerChain(List<Handler> handlerChain)
{
+ for (Handler handler : handlerChain)
+ {
+ if (!(handler instanceof LogicalHandler))
+ {
+ throw new WebServiceException("The adding handler in HTTPBinding is incompatiable " + handler.getClass());
+ }
+ }
delegate.setHandlerChain(handlerChain);
}
14 years, 6 months
JBossWS SVN: r11875 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-28 06:26:00 -0400 (Sun, 28 Mar 2010)
New Revision: 11875
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
Log:
[JBPAPP-4024]:Minor change ,added the missing line
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2010-03-28 09:00:37 UTC (rev 11874)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2010-03-28 10:26:00 UTC (rev 11875)
@@ -125,6 +125,7 @@
bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
}
context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
+ cache.add(types, context);
}
return context;
}
14 years, 6 months