JBossWS SVN: r12252 - stack/native/branches/jbossws-native-3.1.2/modules/management/src/main/webapp.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-17 12:07:24 -0400 (Mon, 17 May 2010)
New Revision: 12252
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/management/src/main/webapp/index.html
Log:
[JBPAPP-4328] Fixing quote
Modified: stack/native/branches/jbossws-native-3.1.2/modules/management/src/main/webapp/index.html
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/management/src/main/webapp/index.html 2010-05-17 16:06:31 UTC (rev 12251)
+++ stack/native/branches/jbossws-native-3.1.2/modules/management/src/main/webapp/index.html 2010-05-17 16:07:24 UTC (rev 12252)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
14 years, 7 months
JBossWS SVN: r12251 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/management/src/main/webapp.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-17 12:06:31 -0400 (Mon, 17 May 2010)
New Revision: 12251
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/management/src/main/webapp/index.html
Log:
[JBPAPP-4328] Fixing quote
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/management/src/main/webapp/index.html
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/management/src/main/webapp/index.html 2010-05-17 16:03:38 UTC (rev 12250)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/management/src/main/webapp/index.html 2010-05-17 16:06:31 UTC (rev 12251)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
14 years, 7 months
JBossWS SVN: r12250 - in stack/metro/trunk/modules/management/src/main: webapp and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-17 12:03:38 -0400 (Mon, 17 May 2010)
New Revision: 12250
Modified:
stack/metro/trunk/modules/management/src/main/pclwebapp/index.html
stack/metro/trunk/modules/management/src/main/webapp/index.html
Log:
[JBWS-3029] Fixing quote
Modified: stack/metro/trunk/modules/management/src/main/pclwebapp/index.html
===================================================================
--- stack/metro/trunk/modules/management/src/main/pclwebapp/index.html 2010-05-17 16:02:39 UTC (rev 12249)
+++ stack/metro/trunk/modules/management/src/main/pclwebapp/index.html 2010-05-17 16:03:38 UTC (rev 12250)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
Modified: stack/metro/trunk/modules/management/src/main/webapp/index.html
===================================================================
--- stack/metro/trunk/modules/management/src/main/webapp/index.html 2010-05-17 16:02:39 UTC (rev 12249)
+++ stack/metro/trunk/modules/management/src/main/webapp/index.html 2010-05-17 16:03:38 UTC (rev 12250)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
14 years, 7 months
JBossWS SVN: r12249 - in stack/cxf/trunk/modules/management/src/main: webapp and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-17 12:02:39 -0400 (Mon, 17 May 2010)
New Revision: 12249
Modified:
stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html
stack/cxf/trunk/modules/management/src/main/webapp/index.html
Log:
[JBWS-3029] Fixing quote
Modified: stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html
===================================================================
--- stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html 2010-05-17 16:01:37 UTC (rev 12248)
+++ stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html 2010-05-17 16:02:39 UTC (rev 12249)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
Modified: stack/cxf/trunk/modules/management/src/main/webapp/index.html
===================================================================
--- stack/cxf/trunk/modules/management/src/main/webapp/index.html 2010-05-17 16:01:37 UTC (rev 12248)
+++ stack/cxf/trunk/modules/management/src/main/webapp/index.html 2010-05-17 16:02:39 UTC (rev 12249)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
14 years, 7 months
JBossWS SVN: r12248 - stack/native/trunk/modules/management/src/main/webapp.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-17 12:01:37 -0400 (Mon, 17 May 2010)
New Revision: 12248
Modified:
stack/native/trunk/modules/management/src/main/webapp/index.html
Log:
[JBWS-3029] Fixing quote
Modified: stack/native/trunk/modules/management/src/main/webapp/index.html
===================================================================
--- stack/native/trunk/modules/management/src/main/webapp/index.html 2010-05-17 14:37:28 UTC (rev 12247)
+++ stack/native/trunk/modules/management/src/main/webapp/index.html 2010-05-17 16:01:37 UTC (rev 12248)
@@ -1,5 +1,5 @@
<html><head>
-<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>JBossWS (@implementation.version@)</title>
<link rel='stylesheet' href='./styles.css'>
</head>
14 years, 7 months
JBossWS SVN: r12247 - stack/native/branches/jbossws-native-3.1.2.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-05-17 10:37:28 -0400 (Mon, 17 May 2010)
New Revision: 12247
Modified:
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
[JBPAPP-4237] Additional '=' sign added to POST header for JAX-WS request - upgrade JBoss Remoting.
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2010-05-17 14:11:27 UTC (rev 12246)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2010-05-17 14:37:28 UTC (rev 12247)
@@ -63,7 +63,7 @@
<jaxb.impl.version>2.1.9.patch02</jaxb.impl.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jboss.jaxbintros.version>1.0.0.GA</jboss.jaxbintros.version>
- <jboss.remoting.version>2.5.2</jboss.remoting.version>
+ <jboss.remoting.version>2.5.2.SP3</jboss.remoting.version>
<jboss.logging.version>2.1.0.GA</jboss.logging.version>
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
14 years, 7 months
JBossWS SVN: r12246 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/core/jaxws/handler and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-17 10:11:27 -0400 (Mon, 17 May 2010)
New Revision: 12246
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/DetailedAddressingException.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
Log:
[JBWS-3027] throwing runtime exceptions in Addressing handler plus ensuring proper handler flow, see JIRA
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-05-17 14:07:12 UTC (rev 12245)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-05-17 14:11:27 UTC (rev 12246)
@@ -38,6 +38,7 @@
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.addressing.AddressingException;
import javax.xml.ws.addressing.MapRequiredException;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
@@ -57,12 +58,14 @@
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.XMLFragment;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import com.ibm.wsdl.extensions.soap12.SOAP12Constants;
@@ -270,6 +273,28 @@
MapRequiredException addrException = (MapRequiredException)ex;
soapFault = soapBody.addFault(addrException.getSubcode(), addrException.getMessage());
}
+ else if (ex instanceof AddressingException)
+ {
+ try
+ {
+ AddressingException addrException = (AddressingException) ex;
+ SOAPFault fault = new SOAPFaultImpl();
+ fault.setFaultCode(addrException.getCode());
+ fault.setFaultString(addrException.getReason());
+ Detail detail = fault.addDetail();
+ Object detailElement = addrException.getDetail();
+ if (detailElement instanceof Node)
+ {
+ detail.appendChild((Node)detailElement);
+ }
+
+ return toSOAPMessage(new SOAPFaultException(fault));
+ }
+ catch (SOAPException e)
+ {
+ log.warn(e);
+ }
+ }
else
{
soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2010-05-17 14:07:12 UTC (rev 12245)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2010-05-17 14:11:27 UTC (rev 12246)
@@ -27,6 +27,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
+import javax.xml.ws.ProtocolException;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.LogicalHandler;
@@ -154,9 +155,24 @@
index = getNextIndex(index);
}
}
+ catch (ProtocolException pe)
+ {
+ // JAX-WS 2.2 specification
+ // 9.3.2.1 handleMessage chapter
+ // Throw ProtocolException or a subclass paragraph
+ doNext = false;
+ processHandlerFailure(pe);
+ }
catch (RuntimeException ex)
{
+ // JAX-WS 2.2 specification
+ // 9.3.2.1 handleMessage chapter
+ // Throw any other runtime exception paragraph
doNext = false;
+ if (serverSide && !isOutbound)
+ {
+ index = index -1;
+ }
processHandlerFailure(ex);
}
finally
@@ -164,7 +180,7 @@
// we start at this index in the response chain
if (doNext == false)
falseIndex = index;
-
+
if (debugEnabled)
log.debug("Exit: handle" + (isOutbound ? "Out" : "In ") + "BoundMessage with status: " + doNext);
}
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/DetailedAddressingException.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/DetailedAddressingException.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/DetailedAddressingException.java 2010-05-17 14:11:27 UTC (rev 12246)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.ws.extensions.addressing;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingException;
+
+/**
+ * Addressing exception that allows better addressing details setup.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class DetailedAddressingException extends AddressingException
+{
+
+ private static final long serialVersionUID = 1L;
+
+ public DetailedAddressingException(final QName code, final String reason, final Object detail)
+ {
+ super();
+
+ this.setInternals(code, reason, detail);
+ }
+
+ public DetailedAddressingException(final String message, final Throwable cause, final QName code, final String reason, final Object detail)
+ {
+ super(message, cause);
+
+ this.setInternals(code, reason, detail);
+ }
+
+ public DetailedAddressingException(final String message, final QName code, final String reason, final Object detail)
+ {
+ super(message);
+
+ this.setInternals(code, reason, detail);
+ }
+
+ public DetailedAddressingException(final Throwable cause, final QName code, final String reason, final Object detail)
+ {
+ super(cause);
+
+ this.setInternals(code, reason, detail);
+ }
+
+ private void setInternals(final QName code, final String reason, final Object detail)
+ {
+ if (code == null)
+ throw new IllegalArgumentException("code must be specified");
+ if (reason == null)
+ throw new IllegalArgumentException("reason must be specified");
+ if (detail == null)
+ throw new IllegalArgumentException("detail must be specified");
+
+ this.code = code;
+ this.reason = reason;
+ this.detail = detail;
+ }
+
+}
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-05-17 14:07:12 UTC (rev 12245)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-05-17 14:11:27 UTC (rev 12246)
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.extensions.addressing.jaxws;
-import java.lang.annotation.Annotation;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashSet;
@@ -30,10 +29,7 @@
import java.util.Set;
import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingBuilder;
@@ -45,14 +41,13 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
+import org.jboss.util.xml.DOMUtils;
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.DetailedAddressingException;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -60,6 +55,7 @@
import org.jboss.wsf.common.addressing.AddressingConstants;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
* A server side handler that reads/writes the addressing properties
@@ -117,6 +113,7 @@
}
addrProps.readHeaders(soapMessage);
+
if (addrProps.getAction() != null)
{
msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, addrProps);
@@ -136,24 +133,20 @@
// 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);
- }
+ final QName code = new QName(ADDR_CONSTANTS.getNamespaceURI(), "ActionMismatch");
+ final String reason = "Mismatch between soap action:" + soapAction + " and wsa action:\""
+ + addrProps.getAction().getURI() + "\"";
+ final Node detail = DOMUtils.createElement(new QName(ADDR_CONSTANTS.getNamespaceURI(),
+ "ProblemAction"));
+
+ throw new DetailedAddressingException(code, reason, detail);
}
}
}
}
+
+ this.ensureAnonymousPolicy(addrProps, msgContext);
+
return true;
}
@@ -236,8 +229,6 @@
}
outProps.writeHeaders(soapMessage);
-
- this.ensureAnonymousPolicy(inProps, msgContext);
}
private AttributedURI newURI(final String uri) // TODO: client addressing handler have the same method - refactor it to some helper class
@@ -262,34 +253,41 @@
private AddressingOpMetaExt getAddressingMetaData(final MessageContext msgContext)
{
OperationMetaData operationMD = this.getOperationMetaData(msgContext);
+ AddressingOpMetaExt addressingMD = null;
- AddressingOpMetaExt addressingMD = (AddressingOpMetaExt) operationMD.getExtension(ADDR_CONSTANTS
- .getNamespaceURI());
+ if (operationMD != null)
+ {
+ addressingMD = (AddressingOpMetaExt) operationMD.getExtension(ADDR_CONSTANTS.getNamespaceURI());
- if (addressingMD == null)
- throw new IllegalStateException("Addressing meta data not available");
+ if (addressingMD == null)
+ throw new IllegalStateException("Addressing meta data not available");
+ }
return addressingMD;
}
-
+
private void ensureAnonymousPolicy(final SOAPAddressingProperties inProps, final MessageContext msgContext)
{
- final AddressingFeature addressing = this.getOperationMetaData(msgContext).getEndpointMetaData().getFeature(AddressingFeature.class);
- final boolean isOnlyAnonymousEnabled = addressing != null && addressing.getResponses() == AddressingFeature.Responses.ANONYMOUS;
- final boolean isOnlyNonAnonymousEnabled = addressing != null && addressing.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS;
+ final CommonMessageContext commonCtx = (CommonMessageContext) msgContext;
+ final AddressingFeature addressing = commonCtx.getEndpointMetaData().getFeature(AddressingFeature.class);
+ final boolean isOnlyAnonymousEnabled = addressing != null
+ && addressing.getResponses() == AddressingFeature.Responses.ANONYMOUS;
+ final boolean isOnlyNonAnonymousEnabled = addressing != null
+ && addressing.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS;
final boolean isReplyToAnonymous = this.isAnonymous(inProps.getReplyTo());
final boolean isFaultToAnonymous = this.isAnonymous(inProps.getFaultTo());
-
+
if ((isOnlyAnonymousEnabled) && (!isReplyToAnonymous || !isFaultToAnonymous))
{
try
{
- this.addRelatesTo(inProps, msgContext);
- SOAPFault fault = new SOAPFaultImpl();
- fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyAnonymousAddressSupported"));
- fault.setFaultString("A header representing a Message Addressing Property is not valid and the message cannot be processed");
- this.addFaultDetail(fault, !isReplyToAnonymous ? AddressingConstants.Core.Elements.REPLYTO_QNAME : AddressingConstants.Core.Elements.FAULTTO_QNAME);
- throw new SOAPFaultException(fault);
+ final QName faultCode = new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyAnonymousAddressSupported");
+ final String reason = "A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ final Object detail = this.getProblemHeaderDetail(!isReplyToAnonymous
+ ? AddressingConstants.Core.Elements.REPLYTO_QNAME
+ : AddressingConstants.Core.Elements.FAULTTO_QNAME);
+
+ throw new DetailedAddressingException(faultCode, reason, detail);
}
catch (SOAPException e)
{
@@ -300,12 +298,13 @@
{
try
{
- this.addRelatesTo(inProps, msgContext);
- SOAPFault fault = new SOAPFaultImpl();
- fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyNonAnonymousAddressSupported"));
- fault.setFaultString("A header representing a Message Addressing Property is not valid and the message cannot be processed");
- this.addFaultDetail(fault, isReplyToAnonymous ? AddressingConstants.Core.Elements.REPLYTO_QNAME : AddressingConstants.Core.Elements.FAULTTO_QNAME);
- throw new SOAPFaultException(fault);
+ final QName faultCode = new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyNonAnonymousAddressSupported");
+ final String reason = "A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ final Object detail = this.getProblemHeaderDetail(isReplyToAnonymous
+ ? AddressingConstants.Core.Elements.REPLYTO_QNAME
+ : AddressingConstants.Core.Elements.FAULTTO_QNAME);
+
+ throw new DetailedAddressingException(faultCode, reason, detail);
}
catch (SOAPException e)
{
@@ -313,37 +312,30 @@
}
}
}
-
- private void addFaultDetail(final SOAPFault faultElement, final QName problemHeaderQName) throws SOAPException
+
+ private Node getProblemHeaderDetail(final QName problemHeaderQName) throws SOAPException
{
- final Detail detailElement = faultElement.addDetail();
- final SOAPElement problemHeaderQNameElement = detailElement.addChildElement(AddressingConstants.Core.Elements.PROBLEMHEADERQNAME_QNAME);
+ final Element problemHeaderQNameElement = DOMUtils
+ .createElement(AddressingConstants.Core.Elements.PROBLEMHEADERQNAME_QNAME);
problemHeaderQNameElement.setTextContent(problemHeaderQName.toString());
+
+ return problemHeaderQNameElement;
}
-
- private void addRelatesTo(final SOAPAddressingProperties inProps, final MessageContext msgContext) throws SOAPException
- {
- final String reqMessageID = inProps.getMessageID().getURI().toString();
- final SOAPMessage soapMessage = ((SOAPMessageContext) msgContext).getMessage();
- final SOAPElement relatesToElement = soapMessage.getSOAPHeader().addChildElement(AddressingConstants.Core.Elements.RELATESTO_QNAME);
-
- relatesToElement.setTextContent(reqMessageID);
- }
private boolean isAnonymous(final EndpointReference epr)
{
if ((epr != null) && (epr.getAddress() != null))
return ADDR_CONSTANTS.getAnonymousURI().equals(epr.getAddress().getURI().toString());
-
+
return true;
}
private String getFaultAction(final MessageContext msgContext)
{
- final OperationMetaData operationMD = this.getOperationMetaData(msgContext);
final AddressingOpMetaExt addressingMD = this.getAddressingMetaData(msgContext);
final Throwable exception = ((CommonMessageContext) msgContext).getCurrentException();
- final FaultMetaData faultMD = operationMD.getFaultMetaData(exception.getClass());
+ final OperationMetaData operationMD = this.getOperationMetaData(msgContext);
+ final FaultMetaData faultMD = operationMD != null ? operationMD.getFaultMetaData(exception.getClass()) : null;
if (faultMD != null)
{
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2010-05-17 14:07:12 UTC (rev 12245)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2010-05-17 14:11:27 UTC (rev 12246)
@@ -332,6 +332,7 @@
expMessages.add("PostServerHandler1:Message:InBound");
expMessages.add("ServerHandler3:Message:InBound");
expMessages.add("ServerHandler2:Message:InBound:ErrorInServerHandler2");
+ expMessages.add("ServerHandler2:Fault:OutBound");
expMessages.add("ServerHandler3:Fault:OutBound");
expMessages.add("PostServerHandler1:Fault:OutBound");
expMessages.add("PostServerHandler2:Fault:OutBound");
@@ -601,7 +602,7 @@
expMessages.add("ClientHandler1:Close");
expMessages.add("PreClientHandler2:Close");
expMessages.add("PreClientHandler1:Close");
-
+
assertEquals(expMessages.toString(), trackerMessages);
trackerMessages = trackerPort.getListMessages();
14 years, 7 months
JBossWS SVN: r12245 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-17 10:07:12 -0400 (Mon, 17 May 2010)
New Revision: 12245
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3027] excluding test for CXF
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-17 14:05:43 UTC (rev 12244)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-17 14:07:12 UTC (rev 12245)
@@ -54,6 +54,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
org/jboss/test/ws/jaxws/handlerscope/*TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-17 14:05:43 UTC (rev 12244)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-17 14:07:12 UTC (rev 12245)
@@ -54,6 +54,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
org/jboss/test/ws/jaxws/handlerscope/*TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-17 14:05:43 UTC (rev 12244)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-17 14:07:12 UTC (rev 12245)
@@ -47,6 +47,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-17 14:05:43 UTC (rev 12244)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-17 14:07:12 UTC (rev 12245)
@@ -44,6 +44,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
14 years, 7 months
JBossWS SVN: r12244 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-17 10:05:43 -0400 (Mon, 17 May 2010)
New Revision: 12244
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3027] excluding test for Metro
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-17 14:01:00 UTC (rev 12243)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-17 14:05:43 UTC (rev 12244)
@@ -71,6 +71,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-17 14:01:00 UTC (rev 12243)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-17 14:05:43 UTC (rev 12244)
@@ -71,6 +71,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-17 14:01:00 UTC (rev 12243)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-17 14:05:43 UTC (rev 12244)
@@ -65,6 +65,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-17 14:01:00 UTC (rev 12243)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-17 14:05:43 UTC (rev 12244)
@@ -65,6 +65,7 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/jbws3022/**
+org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
14 years, 7 months
JBossWS SVN: r12243 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-17 10:01:00 -0400 (Mon, 17 May 2010)
New Revision: 12243
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/ClientSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/JBWS3027TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/common/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/common/TestConstants.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2Response.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/package-info.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/AddNumbersImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/server-handler.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3027/
framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/wsdl/AddNumbersService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3027/customfile.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/JAXWS_Util.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3022/JBWS3022TestCase.java
Log:
[JBWS-3027] providing test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-17 13:09:03 UTC (rev 12242)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -949,6 +949,20 @@
</webinf>
</war>
+ <!-- jaxws-jbws3027 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3027.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3027/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3027/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3027/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/jbws3027/common/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3027/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war" webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/JAXWS_Util.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/JAXWS_Util.java 2010-05-17 13:09:03 UTC (rev 12242)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/JAXWS_Util.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -27,6 +27,7 @@
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
+import java.util.Map;
import org.jboss.logging.Logger;
import org.jboss.wsf.common.DOMUtils;
@@ -48,6 +49,8 @@
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
public final class JAXWS_Util
{
@@ -184,4 +187,24 @@
}
return msg;
}
+
+ public static void setSOAPACTIONURI(Object o, String action)
+ {
+ BindingProvider bp = (BindingProvider) o;
+ Map<String, Object> requestContext = bp.getRequestContext();
+ if (requestContext == null)
+ {
+ log.error("setSOAPACTIONURI:getRequestContext() returned null");
+ throw new IllegalStateException();
+ }
+ else
+ {
+ requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, action);
+ requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, true);
+ log.debug("SOAPACTION_USE_PROPERTY being set to: "
+ + requestContext.get(BindingProvider.SOAPACTION_USE_PROPERTY));
+ log.debug("SOAPACTION_URI_PROPERTY being set to: "
+ + requestContext.get(BindingProvider.SOAPACTION_URI_PROPERTY));
+ }
+ }
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3022/JBWS3022TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3022/JBWS3022TestCase.java 2010-05-17 13:09:03 UTC (rev 12242)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3022/JBWS3022TestCase.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -233,8 +233,8 @@
}
catch (SOAPFaultException e)
{
- assertFaultCode(e, true);
- assertProblemHeaderQName(e);
+ this.assertFaultCode(e, true);
+ this.assertProblemHeaderQName(e);
}
}
@@ -251,8 +251,8 @@
}
catch (SOAPFaultException e)
{
- assertFaultCode(e, true);
- assertProblemHeaderQName(e);
+ this.assertFaultCode(e, true);
+ this.assertProblemHeaderQName(e);
}
}
@@ -269,8 +269,8 @@
}
catch (SOAPFaultException e)
{
- assertFaultCode(e, false);
- assertProblemHeaderQName(e);
+ this.assertFaultCode(e, false);
+ this.assertProblemHeaderQName(e);
}
}
@@ -287,12 +287,12 @@
}
catch (SOAPFaultException e)
{
- assertFaultCode(e, false);
- assertProblemHeaderQName(e);
+ this.assertFaultCode(e, false);
+ this.assertProblemHeaderQName(e);
}
}
- private static void assertProblemHeaderQName(final SOAPFaultException exception) throws SOAPException
+ private void assertProblemHeaderQName(final SOAPFaultException exception) throws SOAPException
{
String faultdetail[] = WsaSOAPUtils.getFaultDetail(exception);
if (faultdetail != null)
@@ -303,7 +303,7 @@
}
}
- private static void assertFaultCode(final SOAPFaultException exception, final boolean anonymous)
+ private void assertFaultCode(final SOAPFaultException exception, final boolean anonymous)
throws SOAPException
{
final String faultCode = WsaSOAPUtils.getFaultCode(exception);
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/ClientSOAPHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/ClientSOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/ClientSOAPHandler.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,84 @@
+/*
+ * 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.jbws3027;
+
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.MessageContext.Scope;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.AddressingHeaderException;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws3027.common.TestConstants;
+
+public class ClientSOAPHandler extends WsaBaseSOAPHandler
+{
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String action)
+ {
+ if (oper.equals("addNumbers2"))
+ {
+ if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION))
+ {
+ throw new AddressingHeaderException("Expected:" + TestConstants.ADD_NUMBERS2_OUT_ACTION + ", Actual:"
+ + action);
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void processOutboundMessage(SOAPMessageContext context, String oper, String testName)
+ {
+ if (testName != null && testName.equals("actionMismatch"))
+ {
+ Map<String, List<String>> headers = (Map<String, List<String>>) context
+ .get(MessageContext.HTTP_REQUEST_HEADERS);
+ if (headers == null)
+ headers = new Hashtable<String, List<String>>();
+ List<String> values = new Vector<String>();
+ values.add("ActionNotSupported");
+ headers.put("Soapaction", values);
+ context.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
+ context.setScope(MessageContext.HTTP_REQUEST_HEADERS, Scope.APPLICATION);
+ }
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ if (testName == null)
+ return super.getAction(context);
+ else if (!testName.equals("missingActionHeader"))
+ return super.getAction(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ClientSOAPHandler";
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/JBWS3027TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/JBWS3027TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/JBWS3027TestCase.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,216 @@
+/*
+ * 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.jbws3027;
+
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.UUID;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.common.JAXWS_Util;
+import org.jboss.test.ws.jaxws.common.WsaSOAPUtils;
+import org.jboss.test.ws.jaxws.jbws3027.generated.AddNumbersPortType;
+import org.jboss.test.ws.jaxws.jbws3027.generated.AddNumbersService;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-3022] Throw RuntimeExceptions not Protocol exceptions in Addressing Handler.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class JBWS3027TestCase extends JBossWSTest
+{
+
+ private static final String actionMismatch = "<?xml version=\"1.0\" ?><S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"><S:Header><To xmlns=\"http://www.w3.org/2005/08/addressing\">{0}</To><Action xmlns=\"http://www.w3.org/2005/08/addressing\">inputAction</Action><MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">uuid:{1}</MessageID><ReplyTo xmlns=\"http://www.w3.org/2005/08/addressing\"><Address>{2}</Address></ReplyTo></S:Header><S:Body><ns1:addNumbers2 xmlns:ns1=\"http://example.com\"><number1>10</number1><number2>10</number2><testName>actionMismatch</testName></ns1:addNumbers2></S:Body></S:Envelope>";
+
+ private static final String actionNotSupported = "<?xml version=\"1.0\" ?><S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"><S:Header><To xmlns=\"http://www.w3.org/2005/08/addressing\">{0}</To><Action xmlns=\"http://www.w3.org/2005/08/addressing\">ActionNotSupported</Action><MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">uuid:{1}</MessageID><ReplyTo xmlns=\"http://www.w3.org/2005/08/addressing\"><Address>{2}</Address></ReplyTo></S:Header><S:Body><ns1:addNumbers2 xmlns:ns1=\"http://example.com\"><number1>10</number1><number2>10</number2><testName>actionNotSupported</testName></ns1:addNumbers2></S:Body></S:Envelope>";
+
+ private static final String missingActionHeader = "<?xml version=\"1.0\" ?><S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"><S:Header><To xmlns=\"http://www.w3.org/2005/08/addressing\">{0}</To><MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">uuid:{1}</MessageID><ReplyTo xmlns=\"http://www.w3.org/2005/08/addressing\"><Address>{2}</Address></ReplyTo></S:Header><S:Body><ns1:addNumbers2 xmlns:ns1=\"http://example.com\"><number1>10</number1><number2>10</number2><testName>missingActionHeader</testName></ns1:addNumbers2></S:Body></S:Envelope>";
+
+ private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature(false);
+
+ private QName PORT_QNAME = new QName("http://example.com", "AddNumbersPort");
+
+ private String endpointURL;
+
+ private URL wsdlURL;
+
+ private AddNumbersPortType port;
+
+ private AddNumbersService service;
+
+ private Dispatch<SOAPMessage> createDispatchSOAPMessage(QName port) throws Exception
+ {
+ return service.createDispatch(port, SOAPMessage.class, javax.xml.ws.Service.Mode.MESSAGE,
+ DISABLED_ADDRESSING_FEATURE);
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3027TestCase.class, "jaxws-jbws3027.war");
+ }
+
+ protected void setUp() throws Exception
+ {
+ endpointURL = "http://" + getServerHost() + ":8080/jaxws-jbws3027/Endpoint";
+ wsdlURL = new URL(endpointURL + "?wsdl");
+ service = new AddNumbersService(wsdlURL);
+ port = (AddNumbersPortType) service.getPort(PORT_QNAME, AddNumbersPortType.class);
+ }
+
+ public void testDefaultRequestResponseAction() throws Exception
+ {
+ int number = port.addNumbers2(10, 10, "testDefaultRequestResponseAction");
+ log.debug("number=" + number);
+ }
+
+ public void testExplicitRequestResponseAction() throws Exception
+ {
+ int number = port.addNumbers2(10, 10, "testExplicitRequestResponseAction");
+ log.debug("number=" + number);
+ }
+
+ public void testMessageAddressingHeaderRequiredFault() throws Exception
+ {
+ try
+ {
+ String soapMsg = MessageFormat.format(missingActionHeader, endpointURL, UUID.randomUUID(), WsaSOAPUtils
+ .getAddrVerAnonUri());
+ Dispatch<SOAPMessage> dispatchSM = createDispatchSOAPMessage(PORT_QNAME);
+ SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapMsg);
+ dispatchSM.invoke(request);
+ fail();
+ }
+ catch (SOAPFaultException e)
+ {
+ this.assertMessageAddressingHeaderRequiredFaultCode(e);
+ this.assertProblemHeaderQName(e);
+ }
+ }
+
+ public void testActionMismatchOrActionNotSupportedFaultCase1() throws Exception
+ {
+ try
+ {
+ String soapMsg = MessageFormat.format(actionMismatch, endpointURL, UUID.randomUUID(), WsaSOAPUtils
+ .getAddrVerAnonUri());
+ Dispatch<SOAPMessage> dispatchSM = createDispatchSOAPMessage(PORT_QNAME);
+ JAXWS_Util.setSOAPACTIONURI(dispatchSM, "ActionMismatch");
+ SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapMsg);
+ dispatchSM.invoke(request);
+ fail();
+ }
+ catch (SOAPFaultException e)
+ {
+ this.assertActionMismatchOrActionNotSupportedFaultCode(e);
+ this.assertProblemAction(e);
+ }
+ }
+
+ public void testActionMismatchOrActionNotSupportedFaultCase2() throws Exception
+ {
+ try
+ {
+ String soapMsg = MessageFormat.format(actionNotSupported, endpointURL, UUID.randomUUID(), WsaSOAPUtils
+ .getAddrVerAnonUri());
+ Dispatch<SOAPMessage> dispatchSM = createDispatchSOAPMessage(PORT_QNAME);
+ JAXWS_Util.setSOAPACTIONURI(dispatchSM, "ActionNotSupported1");
+ SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapMsg);
+ dispatchSM.invoke(request);
+ fail();
+ }
+ catch (SOAPFaultException e)
+ {
+ this.assertActionMismatchOrActionNotSupportedFaultCode(e);
+ this.assertProblemAction(e);
+ }
+ }
+
+ public void testActionMismatchOrActionNotSupportedFaultCase3() throws Exception
+ {
+ try
+ {
+ JAXWS_Util.setSOAPACTIONURI(port, "ActionNotSupported2");
+ port.addNumbers2(10, 10, "ActionNotSupported2");
+ fail();
+ }
+ catch (SOAPFaultException e)
+ {
+ this.assertActionMismatchOrActionNotSupportedFaultCode(e);
+ this.assertProblemAction(e);
+ }
+ }
+
+ private void assertActionMismatchOrActionNotSupportedFaultCode(final SOAPFaultException e) throws SOAPException
+ {
+ final String faultCode = WsaSOAPUtils.getFaultCode(e);
+ final boolean expectedFaultCode = WsaSOAPUtils.isActionMismatchFaultCode(e)
+ || WsaSOAPUtils.isActionNotSupportedFaultCode(e);
+ final String msg = "SOAPFault contains unexpected faultcode got: " + faultCode
+ + ", expected: ActionMismatch or ActionNotSupported";
+
+ assertTrue(msg, expectedFaultCode);
+ }
+
+ private void assertMessageAddressingHeaderRequiredFaultCode(final SOAPFaultException e) throws SOAPException
+ {
+ final String faultcode = WsaSOAPUtils.getFaultCode(e);
+ final String msg = "SOAPFault contains unexpected faultcode got: " + faultcode
+ + ", expected: MessageAddressingHeaderRequired";
+
+ assertTrue(msg, WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(e));
+ }
+
+ private void assertProblemHeaderQName(final SOAPFaultException e) throws SOAPException
+ {
+ final String faultdetail[] = WsaSOAPUtils.getFaultDetail(e);
+
+ if (faultdetail != null)
+ {
+ final String msg = "FaultDetail contains unexpected value got: " + faultdetail[0]
+ + ", expected: ProblemHeaderQName";
+ assertTrue(msg, WsaSOAPUtils.isProblemHeaderQNameFaultDetail(faultdetail[0]));
+ }
+ }
+
+ private void assertProblemAction(final SOAPFaultException e) throws SOAPException
+ {
+ final String faultdetail[] = WsaSOAPUtils.getFaultDetail(e);
+
+ if (faultdetail != null)
+ {
+ final String msg = "FaultDetail contains unexpected value got: " + faultdetail[0]
+ + ", expected: ProblemAction";
+
+ assertTrue(msg, WsaSOAPUtils.isProblemActionFaultDetail(faultdetail[0]));
+ }
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/common/TestConstants.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/common/TestConstants.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/common/TestConstants.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,29 @@
+/*
+ * 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.jbws3027.common;
+
+public class TestConstants
+{
+ public static final String ADD_NUMBERS2_IN_ACTION = "inputAction";
+
+ public static final String ADD_NUMBERS2_OUT_ACTION = "outputAction";
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,123 @@
+/*
+ * 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.jbws3027.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for addNumbers2 complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="addNumbers2">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="number1" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="number2" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="testName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbers2", propOrder =
+{"number1", "number2", "testName"})
+public class AddNumbers2
+{
+
+ protected int number1;
+
+ protected int number2;
+
+ protected String testName;
+
+ /**
+ * Gets the value of the number1 property.
+ *
+ */
+ public int getNumber1()
+ {
+ return number1;
+ }
+
+ /**
+ * Sets the value of the number1 property.
+ *
+ */
+ public void setNumber1(int value)
+ {
+ this.number1 = value;
+ }
+
+ /**
+ * Gets the value of the number2 property.
+ *
+ */
+ public int getNumber2()
+ {
+ return number2;
+ }
+
+ /**
+ * Sets the value of the number2 property.
+ *
+ */
+ public void setNumber2(int value)
+ {
+ this.number2 = value;
+ }
+
+ /**
+ * Gets the value of the testName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTestName()
+ {
+ return testName;
+ }
+
+ /**
+ * Sets the value of the testName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTestName(String value)
+ {
+ this.testName = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2Response.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2Response.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbers2Response.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -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.jbws3027.generated;
+
+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 addNumbers2Response complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="addNumbers2Response">
+ * <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 = "addNumbers2Response", propOrder =
+{"_return"})
+public class AddNumbers2Response
+{
+
+ @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: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -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.jbws3027.generated;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "AddNumbersPortType", targetNamespace = "http://example.com")
+@HandlerChain(file = "AddNumbersPortType_handler.xml")
+@XmlSeeAlso(
+{ObjectFactory.class})
+public interface AddNumbersPortType
+{
+
+ /**
+ *
+ * @param number2
+ * @param testName
+ * @param number1
+ * @return
+ * returns int
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbers2", targetNamespace = "http://example.com", className = "org.jboss.test.ws.jaxws.jbws3027.generated.AddNumbers2")
+ @ResponseWrapper(localName = "addNumbers2Response", targetNamespace = "http://example.com", className = "org.jboss.test.ws.jaxws.jbws3027.generated.AddNumbers2Response")
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers2(@WebParam(name = "number1", targetNamespace = "") int number1,
+ @WebParam(name = "number2", targetNamespace = "") int number2,
+ @WebParam(name = "testName", targetNamespace = "") String testName);
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersPortType_handler.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:port-name-pattern xmlns:ns2="http://example.com">ns2:AddNumbersPort</javaee:port-name-pattern>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3027.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,132 @@
+/*
+ * 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.jbws3027.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "AddNumbersService", targetNamespace = "http://example.com", wsdlLocation = "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/AddNumbersService.wsdl")
+@HandlerChain(file = "AddNumbersService_handler.xml")
+public class AddNumbersService extends Service
+{
+
+ private final static URL ADDNUMBERSSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException ADDNUMBERSSERVICE_EXCEPTION;
+
+ private final static QName ADDNUMBERSSERVICE_QNAME = new QName("http://example.com", "AddNumbersService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL(
+ "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/AddNumbersService.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ ADDNUMBERSSERVICE_WSDL_LOCATION = url;
+ ADDNUMBERSSERVICE_EXCEPTION = e;
+ }
+
+ public AddNumbersService()
+ {
+ super(__getWsdlLocation(), ADDNUMBERSSERVICE_QNAME);
+ }
+
+ public AddNumbersService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), ADDNUMBERSSERVICE_QNAME, features);
+ }
+
+ public AddNumbersService(URL wsdlLocation)
+ {
+ super(wsdlLocation, ADDNUMBERSSERVICE_QNAME);
+ }
+
+ public AddNumbersService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, ADDNUMBERSSERVICE_QNAME, features);
+ }
+
+ public AddNumbersService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AddNumbersService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns AddNumbersPortType
+ */
+ @WebEndpoint(name = "AddNumbersPort")
+ public AddNumbersPortType getAddNumbersPort()
+ {
+ return super.getPort(new QName("http://example.com", "AddNumbersPort"), AddNumbersPortType.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns AddNumbersPortType
+ */
+ @WebEndpoint(name = "AddNumbersPort")
+ public AddNumbersPortType getAddNumbersPort(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://example.com", "AddNumbersPort"), AddNumbersPortType.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (ADDNUMBERSSERVICE_EXCEPTION != null)
+ {
+ throw ADDNUMBERSSERVICE_EXCEPTION;
+ }
+ return ADDNUMBERSSERVICE_WSDL_LOCATION;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/AddNumbersService_handler.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:port-name-pattern xmlns:ns2="http://example.com">ns2:AddNumbersPort</javaee:port-name-pattern>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3027.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/ObjectFactory.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,97 @@
+/*
+ * 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.jbws3027.generated;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws3027.generated package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory
+{
+
+ private final static QName _AddNumbers2_QNAME = new QName("http://example.com", "addNumbers2");
+
+ private final static QName _AddNumbers2Response_QNAME = new QName("http://example.com", "addNumbers2Response");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws3027.generated
+ *
+ */
+ public ObjectFactory()
+ {
+ }
+
+ /**
+ * Create an instance of {@link AddNumbers2 }
+ *
+ */
+ public AddNumbers2 createAddNumbers2()
+ {
+ return new AddNumbers2();
+ }
+
+ /**
+ * Create an instance of {@link AddNumbers2Response }
+ *
+ */
+ public AddNumbers2Response createAddNumbers2Response()
+ {
+ return new AddNumbers2Response();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddNumbers2 }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.com", name = "addNumbers2")
+ public JAXBElement<AddNumbers2> createAddNumbers2(AddNumbers2 value)
+ {
+ return new JAXBElement<AddNumbers2>(_AddNumbers2_QNAME, AddNumbers2.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddNumbers2Response }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.com", name = "addNumbers2Response")
+ public JAXBElement<AddNumbers2Response> createAddNumbers2Response(AddNumbers2Response value)
+ {
+ return new JAXBElement<AddNumbers2Response>(_AddNumbers2Response_QNAME, AddNumbers2Response.class, null, value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/generated/package-info.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://example.com")
+package org.jboss.test.ws.jaxws.jbws3027.generated;
+
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/AddNumbersImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/AddNumbersImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/AddNumbersImpl.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,49 @@
+/*
+ * 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.jbws3027.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Action;
+import javax.xml.ws.soap.Addressing;
+
+import org.jboss.test.ws.jaxws.common.AddressingHeaderException;
+
+@WebService(name = "AddNumbersPortType", portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com", wsdlLocation = "WEB-INF/wsdl/AddNumbersService.wsdl")
+@HandlerChain(file = "server-handler.xml")
+@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,
+ @WebParam(name = "testName") String testName)
+ {
+ if (number1 < 0 || number2 < 0)
+ {
+ throw new AddressingHeaderException("One of the numbers received was negative:" + number1 + ", " + number2);
+ }
+ System.out.printf("Adding %s and %s\n", number1, number2);
+ return number1 + number2;
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/ServerSOAPHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/ServerSOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/ServerSOAPHandler.java 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,94 @@
+/*
+ * 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.jbws3027.service;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.AddressingHeaderException;
+import org.jboss.test.ws.jaxws.common.AddressingPropertyException;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws3027.common.TestConstants;
+
+public class ServerSOAPHandler extends WsaBaseSOAPHandler
+{
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String action)
+ {
+ if (oper.equals("addNumbers2"))
+ {
+ if (action == null)
+ return;
+ if (action.equals("ActionNotSupported") || action.equals("ActionNotSupported2"))
+ return;
+ if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION))
+ {
+ throw new AddressingHeaderException("Expected:" + TestConstants.ADD_NUMBERS2_IN_ACTION + ", Actual:"
+ + action);
+ }
+ }
+ }
+
+ protected void checkInboundReplyTo(SOAPMessageContext context)
+ {
+ String replyTo = null;
+ try
+ {
+ replyTo = getReplyTo(context);
+ }
+ catch (Exception e)
+ {
+ String testName = (String) context.get("test.name");
+ if (testName.equals("missingReplyToHeader"))
+ return;
+ throw new WebServiceException(e);
+ }
+ if (replyTo == null)
+ {
+ throw new AddressingPropertyException("wsa:ReplyTo contains null");
+ }
+ if (replyTo.equals("invalid"))
+ {
+ throw new AddressingPropertyException("wsa:ReplyTo contains invalid value");
+ }
+ if (replyTo.equals(""))
+ {
+ throw new AddressingPropertyException("wsa:ReplyTo contains an empty value");
+ }
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ if (testName == null)
+ return super.getAction(context);
+ else if (!testName.equals("missingActionHeader"))
+ return super.getAction(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ServerSOAPHandler";
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/server-handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/server-handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3027/service/server-handler.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws3027.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/jboss-web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/jboss-web.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -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-jbws3027</context-root>
+</jboss-web>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/web.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>Test</display-name>
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3027.service.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/Endpoint</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/wsdl/AddNumbersService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/wsdl/AddNumbersService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3027/WEB-INF/wsdl/AddNumbersService.wsdl 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="AddNumbersService" targetNamespace="http://example.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com" xmlns:wsa="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <xs:schema targetNamespace="http://example.com" version="1.0" xmlns:tns="http://example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="addNumbers2" type="tns:addNumbers2"/>
+ <xs:element name="addNumbers2Response" type="tns:addNumbers2Response"/>
+ <xs:complexType name="addNumbers2">
+ <xs:sequence>
+ <xs:element name="number1" type="xs:int"/>
+ <xs:element name="number2" type="xs:int"/>
+ <xs:element minOccurs="0" name="testName" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="addNumbers2Response">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="AddNumbersPortType_addNumbers2">
+ <part element="tns:addNumbers2" name="addNumbers2"/>
+ </message>
+ <message name="AddNumbersPortType_addNumbers2Response">
+ <part element="tns:addNumbers2Response" name="addNumbers2Response"/>
+ </message>
+ <portType name="AddNumbersPortType">
+ <operation name="addNumbers2" parameterOrder="addNumbers2">
+ <input message="tns:AddNumbersPortType_addNumbers2" wsa:Action="inputAction"/>
+ <output message="tns:AddNumbersPortType_addNumbers2Response" wsa:Action="outputAction"/>
+ </operation>
+ </portType>
+ <binding name="AddNumbersPortTypeBinding" type="tns:AddNumbersPortType">
+ <wsp:PolicyReference URI="#9748978d-7087-4151-81d5-7f16a8040d0d" xmlns:wsp="http://www.w3.org/ns/ws-policy"/>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="addNumbers2">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddNumbersService">
+ <port binding="tns:AddNumbersPortTypeBinding" name="AddNumbersPort">
+ <soap:address location="http://localhost:8080/jaxws-jbws3027/Endpoint"/>
+ </port>
+ </service>
+ <wsp:Policy wsu:Id="9748978d-7087-4151-81d5-7f16a8040d0d" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+</definitions>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3027/customfile.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3027/customfile.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3027/customfile.xml 2010-05-17 14:01:00 UTC (rev 12243)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="AddNumbersService.wsdl"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <jaxws:bindings node="wsdl:definitions">
+ <jaxws:package name="org.jboss.test.ws.jaxws.jbws3027.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:port-name-pattern xmlns:ns2="http://example.com">ns2:AddNumbersPort</javaee:port-name-pattern>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3027.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
+ </jaxws:bindings>
+ <!-- JBossWS generates XML schemas inside WSDL, not in separate schema files like Sun RI -->
+ <jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://example.com']">
+ <jaxb:schemaBindings>
+ <jaxb:package name="org.jboss.test.ws.jaxws.jbws3027.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+
+</jaxws:bindings>
14 years, 7 months