Author: richard.opalka(a)jboss.com
Date: 2010-10-06 04:36:19 -0400 (Wed, 06 Oct 2010)
New Revision: 13059
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/resources/jaxws/jbws3134/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3134] providing annotation driven test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-10-04 17:58:22 UTC
(rev 13058)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-10-06 08:36:19 UTC
(rev 13059)
@@ -1084,6 +1084,34 @@
</metainf>
</jar>
+ <!-- jaxws-jbws3134 -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3134-addrfeaturesviaann-endpoint.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/*.xml" />
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF">
+ <include name="wsdl/**" />
+ </webinf>
+ </war>
+
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3134-addrfeaturesviaann-servlet.war"
needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/*.xml"
/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml" />
+ </webinf>
+ </war>
+
<!-- jaxws-endpoint-servlet -->
<war warfile="${tests.output.dir}/test-libs/jaxws-endpoint-servlet.war"
webxml="${tests.output.dir}/test-resources/jaxws/endpoint/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,93 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+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.jbws3134.AddrFeaturesViaAnn.common.TestConstants;
+
+public class ClientSOAPHandler extends WsaBaseSOAPHandler
+{
+
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String
action)
+ {
+ System.out.println("ClientSOAPHandler.checkInboundAction: [operation=" +
oper + ", input action=" + action + "]");
+ if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ }
+
+ private void verifyAction(String action)
+ {
+ if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION))
+ {
+ throw new ActionNotSupportedException("Expected:" +
TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action);
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundRelatesToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String
action)
+ {
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundRelatesToDoesNotExist(context);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ System.out.println("ClientSOAPHandler.getAction(): testName=" +
testName);
+ if (testName == null)
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ return super.getAction(context);
+ else if
(testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")
+ ||
testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ return super.getActionDoesNotExist(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ClientSOAPHandler";
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,221 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3134TestCase extends JBossWSTest
+{
+ private static final URL servletURL;
+
+ static
+ {
+ try
+ {
+ servletURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3134-addrfeaturesviaann-servlet/ServletTest");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3134TestCase.class,
"jaxws-jbws3134-addrfeaturesviaann-endpoint.war,jaxws-jbws3134-addrfeaturesviaann-servlet.war");
+ }
+
+ public void testVerifyAddrHeadersExistForRequiredEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyAddrHeadersExistForRequiredEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers DO NOT Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersDoNotExistForDisabledEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers DO NOT Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersMayExistForEnabledEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyAddrHeadersMayExistForEnabledEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Unexpected failure occurred");
+ }
+ }
+
+ public void testVerifyExceptionThrownForRequiredEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyExceptionThrownForRequiredEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Exception was not thrown back");
+ }
+ else
+ log.debug("Caught expected Exception");
+ }
+
+ public void testVerifyAddrHeadersDoNotExistForDisabledEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers DO NOT Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersMayExistForEnabledEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST",
"VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Unexpected failure occurred");
+ }
+ }
+
+ private URLConnection sendPostData(Properties p, URL url) throws IOException
+ {
+ URLConnection urlConn = url.openConnection();
+ String argString = this.toEncodedString(p);
+ urlConn.setDoOutput(true);
+ urlConn.setDoInput(true);
+ urlConn.setUseCaches(false);
+ DataOutputStream out = new DataOutputStream(urlConn.getOutputStream());
+ out.writeBytes(argString);
+ out.flush();
+ out.close();
+ return urlConn;
+ }
+
+ @SuppressWarnings(
+ {"deprecation", "rawtypes"})
+ private String toEncodedString(Properties args)
+ {
+ StringBuffer buf = new StringBuffer();
+ Enumeration names = args.propertyNames();
+ while (names.hasMoreElements())
+ {
+ String name = (String) names.nextElement();
+ String value = args.getProperty(name);
+
buf.append(URLEncoder.encode(name)).append("=").append(URLEncoder.encode(value));
+ if (names.hasMoreElements())
+ buf.append("&");
+ }
+ return buf.toString();
+ }
+
+ private Properties getResponseProperties(String string) throws IOException
+ {
+ Properties requestProperties;
+ ByteArrayInputStream in;
+ byte[] bytes;
+ requestProperties = new Properties();
+ bytes = string.getBytes();
+ in = new ByteArrayInputStream(bytes);
+ requestProperties.load(in);
+ in.close();
+ return requestProperties;
+ }
+
+ private Properties getResponseProperties(URLConnection connection) throws IOException
+ {
+ Properties requestProperties;
+ String input;
+ input = getResponse(connection);
+ requestProperties = getResponseProperties(input);
+ return requestProperties;
+ }
+
+ private String getResponse(URLConnection connection) throws IOException
+ {
+ StringBuffer content;
+ BufferedReader in;
+ InputStream instream = connection.getInputStream();
+ InputStreamReader inreader = new InputStreamReader(instream);
+ in = new BufferedReader(inreader);
+ content = new StringBuffer(1024);
+ char[] chars = new char[1024];
+ int length = 0;
+ while (length != -1)
+ {
+ content.append(chars, 0, length);
+ length = in.read(chars, 0, chars.length);
+ }
+ instream.close();
+ inreader.close();
+ in.close();
+ return content.toString();
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,288 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.Addressing;
+
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.Echo;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.Echo2;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.EchoService;
+
+@SuppressWarnings("serial")
+@WebServlet("/ServletTest")
+public class ServletClient extends HttpServlet
+{
+
+ private Properties requestProperties = null;
+
+ @Addressing
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsdefaultechoport", value =
EchoService.class)
+ Echo defaultEchoPort = null;
+
+ @Addressing(enabled = true)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsenabledechoport", value =
EchoService.class)
+ Echo enabledEchoPort = null;
+
+ @Addressing(enabled = true, required = true)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsrequiredechoport", value =
EchoService.class)
+ Echo requiredEchoPort = null;
+
+ @Addressing(enabled = false)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsdisabledechoport", value =
EchoService.class)
+ Echo disabledEchoPort = null;
+
+ @Addressing
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsdefaultecho2port", value =
EchoService.class)
+ Echo2 defaultEcho2Port = null;
+
+ @Addressing(enabled = true)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsenabledecho2port", value =
EchoService.class)
+ Echo2 enabledEcho2Port = null;
+
+ @Addressing(enabled = true, required = true)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsrequiredecho2port", value =
EchoService.class)
+ Echo2 requiredEcho2Port = null;
+
+ @Addressing(enabled = false)
+ @WebServiceRef(name =
"service/wsaddrfeaturestestusingannotationsdisabledecho2port", value =
EchoService.class)
+ Echo2 disabledEcho2Port = null;
+
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsservice")
+ EchoService service = null;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ System.out.println("ServletClient:init()");
+ System.out.println("ServletClient DEBUG: service=" + service);
+ System.out.println("ServletClient DEBUG: defaultEchoPort=" +
defaultEchoPort);
+ System.out.println("ServletClient DEBUG: enabledEchoPort=" +
enabledEchoPort);
+ System.out.println("ServletClient DEBUG: requiredEchoPort=" +
requiredEchoPort);
+ System.out.println("ServletClient DEBUG: disabledEchoPort=" +
disabledEchoPort);
+ System.out.println("ServletClient DEBUG: defaultEcho2Port=" +
defaultEcho2Port);
+ System.out.println("ServletClient DEBUG: enabledEcho2Port=" +
enabledEcho2Port);
+ System.out.println("ServletClient DEBUG: requiredEcho2Port=" +
requiredEcho2Port);
+ System.out.println("ServletClient DEBUG: disabledEcho2Port=" +
disabledEcho2Port);
+ if (service == null || defaultEchoPort == null || enabledEchoPort == null ||
requiredEchoPort == null
+ || disabledEchoPort == null || defaultEcho2Port == null || enabledEcho2Port
== null
+ || requiredEcho2Port == null || disabledEcho2Port == null)
+ {
+ throw new ServletException("init() failed: port injection failed");
+ }
+ }
+
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ Properties p = new Properties();
+ res.setContentType("text/plain");
+ PrintWriter out = res.getWriter();
+
+ try
+ {
+ String test = requestProperties.getProperty("TEST");
+ System.out.println("doGet: test to execute is: " + test);
+ if (test.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ if (VerifyAddrHeadersExistForRequiredEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if
(test.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ if (VerifyAddrHeadersDoNotExistForDisabledEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyAddrHeadersMayExistForEnabledEchoPort"))
+ {
+ if (VerifyAddrHeadersMayExistForEnabledEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyExceptionThrownForRequiredEcho2Port"))
+ {
+ if (VerifyExceptionThrownForRequiredEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if
(test.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ if (VerifyAddrHeadersDoNotExistForDisabledEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else
+ {
+ if (VerifyAddrHeadersMayExistForEnabledEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ p.list(out);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(out);
+ System.out.println("doGet: Exception: " + e);
+ e.printStackTrace();
+ p.setProperty("TESTRESULT", "fail");
+ p.list(out);
+ }
+ out.close();
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ requestProperties = new Properties();
+ @SuppressWarnings("rawtypes")
+ Enumeration enumlist = req.getParameterNames();
+ while (enumlist.hasMoreElements())
+ {
+ String name = (String) enumlist.nextElement();
+ String value = req.getParameter(name);
+ requestProperties.setProperty(name, value);
+ }
+
+ doGet(req, res);
+ requestProperties = null;
+ }
+
+ private boolean VerifyAddrHeadersExistForRequiredEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Addressing headers MUST be present on the
SOAPRequest/SOAPResponse");
+ System.out.println("VerifyAddrHeadersExistForRequiredEchoPort");
+ Holder<String> testName = new
Holder<String>("VerifyAddrHeadersExistForRequiredEchoPort");
+ requiredEchoPort.echo("Echo from ServletClient on requiredEchoPort",
testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Addressing headers MUST NOT be present on the
SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ Holder<String> testName = new
Holder<String>("VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ disabledEchoPort.echo("Echo from ServletClient on disabledEchoPort",
testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersMayExistForEnabledEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Addressing headers MAY be present on the
SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersMayExistForEnabledEchoPort");
+ Holder<String> testName = new
Holder<String>("VerifyAddrHeadersMayExistForEnabledEchoPort");
+ enabledEchoPort.echo("Echo from ServletClient on enabledEchoPort",
testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyExceptionThrownForRequiredEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Exception MUST be thrown back");
+ System.out.println("VerifyExceptionThrownForRequiredEcho2Port");
+ Holder<String> testName = new
Holder<String>("VerifyExceptionThrownForRequiredEcho2Port");
+ requiredEcho2Port.echo("Echo from ServletClient on requiredEcho2Port",
testName);
+ return false;
+ }
+ catch (Exception e)
+ {
+ return true;
+ }
+ }
+
+ private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Addressing headers MUST NOT be present on the
SOAPRequest/SOAPResponse");
+
System.out.println("VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ Holder<String> testName = new
Holder<String>("VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ disabledEcho2Port.echo("Echo from ServletClient on disabledEcho2Port",
testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo()
method");
+ System.out.println("Addressing headers MAY be present on the
SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ Holder<String> testName = new
Holder<String>("VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ enabledEcho2Port.echo("Echo from ServletClient on enabledEcho2Port",
testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,28 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn.common;
+
+public class TestConstants
+{
+ public static final String ECHO_INPUT_ACTION = "EchoInputAction";
+ public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction";
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo_handler.xml")
+public interface Echo {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org",
partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name =
"testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo2")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo2_handler.xml")
+public interface Echo2 {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org",
partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name =
"testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,125 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebServiceClient(name = "EchoService",
+ wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl",
+ targetNamespace = "http://Echo.org")
+@HandlerChain(name = "", file = "EchoService_handler.xml")
+public class EchoService extends Service {
+
+ public final static URL WSDL_LOCATION;
+ public final static QName SERVICE = new QName("http://Echo.org",
"EchoService");
+ public final static QName EchoPort = new QName("http://Echo.org",
"EchoPort");
+ public final static QName Echo2Port = new QName("http://Echo.org",
"Echo2Port");
+ static {
+ URL url = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ } catch (MalformedURLException e) {
+ System.err.println("Can not initialize the default wsdl from
file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ // e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EchoService(URL wsdlLocation) {
+ super(wsdlLocation, SERVICE);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EchoService() {
+ super(WSDL_LOCATION, SERVICE);
+ }
+
+ public EchoService(WebServiceFeature ... features) {
+ super(WSDL_LOCATION, SERVICE, features);
+ }
+ public EchoService(URL wsdlLocation, WebServiceFeature ... features) {
+ super(wsdlLocation, SERVICE, features);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName, WebServiceFeature ...
features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort() {
+ return super.getPort(EchoPort, Echo.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 Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort(WebServiceFeature... features) {
+ return super.getPort(EchoPort, Echo.class, features);
+ }
+ /**
+ *
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port() {
+ return super.getPort(Echo2Port, Echo2.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 Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port(WebServiceFeature... features) {
+ return super.getPort(Echo2Port, Echo2.class, features);
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo_handler.xml")
+public interface Echo {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org",
partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name =
"testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo2")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo2_handler.xml")
+public interface Echo2 {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org",
partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name =
"testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService
+(
+ portName="Echo2Port",
+ serviceName="EchoService",
+ targetNamespace="http://Echo.org",
+ wsdlLocation="WEB-INF/wsdl/EchoService.wsdl",
+
endpointInterface="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo2"
+)
+public class Echo2Impl
+{
+ public String echo(String string, Holder<String> testName)
+ {
+ return string;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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>ServerSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService
+(
+ portName="EchoPort",
+ serviceName="EchoService",
+ targetNamespace="http://Echo.org",
+ wsdlLocation="WEB-INF/wsdl/EchoService.wsdl",
+
endpointInterface="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo"
+)
+public class EchoImpl
+{
+ public String echo(String string, Holder<String> testName)
+ {
+ return string;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,125 @@
+/*
+ * 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebServiceClient(name = "EchoService",
+ wsdlLocation =
"file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl",
+ targetNamespace = "http://Echo.org")
+@HandlerChain(name = "", file = "EchoService_handler.xml")
+public class EchoService extends Service {
+
+ public final static URL WSDL_LOCATION;
+ public final static QName SERVICE = new QName("http://Echo.org",
"EchoService");
+ public final static QName EchoPort = new QName("http://Echo.org",
"EchoPort");
+ public final static QName Echo2Port = new QName("http://Echo.org",
"Echo2Port");
+ static {
+ URL url = null;
+ try {
+ url = new
URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ } catch (MalformedURLException e) {
+ System.err.println("Can not initialize the default wsdl from
file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ // e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EchoService(URL wsdlLocation) {
+ super(wsdlLocation, SERVICE);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EchoService() {
+ super(WSDL_LOCATION, SERVICE);
+ }
+
+ public EchoService(WebServiceFeature ... features) {
+ super(WSDL_LOCATION, SERVICE, features);
+ }
+ public EchoService(URL wsdlLocation, WebServiceFeature ... features) {
+ super(wsdlLocation, SERVICE, features);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName, WebServiceFeature ...
features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort() {
+ return super.getPort(EchoPort, Echo.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 Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort(WebServiceFeature... features) {
+ return super.getPort(EchoPort, Echo.class, features);
+ }
+ /**
+ *
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port() {
+ return super.getPort(Echo2Port, Echo2.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 Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port(WebServiceFeature... features) {
+ return super.getPort(Echo2Port, Echo2.class, features);
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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>ServerSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?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>ServerSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+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.jbws3134.AddrFeaturesViaAnn.common.TestConstants;
+
+public class ServerSOAPHandler extends WsaBaseSOAPHandler
+{
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String
action)
+ {
+ System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" +
oper + ", input action=" + action + "]");
+ if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context,
"VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ }
+
+ private void verifyAction(String action)
+ {
+ if (!action.equals(TestConstants.ECHO_INPUT_ACTION))
+ {
+ throw new ActionNotSupportedException("Expected:" +
TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action);
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundMessageIdExist(context);
+ checkInboundReplyToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String
action)
+ {
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundMessageIdDoesNotExist(context);
+ checkInboundReplyToDoesNotExist(context);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ System.out.println("ServerSOAPHandler.getAction(): testName=" +
testName);
+ if (testName == null)
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ return super.getAction(context);
+ else if
(testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")
+ ||
testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ return super.getActionDoesNotExist(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ServerSOAPHandler";
+ }
+}
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsservice</service-ref-name>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsdefaultechoport</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsenabledechoport</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsrequiredechoport</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsdisabledechoport</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsdefaultecho2port</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsenabledecho2port</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsrequiredecho2port</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+ <service-ref>
+
<service-ref-name>service/wsaddrfeaturestestusingannotationsdisabledecho2port</service-ref-name>
+ <port-component-ref>
+
<service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+
<wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Echo?WSDL</wsdl-override>
+ </service-ref>
+</jboss-web>
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
+ version="3.0"
+
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+ <display-name>JBWS3134 Endpoints</display-name>
+ <servlet>
+ <servlet-name>EchoImpl</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.EchoImpl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Echo2Impl</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo2Impl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>EchoImpl</servlet-name>
+ <url-pattern>/jaxws/Echo</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Echo2Impl</servlet-name>
+ <url-pattern>/jaxws/Echo2</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="EchoService" targetNamespace="http://Echo.org"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://Echo.org"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsa="http://www.w3.org/2005/08/addressing"
+
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+ <types/>
+ <message name="EchoInput">
+ <part name="string1" type="xsd:string" />
+ <part name="testName" type="xsd:string" />
+ </message>
+ <message name="EchoOutput">
+ <part name="testName" type="xsd:string" />
+ <part name="result" type="xsd:string" />
+ </message>
+ <portType name="Echo">
+ <operation name="echo" parameterOrder="string1 testName">
+ <input message="tns:EchoInput" wsam:Action="EchoInputAction"
/>
+ <output message="tns:EchoOutput"
wsam:Action="EchoOutputAction" />
+ </operation>
+ </portType>
+ <portType name="Echo2">
+ <operation name="echo" parameterOrder="string1 testName">
+ <input message="tns:EchoInput" wsam:Action="EchoInputAction"
/>
+ <output message="tns:EchoOutput"
wsam:Action="EchoOutputAction" />
+ </operation>
+ </portType>
+ <binding name="EchoBinding" type="tns:Echo">
+ <wsp:Policy>
+ <wsam:Addressing wsp:Optional="true">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" namespace="http://Echo.org"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://Echo.org"
/>
+ </output>
+ </operation>
+ </binding>
+ <binding name="Echo2Binding" type="tns:Echo2">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" namespace="http://Echo.org"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://Echo.org"
/>
+ </output>
+ </operation>
+ </binding>
+ <service name="EchoService">
+ <port name="EchoPort" binding="tns:EchoBinding">
+ <soap:address location="http://foo:9999/bar"/>
+ </port>
+ <port name="Echo2Port" binding="tns:Echo2Binding">
+ <soap:address location="http://foo:9999/bar"/>
+ </port>
+ </service>
+</definitions>
+
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="EchoService.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.jbws3134.AddrFeaturesViaAnn.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.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
+ </jaxws:bindings>
+
+</jaxws:bindings>
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml 2010-10-06
08:36:19 UTC (rev 13059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="EchoService.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.jbws3134.AddrFeaturesViaAnn.service"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+
<javaee:handler-name>ServerSOAPHandler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
+ </jaxws:bindings>
+
+</jaxws:bindings>
+