Author: richard.opalka(a)jboss.com
Date: 2010-04-13 06:00:13 -0400 (Tue, 13 Apr 2010)
New Revision: 11975
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/Handler_Util.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/SOAPConstants.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/WsaSOAPUtils.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/ClientSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/JBWS2991TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/common/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/common/TestConstants.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbers.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbersResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/package-info.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureException.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl3.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl4.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/server-handler.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile1.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile2.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile3.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile4.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/common/W3CAddressingConstants.java
Log:
[JBWS-2991] 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-04-13 09:34:13 UTC
(rev 11974)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-04-13 10:00:13 UTC
(rev 11975)
@@ -878,19 +878,10 @@
<!-- jaxws-jbws2985 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2985.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2985/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/AddNumbersException.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/AddNumbersException.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/AddNumbersImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/TooBigNumbersException.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/ServerSOAPHandler.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws2985/service/server-handler.xml" />
- <include
name="org/jboss/test/ws/jaxws/jbws2985/common/TestConstants.class"/>
- <include
name="org/jboss/test/ws/jaxws/common/ActionNotSupportedException.class"/>
- <include
name="org/jboss/test/ws/jaxws/common/AddressingPropertyException.class"/>
- <include
name="org/jboss/test/ws/jaxws/common/AddressingHeaderException.class"/>
- <include name="org/jboss/test/ws/jaxws/common/JAXWS_Util.class"/>
- <include
name="org/jboss/test/ws/jaxws/common/WsaBaseSOAPHandler.class"/>
- <include
name="org/jboss/test/ws/jaxws/common/W3CAddressingConstants.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2985/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2985/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/jbws2985/common/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
</classes>
<webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2985/WEB-INF">
<include name="wsdl/**" />
@@ -898,6 +889,20 @@
</webinf>
</war>
+ <!-- jaxws-jbws2991 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2991.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2991/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2991/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2991/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/jbws2991/common/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2991/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">
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/Handler_Util.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/Handler_Util.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/Handler_Util.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,80 @@
+/*
+ * 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.common;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.LogicalMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.transform.Source;
+
+import org.jboss.wsf.common.DOMUtils;
+
+public final class Handler_Util
+{
+
+ public static boolean checkForMsg(MessageContext context, String whichMsg)
+ {
+ boolean foundIt = false;
+ try
+ {
+ if (context instanceof LogicalMessageContext)
+ {
+ LogicalMessage lm = ((LogicalMessageContext) context).getMessage();
+ if (lm != null)
+ {
+ Source source = lm.getPayload();
+ if (source != null)
+ {
+ String msg =
JAXWS_Util.getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(source));
+
+ if (msg.indexOf(whichMsg) > -1)
+ {
+ foundIt = true;
+ }
+ }
+ }
+ }
+ else
+ {
+ SOAPMessage soapMsg = ((SOAPMessageContext) context).getMessage();
+
+ String msg = DOMUtils.node2String(soapMsg.getSOAPPart());
+ if (msg != null)
+ {
+ if (msg.indexOf(whichMsg) > -1)
+ {
+ foundIt = true;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return foundIt;
+ }
+
+}
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-04-13
09:34:13 UTC (rev 11974)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/JAXWS_Util.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -21,28 +21,47 @@
*/
package org.jboss.test.ws.jaxws.common;
-import javax.xml.soap.*;
-import java.io.*;
+import java.io.StringWriter;
+import java.io.Writer;
+
import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
import org.jboss.wsf.common.DOMUtils;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
public final class JAXWS_Util
{
private static final Logger log = Logger.getLogger(JAXWS_Util.class);
- private static String getMessageEncoding(final SOAPMessage msg) throws SOAPException
+ public static DOMResult getSourceAsDOMResult(Source s) throws Exception
{
- String encoding = Constants.DEFAULT_XML_CHARSET;
- if (msg.getProperty(SOAPMessage.CHARACTER_SET_ENCODING) != null)
- {
- encoding = msg.getProperty(SOAPMessage.CHARACTER_SET_ENCODING).toString();
- }
- return encoding;
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ DOMResult result = new DOMResult();
+ transformer.transform(s, result);
+ return result;
}
+ public static String getDOMResultAsString(DOMResult dr) throws Exception
+ {
+ DOMSource ds = new DOMSource(dr.getNode());
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ Writer out = new StringWriter();
+ StreamResult streamResult = new StreamResult();
+ streamResult.setWriter(out);
+ transformer.transform(ds, streamResult);
+ return streamResult.getWriter().toString();
+ }
+
public static void dumpSOAPMessage(final SOAPMessage msg, final boolean logOnly)
{
final StringBuilder sb = new StringBuilder();
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/SOAPConstants.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/SOAPConstants.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/SOAPConstants.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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.common;
+
+public interface SOAPConstants
+{
+ public static final String SOAP_NAMESPACE_URI =
"http://schemas.xmlsoap.org/wsdl/soap/";
+ public static final String SOAP_ADDRESS_LOCAL_NAME = "address";
+ public static final String SOAP_BINDING_LOCAL_NAME = "binding";
+ public static final String SOAP_BODY_LOCAL_NAME = "body";
+ public static final String SOAP_FAULT_LOCAL_NAME = "fault";
+ public static final String SOAP_HEADER_LOCAL_NAME = "header";
+ public static final String SOAP_HEADERFAULT_LOCAL_NAME = "headerfault";
+ public static final String SOAP_OPERATION_LOCAL_NAME = "operation";
+ public static final String SOAP_SOAPACTION_ATTR = "soapAction";
+ public static final String SOAP_ENCODINGSTYLE_ATTR = "encodingStyle";
+ public static final String SOAP_LOCATION_ATTR = "location";
+ public static final String SOAP_MUST_UNDERSTAND_ATTR = "mustUnderstand";
+ public static final String SOAP_NAME_ATTR = "name";
+ public static final String SOAP_NAMESPACE_ATTR = "namespace";
+ public static final String SOAP_PART_ATTR = "part";
+ public static final String SOAP_PARTS_ATTR = "parts";
+ public static final String SOAP_STYLE_ATTR = "style";
+ public static final String SOAP_TRANSPORT_ATTR = "transport";
+ public static final String SOAP_USE_ATTR = "use";
+ public static final String SOAP_DOCUMENT = "document";
+ public static final String SOAP_ENCODED = "encoded";
+ public static final String SOAP_LITERAL = "literal";
+ public static final String SOAP_RPC = "rpc";
+ public static final String SOAP_TRANSPORT =
"http://schemas.xmlsoap.org/soap/http";
+ public static final String SOAP_ACTION_HEADER_NAME = "SOAPAction";
+}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/W3CAddressingConstants.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/W3CAddressingConstants.java 2010-04-13
09:34:13 UTC (rev 11974)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/W3CAddressingConstants.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -147,5 +147,4 @@
public static final QName ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED = new
QName(WSA_NAMESPACE_NAME,
"OnlyNonAnonymousAddressSupported", WSA_NAMESPACE_PREFIX);
-
}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/WsaSOAPUtils.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/WsaSOAPUtils.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/common/WsaSOAPUtils.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,528 @@
+/*
+ * 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.common;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.util.Iterator;
+
+import javax.xml.soap.Detail;
+import javax.xml.soap.DetailEntry;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.Text;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.soap.SOAPFaultException;
+
+public class WsaSOAPUtils implements javax.xml.soap.SOAPConstants,
W3CAddressingConstants
+{
+
+ public static final String UUID = "uuid:" + java.util.UUID.randomUUID();
+
+ public static final String W3C_WSA_NS = W3CAddressingConstants.WSA_NAMESPACE_NAME;
+
+ public static final String S11_NS = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
+
+ public static final String S12_NS = SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
+
+ public static final String FAULT_DETAIL = "detail";
+
+ public static final String FAULT_ACTOR = "faultactor";
+
+ public static final String FAULT_STRING = "faultstring";
+
+ public static final String FAULT_CODE = "faultcode";
+
+ public static final String[] FAULT_CHILDREN =
+ {FAULT_ACTOR, FAULT_CODE, FAULT_DETAIL, FAULT_STRING};
+
+ private static String AddressingVersionNSURI =
W3CAddressingConstants.WSA_NAMESPACE_NAME;
+
+ private static String AddressingVersionAnonymousURI =
W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS;
+
+ public static void setAddrVerNSUri(String nsuri, String anonuri)
+ {
+ AddressingVersionNSURI = nsuri;
+ AddressingVersionAnonymousURI = anonuri;
+ }
+
+ public static String getAddrVerNSUri()
+ {
+ return AddressingVersionNSURI;
+ }
+
+ public static String getAddrVerAnonUri()
+ {
+ return AddressingVersionAnonymousURI;
+ }
+
+ public static boolean isValidSoapFaultChildName(SOAPElement element)
+ {
+ for (int i = 0; i < FAULT_CHILDREN.length; i++)
+ {
+ if (FAULT_CHILDREN[i].equals(element.getElementName().getLocalName()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isMessageAddressingHeaderRequiredFaultCode(SOAPMessage message)
throws SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart());
+ }
+
+ public static boolean isMessageAddressingHeaderRequiredFaultCode(SOAPFaultException
se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart());
+ }
+
+ public static boolean isInvalidAddressingHeaderFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.INVALID_MAP_QNAME.getLocalPart());
+ }
+
+ public static boolean isInvalidAddressingHeaderFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.INVALID_MAP_QNAME.getLocalPart());
+ }
+
+ public static boolean isInvalidEPRFaultCode(SOAPMessage message) throws SOAPException
+ {
+ return isFaultCode(message, W3CAddressingConstants.INVALID_EPR.getLocalPart());
+ }
+
+ public static boolean isInvalidEPRFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.INVALID_EPR.getLocalPart());
+ }
+
+ public static boolean isInvalidCARDINALITYFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.INVALID_CARDINALITY.getLocalPart());
+ }
+
+ public static boolean isInvalidCARDINALITYFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.INVALID_CARDINALITY.getLocalPart());
+ }
+
+ public static boolean isMissingAddressInEPRFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.MISSING_ADDRESS_IN_EPR.getLocalPart());
+ }
+
+ public static boolean isMissingAddressInEPRFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.MISSING_ADDRESS_IN_EPR.getLocalPart());
+ }
+
+ public static boolean isDuplicateMessageIDFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.DUPLICATE_MESSAGEID.getLocalPart());
+ }
+
+ public static boolean isDuplicateMessageIDFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.DUPLICATE_MESSAGEID.getLocalPart());
+ }
+
+ public static boolean isActionMismatchFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.ACTION_MISMATCH.getLocalPart());
+ }
+
+ public static boolean isActionMismatchFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se, W3CAddressingConstants.ACTION_MISMATCH.getLocalPart());
+ }
+
+ public static boolean isOnlyAnonymousAddressSupportedFaultCode(SOAPMessage message)
throws SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart());
+ }
+
+ public static boolean isOnlyAnonymousAddressSupportedFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart());
+ }
+
+ public static boolean isOnlyNonAnonymousAddressSupportedFaultCode(SOAPMessage message)
throws SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart());
+ }
+
+ public static boolean isOnlyNonAnonymousAddressSupportedFaultCode(SOAPFaultException
se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart());
+ }
+
+ public static boolean isDestinationUnreachableFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.DESTINATION_UNREACHABLE_QNAME.getLocalPart());
+ }
+
+ public static boolean isDestinationUnreachableFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.DESTINATION_UNREACHABLE_QNAME.getLocalPart());
+ }
+
+ public static boolean isActionNotSupportedFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.ACTION_NOT_SUPPORTED_QNAME.getLocalPart());
+ }
+
+ public static boolean isActionNotSupportedFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.ACTION_NOT_SUPPORTED_QNAME.getLocalPart());
+ }
+
+ public static boolean isEndpointUnavailableFaultCode(SOAPMessage message) throws
SOAPException
+ {
+ return isFaultCode(message,
W3CAddressingConstants.ENDPOINT_UNAVAILABLE_QNAME.getLocalPart());
+ }
+
+ public static boolean isEndpointUnavailableFaultCode(SOAPFaultException se)
+ {
+ return isFaultCode(se,
W3CAddressingConstants.ENDPOINT_UNAVAILABLE_QNAME.getLocalPart());
+ }
+
+ public static boolean isFaultCode(SOAPFaultException se, String faultcode)
+ {
+ return se.getFault().getFaultCode().endsWith(faultcode);
+ }
+
+ public static boolean isFaultCode(SOAPMessage message, String faultcode) throws
SOAPException
+ {
+ SOAPBody body = message.getSOAPPart().getEnvelope().getBody();
+ if (body.hasFault())
+ {
+ return body.getFault().getFaultCode().endsWith(faultcode);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ public static String getFaultCode(SOAPFaultException se) throws SOAPException
+ {
+ return se.getFault().getFaultCodeAsQName().getLocalPart();
+ }
+
+ public static String getFaultCode(SOAPMessage message) throws SOAPException
+ {
+ SOAPBody body = message.getSOAPPart().getEnvelope().getBody();
+ return body.getFault().getFaultCodeAsQName().getLocalPart();
+ }
+
+ public static String getFaultString(SOAPFaultException se) throws SOAPException
+ {
+ return se.getFault().getFaultString();
+ }
+
+ public static String getFaultString(SOAPMessage message) throws SOAPException
+ {
+ SOAPBody body = message.getSOAPPart().getEnvelope().getBody();
+ return body.getFault().getFaultString();
+ }
+
+ public static String[] getFaultDetail(SOAPFaultException se) throws SOAPException
+ {
+ String faultDetail[] = new String[10];
+ int i = 0;
+
+ SOAPFault sf = se.getFault();
+ Detail d = sf.getDetail();
+ if (d != null)
+ {
+ //if(d instanceof Element)
+ //XMLUtils.XmlDumpDOMNodes((Element)d, false);
+ Iterator iter = d.getDetailEntries();
+ Object obj;
+ while (iter.hasNext())
+ {
+ DetailEntry de = (DetailEntry) iter.next();
+ StringBuffer s = new StringBuffer(de.getElementName().getLocalName());
+ if (de instanceof Text)
+ s.append(":" + de.getValue());
+ faultDetail[i++] = s.toString();
+ }
+ }
+ if (i == 0)
+ return null;
+ else
+ return faultDetail;
+ }
+
+ public static String[] getFaultDetail(SOAPMessage message) throws SOAPException
+ {
+ SOAPElement se = null;
+ SOAPElement se2 = null;
+ Object obj = null;
+ String faultDetail[] = new String[10];
+ Text text = null;
+ int i = 0;
+
+ SOAPHeader header = message.getSOAPHeader();
+ Iterator iter =
header.getChildElements(W3CAddressingConstants.FAULT_DETAIL_QNAME);
+ if (!iter.hasNext())
+ return null;
+ obj = iter.next();
+ if (obj instanceof SOAPElement)
+ {
+ se = (SOAPElement) obj;
+ iter = se.getChildElements();
+ }
+ while (iter.hasNext())
+ {
+ obj = iter.next();
+ if (obj instanceof SOAPElement)
+ {
+ se = (SOAPElement) obj;
+ faultDetail[i++] = se.getElementQName().getLocalPart();
+ iter = se.getChildElements();
+ }
+ else if (obj instanceof Text)
+ {
+ text = (Text) obj;
+ faultDetail[i++] = text.getValue();
+ }
+ }
+ if (i == 0)
+ return null;
+ else
+ return faultDetail;
+ }
+
+ public static String[] getFaultDetail(SOAPMessageContext context) throws
SOAPException
+ {
+ return getFaultDetail(context.getMessage());
+ }
+
+ public static boolean isProblemHeaderQNameFaultDetail(String faultdetail)
+ {
+ if (faultdetail == null)
+ return false;
+ if (faultdetail.equals(PROBLEM_HEADER_QNAME_QNAME.getLocalPart()))
+ return true;
+ else
+ return false;
+ }
+
+ public static boolean isProblemHeaderFaultDetail(String faultdetail)
+ {
+ if (faultdetail == null)
+ return false;
+ if (faultdetail.equals(PROBLEM_HEADER_QNAME.getLocalPart()))
+ return true;
+ else
+ return false;
+ }
+
+ public static boolean isProblemActionFaultDetail(String faultdetail)
+ {
+ if (faultdetail == null)
+ return false;
+ if (faultdetail.equals(PROBLEM_ACTION_QNAME.getLocalPart()))
+ return true;
+ else
+ return false;
+ }
+
+ private static final Source makeStreamSource(String msg)
+ {
+ byte[] bytes = msg.getBytes();
+ ByteArrayInputStream sinputStream = new ByteArrayInputStream(bytes);
+ return new StreamSource(sinputStream);
+ }
+
+ private static final SOAPMessage getSOAPMessage(Source msg) throws Exception
+ {
+ MessageFactory factory = MessageFactory.newInstance();
+ SOAPMessage message = factory.createMessage();
+ message.getSOAPPart().setContent(msg);
+ message.saveChanges();
+ return message;
+ }
+
+ private static final SOAPMessage getSOAP12Message(Source msg) throws Exception
+ {
+ MessageFactory factory =
MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+ SOAPMessage message = factory.createMessage();
+ message.getSOAPPart().setContent(msg);
+ message.saveChanges();
+ return message;
+ }
+
+ public static String fileToXMLString(String filename)
+ {
+ return sourceToXMLString(new StreamSource(new File(filename)));
+ }
+
+ public static String sourceToXMLString(Source result)
+ {
+ String xmlResult = null;
+ try
+ {
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = factory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,
"yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ OutputStream out = new ByteArrayOutputStream();
+ StreamResult streamResult = new StreamResult();
+ streamResult.setOutputStream(out);
+ transformer.transform(result, streamResult);
+ xmlResult = streamResult.getOutputStream().toString();
+ }
+ catch (TransformerException e)
+ {
+ e.printStackTrace();
+ }
+ return xmlResult;
+ }
+
+ public static final SOAPMessage invoke(Dispatch<SOAPMessage> dispatch, String
request, String... args)
+ throws Exception
+ {
+ String fRequest = String.format(request, (Object[]) args);
+
+ return dispatch.invoke(getSOAPMessage(makeStreamSource(fRequest)));
+ }
+
+ public static final void invokeOneWay(Dispatch<SOAPMessage> dispatch, String
request, String... args)
+ throws Exception
+ {
+ String fRequest = String.format(request, (Object[]) args);
+
+ dispatch.invokeOneWay(getSOAPMessage(makeStreamSource(fRequest)));
+ }
+
+ public static final SOAPMessage invoke12(Dispatch<SOAPMessage> dispatch, String
request, String... args)
+ throws Exception
+ {
+ String fRequest = String.format(request, (Object[]) args);
+
+ return dispatch.invoke(getSOAP12Message(makeStreamSource(fRequest)));
+ }
+
+ public static final void invokeOneWay12(Dispatch<SOAPMessage> dispatch, String
request, String... args)
+ throws Exception
+ {
+ String fRequest = String.format(request, (Object[]) args);
+
+ dispatch.invokeOneWay(getSOAP12Message(makeStreamSource(fRequest)));
+ }
+
+ public static final String BAD_ACTION_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:To>%s</wsa:To>\n"
+ "<wsa:MessageID>" + UUID + "</wsa:MessageID>\n"
+ + "<wsa:ReplyTo>\n" + "
<wsa:Address>%s</wsa:Address>\n" + "</wsa:ReplyTo>\n"
+ + "<wsa:Action>badSOAPAction</wsa:Action>\n" +
"</S:Header>\n" + "<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String MISSING_ACTION_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:To>%s</wsa:To>\n"
+ "<wsa:MessageID>" + UUID + "</wsa:MessageID>\n"
+ + "<wsa:ReplyTo>\n" + "
<wsa:Address>%s</wsa:Address>\n" + "</wsa:ReplyTo>\n" +
"</S:Header>\n"
+ + "<S:Body>\n" + "<addNumbers
xmlns=\"http://example.com/\">\n" + "
<number1>10</number1>\n"
+ + " <number2>10</number2>\n" +
"</addNumbers>\n" + "</S:Body></S:Envelope>";
+
+ public static final String REPLY_TO_REFPS_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:To>%s</wsa:To>\n"
+ "<wsa:MessageID>" + UUID + "</wsa:MessageID>\n"
+ + "<wsa:ReplyTo>\n" + "
<wsa:Address>%s</wsa:Address>\n" + "
<wsa:ReferenceParameters>\n"
+ + " <ck:CustomerKey
xmlns:ck=\"http://example.org/customer\">Key#123456789</c...
+ + " </wsa:ReferenceParameters>" +
"</wsa:ReplyTo>\n" + "<wsa:Action>%s</wsa:Action>\n"
+ "</S:Header>\n"
+ + "<S:Body>\n" + "<addNumbers
xmlns=\"http://example.com/\">\n" + "
<number1>10</number1>\n"
+ + " <number2>10</number2>\n" +
"</addNumbers>\n" + "</S:Body></S:Envelope>";
+
+ public static final String FAULT_TO_REFPS_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:To>%s</wsa:To>\n"
+ "<wsa:MessageID>"
+ + UUID
+ + "</wsa:MessageID>\n"
+ + "<wsa:ReplyTo>\n"
+ + " <wsa:Address>%s</wsa:Address>\n"
+ + " <wsa:ReferenceParameters>\n"
+ + " <ck:CustomerKey
xmlns:ck=\"http://example.org/customer\">Key#123456789</c...
+ + " </wsa:ReferenceParameters>"
+ + "</wsa:ReplyTo>\n"
+ + "<wsa:FaultTo>\n"
+ + " <wsa:Address>%s</wsa:Address>\n"
+ + " <wsa:ReferenceParameters>\n"
+ + " <ck:CustomerKey
xmlns:ck=\"http://example.org/customer\">Fault#123456789<...
+ + " </wsa:ReferenceParameters>"
+ + "</wsa:FaultTo>\n"
+ + "<wsa:Action>%s</wsa:Action>\n"
+ + "</S:Header>\n"
+ + "<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n"
+ + " <number1>-10</number1>\n"
+ + " <number2>10</number2>\n" +
"</addNumbers>\n" + "</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_TO_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:To>%s</wsa:To>\n"
+ "</S:Header>\n" + "<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_REPLY_TO_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" +
"<wsa:ReplyTo><wsa:Address>%s</wsa:Address></wsa:ReplyTo>"
+ "</S:Header>\n" + "<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_FAULT_TO_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" +
"<wsa:FaultTo><wsa:Address>%s</wsa:Address></wsa:FaultTo>"
+ +
"<wsa:FaultTo><wsa:Address>%s</wsa:Address></wsa:FaultTo>"
+ "</S:Header>\n" + "<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_ACTION_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" +
"<wsa:Action>%s</wsa:Action>" + "</S:Header>\n" +
"<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_MESSAGE_ID_MESSAGE = "<S:Envelope
xmlns:S=\"%s\" " + "xmlns:wsa=\"%s\">\n"
+ + "<S:Header>\n" + "<wsa:MessageID>" + UUID +
"</wsa:MessageID>" + "</S:Header>\n" +
"<S:Body>\n"
+ + "<addNumbers
xmlns=\"http://example.com/\">\n" +
" <number1>10</number1>\n" + "
<number2>10</number2>\n"
+ + "</addNumbers>\n" +
"</S:Body></S:Envelope>";
+
+ public static final String DUPLICATE_MESSAGE_ID_MESSAGE_ONEWAY = "<S:Envelope
xmlns:S=\"%s\" "
+ + "xmlns:wsa=\"%s\">\n" + "<S:Header>\n"
+ "<wsa:MessageID>" + UUID + "</wsa:MessageID>" +
"</S:Header>\n"
+ + "<S:Body>\n" + "<addNumbers5
xmlns=\"http://example.com/\">\n" + "
<number1>10</number1>\n"
+ + " <number2>10</number2>\n" +
"</addNumbers5>\n" + "</S:Body></S:Envelope>";
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/ClientSOAPHandler.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/ClientSOAPHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/ClientSOAPHandler.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,430 @@
+/*
+ * 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.jbws2991;
+
+import java.util.Iterator;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.Text;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.ws.jaxws.common.ActionNotSupportedException;
+import org.jboss.test.ws.jaxws.common.AddressingPropertyException;
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.SOAPConstants;
+import org.jboss.test.ws.jaxws.common.W3CAddressingConstants;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws2634.shared.handlers.TestHandler;
+import org.jboss.test.ws.jaxws.jbws2991.common.TestConstants;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class ClientSOAPHandler extends WsaBaseSOAPHandler
+{
+ private static final Logger log = Logger.getLogger(TestHandler.class);
+
+ String testName = null;
+
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String
action)
+ {
+ log.debug("ClientSOAPHandler.checkInboundAction: [operation=" + oper +
", input action=" + action + "]");
+ //figure out which testname i'm checking for and call appropropriate
verify*(...)
+ if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerEnabledNotREQ"))
+ {
+ verifyClientEnabledNotREQServerEnabledNotREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerEnabledREQ"))
+ {
+ verifyClientEnabledNotREQServerEnabledREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerUsingDefaults"))
+ {
+ verifyClientEnabledNotREQServerUsingDefaults(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerNotEnabled"))
+ {
+ verifyClientEnabledNotREQServerNotEnabled(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientNotEnabledServerEnabledNotREQ"))
+ {
+ verifyClientNotEnabledServerEnabledNotREQ(context, action);
+ //} else if
(Handler_Util.checkForMsg(context,"ClientNotEnabledServerEnabledREQ")){
+ //verifyClientNotEnabledServerEnabledREQ(context,action);
+ //} else if
(Handler_Util.checkForMsg(context,"ClientEnabledREQServerNotEnabled")){
+ //verifyClientEnabledREQServerNotEnabled(context,action);
+ }
+ }
+
+ private void verifyClientEnabledNotREQServerEnabledNotREQ(SOAPMessageContext context,
String action)
+ {
+ //verify specific headers for ClientEnabledNotREQServerEnabledNotREQ here...
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerUsingDefaults(SOAPMessageContext context,
String action)
+ {
+ //verify specific headers for ClientEnabledNotREQServerUsingDefaults here...
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientNotEnabledServerEnabledNotREQ(SOAPMessageContext context,
String action)
+ {
+ //verify specific headers for ClientNotEnabledServerEnabledNotREQ here...
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerEnabledREQ(SOAPMessageContext context,
String action)
+ {
+ //verify specific headers for ClientEnabledNotREQServerEnabledREQ here...
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientNotEnabledServerEnabledREQ(SOAPMessageContext context, String
action)
+ {
+ //verify specific headers for ClientNotEnabledServerEnabledREQ here...
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerNotEnabled(SOAPMessageContext context,
String action)
+ {
+ //verify specific headers for ClientEnabledNotREQServerNotEnabled here...
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyClientEnabledREQServerNotEnabled(SOAPMessageContext context, String
action)
+ {
+ //verify specific headers for ClientEnabledREQServerNotEnabled here...
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyAction(String action)
+ {
+ log.debug("ClientSOAPHandler.verifyAction: [action=" + action +
"]");
+ if (!TestConstants.ADD_NUMBERS_OUT_ACTION.equals(action))
+ {
+ throw new ActionNotSupportedException("Expected:" +
TestConstants.ADD_NUMBERS_OUT_ACTION + ", Actual:"
+ + action);
+ }
+ }
+
+ private void
checkOptionalAddressingHeadersForMustUnderstandAttributeExist(SOAPMessageContext context)
+ throws SOAPException
+ {
+ String mustUnderstandAttributes = null;
+ if (_getToHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:To, ";
+ }
+ if (_getReplyToHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:ReplyTo,
";
+ }
+ if (_getMessageIdHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:MessageID,
";
+ }
+ if (_getRelationshipHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:Relationship,
";
+ }
+ if (_getRelatesToHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:RelatesTo,
";
+ }
+ if (_getActionHasMustUnderstandAttribute(context))
+ {
+ mustUnderstandAttributes = mustUnderstandAttributes + "wsa:Action ";
+ }
+ if (mustUnderstandAttributes != null)
+ {
+ throw new AddressingPropertyException(
+ "If using SOAP, MAP headers MUST NOT have a soap:mustUnderstand
attribute with a value of true. \n The following optional addressing headers contain
invalid mustUnderstand attribute with a value of true ["
+ + mustUnderstandAttributes + "]");
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ log.debug("ClientSOAPHandler.checkAddressingHeadersExist");
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundRelatesToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String
action)
+ {
+ log.debug("ClientSOAPHandler.checkAddressingHeadersDoNotExist");
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundRelatesToDoesNotExist(context);
+ }
+
+ private void handleMessageInboundCheckAddressingHeadersDoNotExist(SOAPMessageContext
context)
+ {
+ String headerValue = null;
+ String whichHeaders = null;
+ try
+ {
+ headerValue = getTo(context);
+ whichHeaders = whichHeaders + "wsa:To, ";
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ headerValue = getReplyTo(context);
+ whichHeaders = whichHeaders + "wsa:ReplyTo, ";
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ headerValue = getMessageId(context);
+ whichHeaders = whichHeaders + "wsa:MessageId, ";
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ headerValue = getRelationship(context);
+ whichHeaders = whichHeaders + "wsa:Relationship, ";
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ headerValue = getAction(context);
+ whichHeaders = whichHeaders + "wsa:Action";
+ }
+ catch (Exception e)
+ {
+ }
+ if (whichHeaders != null)
+ {
+ throw new AddressingPropertyException("ERROR: The following headers exist
in soap message: [" + whichHeaders
+ + "]");
+ }
+ }
+
+ protected void checkInboundToExist(SOAPMessageContext context)
+ {
+ String to = null;
+ try
+ {
+ to = getTo(context);
+ if (to != null)
+ {
+ log.debug("ClientSOAPHandler.checkInboundToExist: [To=" + to +
"]");
+ if (W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI.equals(to))
+ {
+ log.debug("wsa:To matches anonymous uri: " +
W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ if (to == null)
+ {
+ throw new AddressingPropertyException("wsa:To contains null");
+ }
+ if (to.equals("invalid"))
+ {
+ throw new AddressingPropertyException("wsa:To contains invalid
value");
+ }
+ if (to.equals(""))
+ {
+ throw new AddressingPropertyException("wsa:To contains an empty
value");
+ }
+ }
+
+ private boolean nodeHasMustUnderstandAttribute(Node node)
+ {
+ boolean containsMustUnderstandAttribute = false;
+ try
+ {
+ if (node.hasAttributes())
+ {
+ //A NamedNodeMap containing attributes of this node
+ NamedNodeMap attributes = node.getAttributes();
+ if (attributes != null)
+ {
+ // see if it has an mustUnderstand attribute and fail if you find one
+ Node mustUnderstandNode =
attributes.getNamedItem(SOAPConstants.SOAP_MUST_UNDERSTAND_ATTR);
+ if (mustUnderstandNode != null)
+ {
+ // is the value actually set to true, if so then fail
+ if ("true".equals(mustUnderstandNode.getNodeValue()))
+ {
+ containsMustUnderstandAttribute = true;
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.debug("ClientSOAPHandler.nodeHasMustUnderstandAttribute: caught
Exception [" + e.getMessage()
+ + "], setting Node has mustUnderstand attribute boolean value to
false");
+ }
+ return containsMustUnderstandAttribute;
+ }
+
+ private SOAPHeader getSOAPHeaderFromContext(SOAPMessageContext context) throws
SOAPException
+ {
+ SOAPMessage message = context.getMessage();
+ SOAPHeader header = message.getSOAPHeader();
+ return header;
+ }
+
+ private boolean _getToHasMustUnderstandAttribute(SOAPMessageContext context) throws
SOAPException
+ {
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter = header.getChildElements(W3CAddressingConstants.WSA_TO_QNAME);
+ if (!iter.hasNext())
+ {
+ return false;
+ }
+ Node node = (Node) iter.next();
+ Node toNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(toNode);
+ }
+
+ private boolean _getReplyToHasMustUnderstandAttribute(SOAPMessageContext context)
throws SOAPException
+ {
+ boolean containsMustUnderstandAttribute = false;
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter = header.getChildElements(W3CAddressingConstants.WSA_REPLYTO_QNAME);
+ if (!iter.hasNext())
+ {
+ return false;
+ }
+ NodeList nodes = ((Element) iter.next()).getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Node node = (Node) nodes.item(i);
+ if (node instanceof Text)
+ {
+ continue;
+ }
+ if (node.getLocalName().equals("Address")
+ &&
node.getNamespaceURI().equals(W3CAddressingConstants.WSA_NAMESPACE_NAME))
+ {
+ Node replyToNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(replyToNode);
+ }
+ }
+ return containsMustUnderstandAttribute;
+ }
+
+ private boolean _getMessageIdHasMustUnderstandAttribute(SOAPMessageContext context)
throws SOAPException
+ {
+ boolean containsMustUnderstandAttribute = false;
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter =
header.getChildElements(W3CAddressingConstants.WSA_MESSAGEID_QNAME);
+ if (!iter.hasNext())
+ {
+ return containsMustUnderstandAttribute;
+ }
+ Node node = (Node) iter.next();
+ Node messageIdNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(messageIdNode);
+ }
+
+ private boolean _getRelationshipHasMustUnderstandAttribute(SOAPMessageContext context)
throws SOAPException
+ {
+ boolean containsMustUnderstandAttribute = false;
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter =
header.getChildElements(W3CAddressingConstants.WSA_RELATIONSHIPTYPE_QNAME);
+ if (!iter.hasNext())
+ {
+ return containsMustUnderstandAttribute;
+ }
+ Node node = (Node) iter.next();
+ Node relationshipNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(relationshipNode);
+ }
+
+ private boolean _getRelatesToHasMustUnderstandAttribute(SOAPMessageContext context)
throws SOAPException
+ {
+ boolean containsMustUnderstandAttribute = false;
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter =
header.getChildElements(W3CAddressingConstants.WSA_RELATESTO_QNAME);
+ if (!iter.hasNext())
+ {
+ return containsMustUnderstandAttribute;
+ }
+ Node node = (Node) iter.next();
+ Node relatesToNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(relatesToNode);
+ }
+
+ private boolean _getActionHasMustUnderstandAttribute(SOAPMessageContext context)
throws SOAPException
+ {
+ boolean containsMustUnderstandAttribute = false;
+ SOAPHeader header = getSOAPHeaderFromContext(context);
+ Iterator iter = header.getChildElements(W3CAddressingConstants.WSA_ACTION_QNAME);
+ if (!iter.hasNext())
+ {
+ return containsMustUnderstandAttribute;
+ }
+ Node node = (Node) iter.next();
+ Node actionNode = node.getFirstChild();
+ return nodeHasMustUnderstandAttribute(actionNode);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ testName = (String) context.get("test.name");
+ log.debug("ClientSOAPHandler.getAction(): testName=" + testName);
+ if (testName == null)
+ return super.getAction(context);
+ /* Headers MUST be present on SOAPResponse */
+ else if (testName.equals("ClientEnabledNotREQServerEnabledNotREQ")
+ || testName.equals("ClientEnabledNotREQServerEnabledREQ")
+ || testName.equals("ClientEnabledNotREQServerUsingDefaults"))
+ return super.getAction(context);
+ /* Headers MUST NOT be present on SOAPResponse */
+ else if (testName.equals("ClientEnabledNotREQServerNotEnabled")
+ || testName.equals("ClientNotEnabledServerEnabledNotREQ"))
+ return super.getActionDoesNotExist(context);
+ /* Fault case just return null */
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ClientSOAPHandler";
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/JBWS2991TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/JBWS2991TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/JBWS2991TestCase.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,267 @@
+/*
+ * 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.jbws2991;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.common.W3CAddressingConstants;
+import org.jboss.test.ws.jaxws.common.WsaSOAPUtils;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest1;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest1Service;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest2;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest2Service;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest3;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest3Service;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest4;
+import org.jboss.test.ws.jaxws.jbws2991.generated.AddressingFeatureTest4Service;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS2991TestCase extends JBossWSTest
+{
+
+ private static final String NAMESPACEURI =
"http://addressingfeatureservice.org/wsdl";
+
+ private QName SERVICE1_QNAME = new QName(NAMESPACEURI,
"AddressingFeatureTest1Service");
+
+ private QName SERVICE2_QNAME = new QName(NAMESPACEURI,
"AddressingFeatureTest2Service");
+
+ private QName SERVICE3_QNAME = new QName(NAMESPACEURI,
"AddressingFeatureTest3Service");
+
+ private QName SERVICE4_QNAME = new QName(NAMESPACEURI,
"AddressingFeatureTest4Service");
+
+ private QName PORT_QNAME1 = new QName(NAMESPACEURI,
"AddressingFeatureTest1Port");
+
+ private QName PORT_QNAME2 = new QName(NAMESPACEURI,
"AddressingFeatureTest2Port");
+
+ private QName PORT_QNAME3 = new QName(NAMESPACEURI,
"AddressingFeatureTest3Port");
+
+ private QName PORT_QNAME4 = new QName(NAMESPACEURI,
"AddressingFeatureTest4Port");
+
+ private AddressingFeatureTest1 port1 = null;
+
+ private AddressingFeatureTest2 port2 = null;
+
+ private AddressingFeatureTest3 port3 = null;
+
+ private AddressingFeatureTest4 port4 = null;
+
+ private AddressingFeatureTest1 port5 = null;
+
+ private AddressingFeatureTest2 port6 = null;
+
+ private AddressingFeatureTest4 port7 = null;
+
+ private boolean initialized;
+
+ private WebServiceFeature[] enabledNotRequiredwsf =
+ {new AddressingFeature(true, false)};
+
+ private WebServiceFeature[] nonEnabledwsf =
+ {new AddressingFeature(false)};
+
+ private WebServiceFeature[] enabledRequiredwsf =
+ {new AddressingFeature(true, true)};
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2991TestCase.class,
"jaxws-jbws2991.war");
+ }
+
+ protected void setUp() throws Exception
+ {
+ if (!this.initialized)
+ {
+ this.initialized = true;
+
+ Service service = null;
+ URL wsdlURL = null;
+ // client side Addressing enabled/NotRequired; server side
Addressing/NotRequired
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint1?wsdl");
+ service = new AddressingFeatureTest1Service(wsdlURL, SERVICE1_QNAME);
+ port1 = service.getPort(PORT_QNAME1, AddressingFeatureTest1.class,
enabledNotRequiredwsf);
+
+ // client side Addressing enabled/NotRequired; server side Addressing/Required
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint2?wsdl");
+ service = new AddressingFeatureTest2Service(wsdlURL, SERVICE2_QNAME);
+ port2 = service.getPort(PORT_QNAME2, AddressingFeatureTest2.class,
enabledNotRequiredwsf);
+
+ // client side Addressing enabled/NotRequired; server side Addressing (using
default)
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint3?wsdl");
+ service = new AddressingFeatureTest3Service(wsdlURL, SERVICE3_QNAME);
+ port3 = service.getPort(PORT_QNAME3, AddressingFeatureTest3.class,
enabledNotRequiredwsf);
+
+ // client side Addressing enabled/NotRequired; server side Addressing off
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint4?wsdl");
+ service = new AddressingFeatureTest4Service(wsdlURL, SERVICE4_QNAME);
+ port4 = service.getPort(PORT_QNAME4, AddressingFeatureTest4.class,
enabledNotRequiredwsf);
+
+ // client side Addressing off; server side Addressing/NotRequired
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint1?wsdl");
+ service = new AddressingFeatureTest1Service(wsdlURL, SERVICE1_QNAME);
+ port5 = service.getPort(PORT_QNAME1, AddressingFeatureTest1.class,
nonEnabledwsf);
+
+ // client side Addressing off; server side Addressing/Required
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint2?wsdl");
+ service = new AddressingFeatureTest2Service(wsdlURL, SERVICE2_QNAME);
+ port6 = service.getPort(PORT_QNAME2, AddressingFeatureTest2.class,
nonEnabledwsf);
+
+ // client side Addressing enabled/Required; server side off
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2991/Endpoint4?wsdl");
+ service = new AddressingFeatureTest4Service(wsdlURL, SERVICE4_QNAME);
+ port7 = service.getPort(PORT_QNAME4, AddressingFeatureTest4.class,
enabledRequiredwsf);
+ }
+ }
+
+ public void testClientEnabledNotREQServerEnabledNotREQTest() throws Exception
+ {
+ // client side Addressing enabled/NotRequired; server side Addressing/NotRequired
+ port1.addNumbers(new Holder("ClientEnabledNotREQServerEnabledNotREQ"),
10, 10);
+ }
+
+ public void testClientEnabledNotREQServerEnabledREQTest() throws Exception
+ {
+ // client side Addressing enabled/NotRequired; server side Addressing/Required
+ port2.addNumbers(new Holder("ClientEnabledNotREQServerEnabledREQ"), 10,
10);
+ }
+
+ public void testClientEnabledNotREQServerUsingDefaultsTest() throws Exception
+ {
+ // client side Addressing enabled/NotRequired; Server side using defaults
+ port3.addNumbers(new Holder("ClientEnabledNotREQServerUsingDefaults"),
10, 10);
+ }
+
+ public void testClientEnabledNotREQServerNotEnabledTest() throws Exception
+ {
+ // client side Addressing enabled/NotRequired; Server NotEnabled
+ port4.addNumbers(new Holder("ClientEnabledNotREQServerNotEnabled"), 10,
10);
+ }
+
+ public void testClientNotEnabledServerEnabledNotREQTest() throws Exception
+ {
+ // Verify Addressing headers are NOT present on SOAPRequest and SOAPResponse
+ port5.addNumbers(new Holder("ClientNotEnabledServerEnabledNotREQ"), 10,
10);
+ }
+
+ public void testClientNotEnabledServerEnabledREQTest() throws Exception
+ {
+ // Verify MessageAddressingHeaderRequired soap fault is thrown by endpoint
+ try
+ {
+ port6.addNumbers(new Holder("ClientNotEnabledServerEnabledREQ"), 10,
10);
+ }
+ catch (SOAPFaultException sfe)
+ {
+ log.debug("Caught expected SOAPFaultException: " + sfe.getMessage());
+ log.debug("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe));
+ String faultString = WsaSOAPUtils.getFaultString(sfe);
+ if (W3CAddressingConstants.MAP_REQUIRED_TEXT.equals(faultString))
+ {
+ log.debug("Found expected FaultString: " + faultString);
+ }
+ else
+ {
+ throw new Exception("Found unexpected FaultString [" + faultString
+ "] Expected ["
+ + W3CAddressingConstants.MAP_REQUIRED_TEXT + "]");
+ }
+ if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe))
+ log.debug("SOAPFault contains expected faultcode
MessageAddressingHeaderRequired");
+ else
+ {
+ String faultcode = WsaSOAPUtils.getFaultCode(sfe);
+ throw new Exception("SOAPFault contains unexpected faultcode got: "
+ faultcode
+ + ", expected: MessageAddressingHeaderRequired");
+ }
+ String faultdetail[] = WsaSOAPUtils.getFaultDetail(sfe);
+ if (faultdetail != null)
+ {
+ log
+ .error("The SOAP 1.1 fault detail is only for use with faults
related to the body of a message and is therefore not used for SOAP 1.1 faults related to
processing of addressing headers.");
+ String output = "FaultDetail:";
+ for (int i = 0; faultdetail[i] != null; i++)
+ {
+ output += " " + faultdetail[i];
+ }
+ log.error("" + output);
+ }
+ else
+ {
+ log
+ .debug("The SOAP 1.1 fault detail is correctly not used, since
fault detail is only for use with faults related to the body of a message and is therefore
not used for SOAP 1.1 faults related to processing of addressing headers.");
+ }
+ }
+ }
+
+ public void testClientEnabledREQServerNotEnabledTest() throws Exception
+ {
+ // Verify MessageAddressingHeaderRequired soap fault is thrown by endpoint
+ try
+ {
+ port7.addNumbers(new Holder("ClientEnabledREQServerNotEnabled"), 10,
10);
+ }
+ catch (SOAPFaultException sfe)
+ {
+ log.debug("Caught Expected SOAPFaultException: " + sfe.getMessage());
+ SOAPFault sf = sfe.getFault();
+ String faultString = sf.getFaultString();
+ String faultCode = sf.getFaultCode();
+ System.out.println("faultString [" + faultString + "]");
+ System.out.println("faultCode [" + faultCode + "]");
+ QName faultCodeQName = sf.getFaultCodeAsQName();
+ String faultCodeQNameLocalPart = faultCodeQName.getLocalPart();
+ if
(!W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart().equals(faultCodeQNameLocalPart))
+ {
+ log.error("Caught expected SOAPFaultException, but with incorrect
FaultCode, expected ["
+ + W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart() + "],
Actual [" + faultCodeQNameLocalPart
+ + "]");
+ throw new Exception("afClientEnabledREQServerNotEnabledTest
failed", sfe);
+ }
+ else
+ {
+ log.debug("Caught expected SOAPFaultException with correct FaultCode,
expected ["
+ + W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart() + "],
Actual [" + faultCodeQNameLocalPart
+ + "]");
+ }
+ if (!W3CAddressingConstants.MAP_REQUIRED_TEXT.equals(faultString))
+ {
+ log.error("Caught expected SOAPFaultException, but with incorrect
FaultString set in FaultCode, expected ["
+ + W3CAddressingConstants.MAP_REQUIRED_TEXT + "], Actual [" +
faultString + "]");
+ throw new Exception("afClientEnabledREQServerNotEnabledTest
failed", sfe);
+ }
+ else
+ {
+ log.debug("Caught expected SOAPFaultException with correct FaultString
set in FaultCode, expected ["
+ + W3CAddressingConstants.MAP_REQUIRED_TEXT + "], Actual [" +
faultString + "]");
+ }
+ }
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/common/TestConstants.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/common/TestConstants.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/common/TestConstants.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,31 @@
+/*
+ * 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.jbws2991.common;
+
+public class TestConstants
+{
+ public static final String ADD_NUMBERS_IN_ACTION = "inputAction";
+
+ public static final String ADD_NUMBERS_OUT_ACTION = "outputAction";
+
+ public static final String ADD_NUMBERS_IN_ACTION4 =
"http://addressingfeatureservice.org/wsdl/AddressingFeatureTest4/addNumbersRequest";
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbers.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbers.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbers.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,122 @@
+/*
+ * 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.jbws2991.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 addNumbers complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="addNumbers">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element
ref="{http://addressingfeatureservice.org/xsd}testName"
minOccurs="0"/>
+ * <element
ref="{http://addressingfeatureservice.org/xsd}number1"/>
+ * <element
ref="{http://addressingfeatureservice.org/xsd}number2"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbers", propOrder = {
+ "testName",
+ "number1",
+ "number2"
+})
+public class AddNumbers {
+
+ @XmlElement(namespace = "http://addressingfeatureservice.org/xsd")
+ protected String testName;
+ @XmlElement(namespace = "http://addressingfeatureservice.org/xsd")
+ protected int number1;
+ @XmlElement(namespace = "http://addressingfeatureservice.org/xsd")
+ protected int number2;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbersResponse.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbersResponse.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddNumbersResponse.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,102 @@
+/*
+ * 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.jbws2991.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 addNumbersResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="addNumbersResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element
ref="{http://addressingfeatureservice.org/xsd}testName"
minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addNumbersResponse", propOrder = {
+ "_return",
+ "testName"
+})
+public class AddNumbersResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ protected int _return;
+ @XmlElement(namespace = "http://addressingfeatureservice.org/xsd")
+ protected String testName;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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/jbws2991/generated/AddressingFeatureTest1.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,71 @@
+/*
+ * 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.jbws2991.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.Holder;
+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 = "AddressingFeatureTest1", targetNamespace =
"http://addressingfeatureservice.org/wsdl")
+@HandlerChain(file = "AddressingFeatureTest1_handler.xml")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface AddressingFeatureTest1 {
+
+
+ /**
+ *
+ * @param number2
+ * @param number1
+ * @param testName
+ * @return
+ * returns int
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbers", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbers")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbersResponse")
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
+ Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number2);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,116 @@
+/*
+ * 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.jbws2991.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 = "AddressingFeatureTest1Service", targetNamespace =
"http://addressingfeatureservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest1Service.wsdl")
+@HandlerChain(file = "AddressingFeatureTest1Service_handler.xml")
+public class AddressingFeatureTest1Service
+ extends Service
+{
+
+ private final static URL ADDRESSINGFEATURETEST1SERVICE_WSDL_LOCATION;
+ private final static WebServiceException ADDRESSINGFEATURETEST1SERVICE_EXCEPTION;
+ private final static QName ADDRESSINGFEATURETEST1SERVICE_QNAME = new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest1Service");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest1Service.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ ADDRESSINGFEATURETEST1SERVICE_WSDL_LOCATION = url;
+ ADDRESSINGFEATURETEST1SERVICE_EXCEPTION = e;
+ }
+
+ public AddressingFeatureTest1Service() {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST1SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest1Service(WebServiceFeature... features) {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST1SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest1Service(URL wsdlLocation) {
+ super(wsdlLocation, ADDRESSINGFEATURETEST1SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest1Service(URL wsdlLocation, WebServiceFeature... features)
{
+ super(wsdlLocation, ADDRESSINGFEATURETEST1SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest1Service(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AddressingFeatureTest1Service(URL wsdlLocation, QName serviceName,
WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns AddressingFeatureTest1
+ */
+ @WebEndpoint(name = "AddressingFeatureTest1Port")
+ public AddressingFeatureTest1 getAddressingFeatureTest1Port() {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest1Port"), AddressingFeatureTest1.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 AddressingFeatureTest1
+ */
+ @WebEndpoint(name = "AddressingFeatureTest1Port")
+ public AddressingFeatureTest1 getAddressingFeatureTest1Port(WebServiceFeature...
features) {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest1Port"), AddressingFeatureTest1.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (ADDRESSINGFEATURETEST1SERVICE_EXCEPTION!= null) {
+ throw ADDRESSINGFEATURETEST1SERVICE_EXCEPTION;
+ }
+ return ADDRESSINGFEATURETEST1SERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1Service_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest1_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,71 @@
+/*
+ * 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.jbws2991.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.Holder;
+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 = "AddressingFeatureTest2", targetNamespace =
"http://addressingfeatureservice.org/wsdl")
+@HandlerChain(file = "AddressingFeatureTest2_handler.xml")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface AddressingFeatureTest2 {
+
+
+ /**
+ *
+ * @param number2
+ * @param number1
+ * @param testName
+ * @return
+ * returns int
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbers", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbers")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbersResponse")
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
+ Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number2);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,116 @@
+/*
+ * 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.jbws2991.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 = "AddressingFeatureTest2Service", targetNamespace =
"http://addressingfeatureservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest2Service.wsdl")
+@HandlerChain(file = "AddressingFeatureTest2Service_handler.xml")
+public class AddressingFeatureTest2Service
+ extends Service
+{
+
+ private final static URL ADDRESSINGFEATURETEST2SERVICE_WSDL_LOCATION;
+ private final static WebServiceException ADDRESSINGFEATURETEST2SERVICE_EXCEPTION;
+ private final static QName ADDRESSINGFEATURETEST2SERVICE_QNAME = new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest2Service");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest2Service.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ ADDRESSINGFEATURETEST2SERVICE_WSDL_LOCATION = url;
+ ADDRESSINGFEATURETEST2SERVICE_EXCEPTION = e;
+ }
+
+ public AddressingFeatureTest2Service() {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST2SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest2Service(WebServiceFeature... features) {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST2SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest2Service(URL wsdlLocation) {
+ super(wsdlLocation, ADDRESSINGFEATURETEST2SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest2Service(URL wsdlLocation, WebServiceFeature... features)
{
+ super(wsdlLocation, ADDRESSINGFEATURETEST2SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest2Service(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AddressingFeatureTest2Service(URL wsdlLocation, QName serviceName,
WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns AddressingFeatureTest2
+ */
+ @WebEndpoint(name = "AddressingFeatureTest2Port")
+ public AddressingFeatureTest2 getAddressingFeatureTest2Port() {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest2Port"), AddressingFeatureTest2.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 AddressingFeatureTest2
+ */
+ @WebEndpoint(name = "AddressingFeatureTest2Port")
+ public AddressingFeatureTest2 getAddressingFeatureTest2Port(WebServiceFeature...
features) {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest2Port"), AddressingFeatureTest2.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (ADDRESSINGFEATURETEST2SERVICE_EXCEPTION!= null) {
+ throw ADDRESSINGFEATURETEST2SERVICE_EXCEPTION;
+ }
+ return ADDRESSINGFEATURETEST2SERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2Service_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest2_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,71 @@
+/*
+ * 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.jbws2991.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.Holder;
+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 = "AddressingFeatureTest3", targetNamespace =
"http://addressingfeatureservice.org/wsdl")
+@HandlerChain(file = "AddressingFeatureTest3_handler.xml")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface AddressingFeatureTest3 {
+
+
+ /**
+ *
+ * @param number2
+ * @param number1
+ * @param testName
+ * @return
+ * returns int
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbers", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbers")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbersResponse")
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
+ Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number2);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,116 @@
+/*
+ * 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.jbws2991.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 = "AddressingFeatureTest3Service", targetNamespace =
"http://addressingfeatureservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest3Service.wsdl")
+@HandlerChain(file = "AddressingFeatureTest3Service_handler.xml")
+public class AddressingFeatureTest3Service
+ extends Service
+{
+
+ private final static URL ADDRESSINGFEATURETEST3SERVICE_WSDL_LOCATION;
+ private final static WebServiceException ADDRESSINGFEATURETEST3SERVICE_EXCEPTION;
+ private final static QName ADDRESSINGFEATURETEST3SERVICE_QNAME = new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest3Service");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest3Service.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ ADDRESSINGFEATURETEST3SERVICE_WSDL_LOCATION = url;
+ ADDRESSINGFEATURETEST3SERVICE_EXCEPTION = e;
+ }
+
+ public AddressingFeatureTest3Service() {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST3SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest3Service(WebServiceFeature... features) {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST3SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest3Service(URL wsdlLocation) {
+ super(wsdlLocation, ADDRESSINGFEATURETEST3SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest3Service(URL wsdlLocation, WebServiceFeature... features)
{
+ super(wsdlLocation, ADDRESSINGFEATURETEST3SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest3Service(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AddressingFeatureTest3Service(URL wsdlLocation, QName serviceName,
WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns AddressingFeatureTest3
+ */
+ @WebEndpoint(name = "AddressingFeatureTest3Port")
+ public AddressingFeatureTest3 getAddressingFeatureTest3Port() {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest3Port"), AddressingFeatureTest3.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 AddressingFeatureTest3
+ */
+ @WebEndpoint(name = "AddressingFeatureTest3Port")
+ public AddressingFeatureTest3 getAddressingFeatureTest3Port(WebServiceFeature...
features) {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest3Port"), AddressingFeatureTest3.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (ADDRESSINGFEATURETEST3SERVICE_EXCEPTION!= null) {
+ throw ADDRESSINGFEATURETEST3SERVICE_EXCEPTION;
+ }
+ return ADDRESSINGFEATURETEST3SERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3Service_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest3_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,69 @@
+/*
+ * 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.jbws2991.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.Holder;
+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 = "AddressingFeatureTest4", targetNamespace =
"http://addressingfeatureservice.org/wsdl")
+@HandlerChain(file = "AddressingFeatureTest4_handler.xml")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface AddressingFeatureTest4 {
+
+
+ /**
+ *
+ * @param number2
+ * @param number1
+ * @param testName
+ * @return
+ * returns int
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "addNumbers", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbers")
+ @ResponseWrapper(localName = "addNumbersResponse", targetNamespace =
"http://addressingfeatureservice.org/wsdl", className =
"org.jboss.test.ws.jaxws.jbws2991.generated.AddNumbersResponse")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
+ Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd")
+ int number2);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,116 @@
+/*
+ * 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.jbws2991.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 = "AddressingFeatureTest4Service", targetNamespace =
"http://addressingfeatureservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest4Service.wsdl")
+@HandlerChain(file = "AddressingFeatureTest4Service_handler.xml")
+public class AddressingFeatureTest4Service
+ extends Service
+{
+
+ private final static URL ADDRESSINGFEATURETEST4SERVICE_WSDL_LOCATION;
+ private final static WebServiceException ADDRESSINGFEATURETEST4SERVICE_EXCEPTION;
+ private final static QName ADDRESSINGFEATURETEST4SERVICE_QNAME = new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest4Service");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/tags/JBoss_6_0_0_20100216-M2/build/target/jboss-6.0.0.20100216-M2/bin/AddressingFeatureTest4Service.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ ADDRESSINGFEATURETEST4SERVICE_WSDL_LOCATION = url;
+ ADDRESSINGFEATURETEST4SERVICE_EXCEPTION = e;
+ }
+
+ public AddressingFeatureTest4Service() {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST4SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest4Service(WebServiceFeature... features) {
+ super(__getWsdlLocation(), ADDRESSINGFEATURETEST4SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest4Service(URL wsdlLocation) {
+ super(wsdlLocation, ADDRESSINGFEATURETEST4SERVICE_QNAME);
+ }
+
+ public AddressingFeatureTest4Service(URL wsdlLocation, WebServiceFeature... features)
{
+ super(wsdlLocation, ADDRESSINGFEATURETEST4SERVICE_QNAME, features);
+ }
+
+ public AddressingFeatureTest4Service(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AddressingFeatureTest4Service(URL wsdlLocation, QName serviceName,
WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns AddressingFeatureTest4
+ */
+ @WebEndpoint(name = "AddressingFeatureTest4Port")
+ public AddressingFeatureTest4 getAddressingFeatureTest4Port() {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest4Port"), AddressingFeatureTest4.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 AddressingFeatureTest4
+ */
+ @WebEndpoint(name = "AddressingFeatureTest4Port")
+ public AddressingFeatureTest4 getAddressingFeatureTest4Port(WebServiceFeature...
features) {
+ return super.getPort(new
QName("http://addressingfeatureservice.org/wsdl",
"AddressingFeatureTest4Port"), AddressingFeatureTest4.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (ADDRESSINGFEATURETEST4SERVICE_EXCEPTION!= null) {
+ throw ADDRESSINGFEATURETEST4SERVICE_EXCEPTION;
+ }
+ return ADDRESSINGFEATURETEST4SERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4Service_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/AddressingFeatureTest4_handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/ObjectFactory.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/ObjectFactory.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/ObjectFactory.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,121 @@
+/*
+ * 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.jbws2991.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.jbws2991.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 _Number1_QNAME = new
QName("http://addressingfeatureservice.org/xsd", "number1");
+ private final static QName _TestName_QNAME = new
QName("http://addressingfeatureservice.org/xsd", "testName");
+ private final static QName _AddNumbers_QNAME = new
QName("http://addressingfeatureservice.org/wsdl", "addNumbers");
+ private final static QName _Number2_QNAME = new
QName("http://addressingfeatureservice.org/xsd", "number2");
+ private final static QName _AddNumbersResponse_QNAME = new
QName("http://addressingfeatureservice.org/wsdl",
"addNumbersResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws2991.generated
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link AddNumbersResponse }
+ *
+ */
+ public AddNumbersResponse createAddNumbersResponse() {
+ return new AddNumbersResponse();
+ }
+
+ /**
+ * Create an instance of {@link AddNumbers }
+ *
+ */
+ public AddNumbers createAddNumbers() {
+ return new AddNumbers();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://addressingfeatureservice.org/xsd", name
= "number1")
+ public JAXBElement<Integer> createNumber1(Integer value) {
+ return new JAXBElement<Integer>(_Number1_QNAME, Integer.class, null,
value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://addressingfeatureservice.org/xsd", name
= "testName")
+ public JAXBElement<String> createTestName(String value) {
+ return new JAXBElement<String>(_TestName_QNAME, String.class, null,
value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddNumbers }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://addressingfeatureservice.org/wsdl",
name = "addNumbers")
+ public JAXBElement<AddNumbers> createAddNumbers(AddNumbers value) {
+ return new JAXBElement<AddNumbers>(_AddNumbers_QNAME, AddNumbers.class,
null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://addressingfeatureservice.org/xsd", name
= "number2")
+ public JAXBElement<Integer> createNumber2(Integer value) {
+ return new JAXBElement<Integer>(_Number2_QNAME, Integer.class, null,
value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddNumbersResponse
}{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://addressingfeatureservice.org/wsdl",
name = "addNumbersResponse")
+ public JAXBElement<AddNumbersResponse>
createAddNumbersResponse(AddNumbersResponse value) {
+ return new JAXBElement<AddNumbersResponse>(_AddNumbersResponse_QNAME,
AddNumbersResponse.class, null, value);
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/package-info.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/package-info.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/generated/package-info.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,23 @@
+/*
+ * 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://addressingfeatureservice.org/wsdl", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws2991.generated;
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureException.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureException.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureException.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,45 @@
+/*
+ * 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.jbws2991.service;
+
+import javax.xml.ws.WebServiceException;
+
+public class AddressingFeatureException extends WebServiceException
+{
+ String detail;
+
+ public AddressingFeatureException(String message)
+ {
+ super(message);
+ }
+
+ public AddressingFeatureException(String message, String detail)
+ {
+ super(message);
+ this.detail = detail;
+ }
+
+ public String getDetail()
+ {
+ return detail;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl1.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl1.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl1.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,53 @@
+/*
+ * 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.jbws2991.service;
+
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.HandlerChain;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Action;
+import javax.xml.ws.soap.Addressing;
+
+@WebService(name = "AddressingFeatureTest1", portName =
"AddressingFeatureTest1Port", targetNamespace =
"http://addressingfeatureservice.org/wsdl", serviceName =
"AddressingFeatureTest1Service", wsdlLocation =
"WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = true, required = false)
+@HandlerChain(name = "", file = "server-handler.xml")
+public class AddressingFeatureTestImpl1
+{
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number2)
+ {
+ if (number1 < 0 || number2 < 0)
+ {
+ throw new AddressingFeatureException("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/jbws2991/service/AddressingFeatureTestImpl2.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl2.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl2.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,53 @@
+/*
+ * 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.jbws2991.service;
+
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.HandlerChain;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Action;
+import javax.xml.ws.soap.Addressing;
+
+@WebService(name = "AddressingFeatureTest2", portName =
"AddressingFeatureTest2Port", targetNamespace =
"http://addressingfeatureservice.org/wsdl", serviceName =
"AddressingFeatureTest2Service", wsdlLocation =
"WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = true, required = true)
+@HandlerChain(name = "", file = "server-handler.xml")
+public class AddressingFeatureTestImpl2
+{
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number2)
+ {
+ if (number1 < 0 || number2 < 0)
+ {
+ throw new AddressingFeatureException("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/jbws2991/service/AddressingFeatureTestImpl3.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl3.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl3.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,53 @@
+/*
+ * 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.jbws2991.service;
+
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.HandlerChain;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Action;
+import javax.xml.ws.soap.Addressing;
+
+@WebService(name = "AddressingFeatureTest3", portName =
"AddressingFeatureTest3Port", targetNamespace =
"http://addressingfeatureservice.org/wsdl", serviceName =
"AddressingFeatureTest3Service", wsdlLocation =
"WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing
+@HandlerChain(name = "", file = "server-handler.xml")
+public class AddressingFeatureTestImpl3
+{
+ @Action(input = "inputAction", output = "outputAction")
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number2)
+ {
+ if (number1 < 0 || number2 < 0)
+ {
+ throw new AddressingFeatureException("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/jbws2991/service/AddressingFeatureTestImpl4.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl4.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/AddressingFeatureTestImpl4.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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.jbws2991.service;
+
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.HandlerChain;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+import javax.xml.ws.soap.Addressing;
+
+@WebService(name = "AddressingFeatureTest4", portName =
"AddressingFeatureTest4Port", targetNamespace =
"http://addressingfeatureservice.org/wsdl", serviceName =
"AddressingFeatureTest4Service", wsdlLocation =
"WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = false)
+@HandlerChain(name = "", file = "server-handler.xml")
+public class AddressingFeatureTestImpl4
+{
+ public int addNumbers(
+ @WebParam(name = "testName", targetNamespace =
"http://addressingfeatureservice.org/xsd", mode = WebParam.Mode.INOUT)
Holder<String> testName,
+ @WebParam(name = "number1", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number1,
+ @WebParam(name = "number2", targetNamespace =
"http://addressingfeatureservice.org/xsd") int number2)
+ {
+ if (number1 < 0 || number2 < 0)
+ {
+ throw new AddressingFeatureException("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/jbws2991/service/ServerSOAPHandler.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/ServerSOAPHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/ServerSOAPHandler.java 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,164 @@
+/*
+ * 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.jbws2991.service;
+
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.test.ws.jaxws.common.ActionNotSupportedException;
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws2991.common.TestConstants;
+
+public class ServerSOAPHandler extends WsaBaseSOAPHandler
+{
+ String testName = null;
+
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String
action)
+ {
+ if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerEnabledNotREQ"))
+ {
+ verifyClientEnabledNotREQServerEnabledNotREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerEnabledREQ"))
+ {
+ verifyClientEnabledNotREQServerEnabledREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerUsingDefaults"))
+ {
+ verifyClientEnabledNotREQServerUsingDefaults(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledNotREQServerNotEnabled"))
+ {
+ verifyClientEnabledNotREQServerNotEnabled(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientNotEnabledServerEnabledNotREQ"))
+ {
+ verifyClientNotEnabledServerEnabledNotREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientNotEnabledServerEnabledREQ"))
+ {
+ verifyClientNotEnabledServerEnabledREQ(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"ClientEnabledREQServerNotEnabled"))
+ {
+ verifyClientEnabledREQServerNotEnabled(context, action);
+ }
+ }
+
+ private void verifyClientEnabledNotREQServerEnabledNotREQ(SOAPMessageContext context,
String action)
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerUsingDefaults(SOAPMessageContext context,
String action)
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientNotEnabledServerEnabledNotREQ(SOAPMessageContext context,
String action)
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerEnabledREQ(SOAPMessageContext context,
String action)
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientNotEnabledServerEnabledREQ(SOAPMessageContext context, String
action)
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+
+ private void verifyClientEnabledNotREQServerNotEnabled(SOAPMessageContext context,
String action)
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyClientEnabledREQServerNotEnabled(SOAPMessageContext context, String
action)
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+
+ private void verifyAction(String action)
+ {
+ System.out.println("ServerSOAPHandler.verifyAction: [action=" + action +
"]");
+ if (testName.equals("ClientEnabledNotREQServerNotEnabled") ||
testName.equals("ClientEnabledREQServerNotEnabled"))
+ {
+ if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION4))
+ {
+ throw new ActionNotSupportedException("Expected:" +
TestConstants.ADD_NUMBERS_IN_ACTION4 + ", Actual:"
+ + action);
+ }
+ }
+ else if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION))
+ {
+ throw new ActionNotSupportedException("Expected:" +
TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action);
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ System.out.println("ServerSOAPHandler.checkAddressingHeadersExist");
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundMessageIdExist(context);
+ checkInboundReplyToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String
action)
+ {
+
System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist");
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundMessageIdDoesNotExist(context);
+ checkInboundReplyToDoesNotExist(context);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ testName = (String) context.get("test.name");
+ System.out.println("ServerSOAPHandler.getAction(): testName=" +
testName);
+ if (testName == null)
+ return super.getAction(context);
+ /* Headers MUST be present on SOAPRequest */
+ else if (testName.equals("ClientEnabledNotREQServerEnabledNotREQ")
+ || testName.equals("ClientEnabledNotREQServerEnabledREQ")
+ || testName.equals("ClientEnabledNotREQServerUsingDefaults")
+ || testName.equals("ClientEnabledREQServerNotEnabled"))
+ return super.getAction(context);
+ /* Headers MUST NOT be present on SOAPRequest */
+ else if (testName.equals("ClientEnabledNotREQServerNotEnabled")
+ || testName.equals("ClientNotEnabledServerEnabledREQ")
+ || testName.equals("ClientNotEnabledServerEnabledNotREQ"))
+ return super.getActionDoesNotExist(context);
+ /* Fault case just return null */
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ServerSOAPHandler";
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/server-handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/server-handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2991/service/server-handler.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jws:handler-chains
xmlns:jws="http://java.sun.com/xml/ns/javaee">
+
+ <jws:handler-chain>
+ <jws:handler>
+ <jws:handler-name>ServerSOAPHandler</jws:handler-name>
+
<jws:handler-class>org.jboss.test.ws.jaxws.jbws2991.service.ServerSOAPHandler</jws:handler-class>
+ </jws:handler>
+ </jws:handler-chain>
+
+</jws:handler-chains>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/jboss-web.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/jboss-web.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -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-jbws2991</context-root>
+</jboss-web>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/web.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/web.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,46 @@
+<?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>Endpoint1</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2991.service.AddressingFeatureTestImpl1</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Endpoint2</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2991.service.AddressingFeatureTestImpl2</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Endpoint3</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2991.service.AddressingFeatureTestImpl3</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Endpoint4</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2991.service.AddressingFeatureTestImpl4</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint1</servlet-name>
+ <url-pattern>/Endpoint1</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint2</servlet-name>
+ <url-pattern>/Endpoint2</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint3</servlet-name>
+ <url-pattern>/Endpoint3</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint4</servlet-name>
+ <url-pattern>/Endpoint4</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="AddressingFeatureTest1Service"
targetNamespace="http://addressingfeatureservice.org/wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:wsa="http://www.w3.org/2007/05/addressing/metadata"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/wsdl"
version="1.0"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import
namespace="http://addressingfeatureservice.org/xsd"/>
+ <xs:element name="addNumbers" type="tns:addNumbers"/>
+ <xs:element name="addNumbersResponse"
type="tns:addNumbersResponse"/>
+ <xs:complexType name="addNumbers">
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ <xs:element ref="ns1:number1"/>
+ <xs:element ref="ns1:number2"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="addNumbersResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/xsd"
version="1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="number1" type="xs:int"/>
+ <xs:element name="number2" type="xs:int"/>
+ <xs:element name="testName" type="xs:string"/>
+ </xs:schema>
+ </types>
+ <message name="AddressingFeatureTest1_addNumbers">
+ <part element="tns:addNumbers" name="addNumbers"/>
+ </message>
+ <message name="AddressingFeatureTest1_addNumbersResponse">
+ <part element="tns:addNumbersResponse"
name="addNumbersResponse"/>
+ </message>
+ <portType name="AddressingFeatureTest1">
+ <operation name="addNumbers" parameterOrder="addNumbers">
+ <input message="tns:AddressingFeatureTest1_addNumbers"
wsa:Action="inputAction"/>
+ <output message="tns:AddressingFeatureTest1_addNumbersResponse"
wsa:Action="outputAction"/>
+ </operation>
+ </portType>
+ <binding name="AddressingFeatureTest1Binding"
type="tns:AddressingFeatureTest1">
+ <wsp:PolicyReference URI="#6a15b066-f8b5-434a-972d-b1c049bb6f97"
xmlns:wsp="http://www.w3.org/ns/ws-policy"/>
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="addNumbers">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingFeatureTest1Service">
+ <port binding="tns:AddressingFeatureTest1Binding"
name="AddressingFeatureTest1Port">
+ <soap:address
location="http://127.0.0.1:8080/jaxws-jbws2991/endpoint1"/>
+ </port>
+ </service>
+ <wsp:Policy wsu:Id="6a15b066-f8b5-434a-972d-b1c049bb6f97"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wsam:Addressing wsp:Optional="true"
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/jbws2991/WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="AddressingFeatureTest2Service"
targetNamespace="http://addressingfeatureservice.org/wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:wsa="http://www.w3.org/2007/05/addressing/metadata"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/wsdl"
version="1.0"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import
namespace="http://addressingfeatureservice.org/xsd"/>
+ <xs:element name="addNumbers" type="tns:addNumbers"/>
+ <xs:element name="addNumbersResponse"
type="tns:addNumbersResponse"/>
+ <xs:complexType name="addNumbers">
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ <xs:element ref="ns1:number1"/>
+ <xs:element ref="ns1:number2"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="addNumbersResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/xsd"
version="1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="number1" type="xs:int"/>
+ <xs:element name="number2" type="xs:int"/>
+ <xs:element name="testName" type="xs:string"/>
+ </xs:schema>
+ </types>
+ <message name="AddressingFeatureTest2_addNumbersResponse">
+ <part element="tns:addNumbersResponse"
name="addNumbersResponse"/>
+ </message>
+ <message name="AddressingFeatureTest2_addNumbers">
+ <part element="tns:addNumbers" name="addNumbers"/>
+ </message>
+ <portType name="AddressingFeatureTest2">
+ <operation name="addNumbers" parameterOrder="addNumbers">
+ <input message="tns:AddressingFeatureTest2_addNumbers"
wsa:Action="inputAction"/>
+ <output message="tns:AddressingFeatureTest2_addNumbersResponse"
wsa:Action="outputAction"/>
+ </operation>
+ </portType>
+ <binding name="AddressingFeatureTest2Binding"
type="tns:AddressingFeatureTest2">
+ <wsp:PolicyReference URI="#d2a82c23-bc88-47c8-9ae1-c88aa093e9cb"
xmlns:wsp="http://www.w3.org/ns/ws-policy"/>
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="addNumbers">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingFeatureTest2Service">
+ <port binding="tns:AddressingFeatureTest2Binding"
name="AddressingFeatureTest2Port">
+ <soap:address
location="http://127.0.0.1:8080/jaxws-jbws2991/endpoint2"/>
+ </port>
+ </service>
+ <wsp:Policy wsu:Id="d2a82c23-bc88-47c8-9ae1-c88aa093e9cb"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <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/jbws2991/WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="AddressingFeatureTest3Service"
targetNamespace="http://addressingfeatureservice.org/wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:wsa="http://www.w3.org/2007/05/addressing/metadata"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/wsdl"
version="1.0"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import
namespace="http://addressingfeatureservice.org/xsd"/>
+ <xs:element name="addNumbers" type="tns:addNumbers"/>
+ <xs:element name="addNumbersResponse"
type="tns:addNumbersResponse"/>
+ <xs:complexType name="addNumbers">
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ <xs:element ref="ns1:number1"/>
+ <xs:element ref="ns1:number2"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="addNumbersResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/xsd"
version="1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="number1" type="xs:int"/>
+ <xs:element name="number2" type="xs:int"/>
+ <xs:element name="testName" type="xs:string"/>
+ </xs:schema>
+ </types>
+ <message name="AddressingFeatureTest3_addNumbers">
+ <part element="tns:addNumbers" name="addNumbers"/>
+ </message>
+ <message name="AddressingFeatureTest3_addNumbersResponse">
+ <part element="tns:addNumbersResponse"
name="addNumbersResponse"/>
+ </message>
+ <portType name="AddressingFeatureTest3">
+ <operation name="addNumbers" parameterOrder="addNumbers">
+ <input message="tns:AddressingFeatureTest3_addNumbers"
wsa:Action="inputAction"/>
+ <output message="tns:AddressingFeatureTest3_addNumbersResponse"
wsa:Action="outputAction"/>
+ </operation>
+ </portType>
+ <binding name="AddressingFeatureTest3Binding"
type="tns:AddressingFeatureTest3">
+ <wsp:PolicyReference URI="#a8e913f4-7baa-4171-99ef-e4eb15d09be8"
xmlns:wsp="http://www.w3.org/ns/ws-policy"/>
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="addNumbers">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingFeatureTest3Service">
+ <port binding="tns:AddressingFeatureTest3Binding"
name="AddressingFeatureTest3Port">
+ <soap:address
location="http://127.0.0.1:8080/jaxws-jbws2991/endpoint3"/>
+ </port>
+ </service>
+ <wsp:Policy wsu:Id="a8e913f4-7baa-4171-99ef-e4eb15d09be8"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wsam:Addressing wsp:Optional="true"
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/jbws2991/WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2991/WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="AddressingFeatureTest4Service"
targetNamespace="http://addressingfeatureservice.org/wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/xsd"
version="1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="number1" type="xs:int"/>
+ <xs:element name="number2" type="xs:int"/>
+ <xs:element name="testName" type="xs:string"/>
+ </xs:schema>
+ <xs:schema
targetNamespace="http://addressingfeatureservice.org/wsdl"
version="1.0"
xmlns:ns1="http://addressingfeatureservice.org/xsd"
xmlns:tns="http://addressingfeatureservice.org/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import
namespace="http://addressingfeatureservice.org/xsd"/>
+ <xs:element name="addNumbers" type="tns:addNumbers"/>
+ <xs:element name="addNumbersResponse"
type="tns:addNumbersResponse"/>
+ <xs:complexType name="addNumbers">
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ <xs:element ref="ns1:number1"/>
+ <xs:element ref="ns1:number2"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="addNumbersResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ <xs:element minOccurs="0" ref="ns1:testName"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="AddressingFeatureTest4_addNumbersResponse">
+ <part element="tns:addNumbersResponse"
name="addNumbersResponse"/>
+ </message>
+ <message name="AddressingFeatureTest4_addNumbers">
+ <part element="tns:addNumbers" name="addNumbers"/>
+ </message>
+ <portType name="AddressingFeatureTest4">
+ <operation name="addNumbers" parameterOrder="addNumbers">
+ <input message="tns:AddressingFeatureTest4_addNumbers"/>
+ <output message="tns:AddressingFeatureTest4_addNumbersResponse"/>
+ </operation>
+ </portType>
+ <binding name="AddressingFeatureTest4Binding"
type="tns:AddressingFeatureTest4">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="addNumbers">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingFeatureTest4Service">
+ <port binding="tns:AddressingFeatureTest4Binding"
name="AddressingFeatureTest4Port">
+ <soap:address
location="http://127.0.0.1:8080/jaxws-jbws2991/endpoint4"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile1.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile1.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile1.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="AddressingFeatureTest1Service.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.jbws2991.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+
<javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.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://addressingfeatureservice.org/xsd']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+ <jaxws:bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://addressingfeatureservice.org/wsdl']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+
+</jaxws:bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile2.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile2.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile2.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="AddressingFeatureTest2Service.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.jbws2991.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+
<javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.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://addressingfeatureservice.org/xsd']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+ <jaxws:bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://addressingfeatureservice.org/wsdl']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+
+</jaxws:bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile3.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile3.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile3.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="AddressingFeatureTest3Service.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.jbws2991.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+
<javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.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://addressingfeatureservice.org/xsd']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+ <jaxws:bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://addressingfeatureservice.org/wsdl']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+
+</jaxws:bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile4.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile4.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2991/customfile4.xml 2010-04-13
10:00:13 UTC (rev 11975)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="AddressingFeatureTest4Service.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.jbws2991.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+
<javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2991.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://addressingfeatureservice.org/xsd']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+ <jaxws:bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://addressingfeatureservice.org/wsdl']">
+ <jaxb:schemaBindings>
+ <jaxb:package
name="org.jboss.test.ws.jaxws.jbws2991.generated"/>
+ </jaxb:schemaBindings>
+ </jaxws:bindings>
+
+</jaxws:bindings>