JBossWS SVN: r2026 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/server and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-22 13:48:34 -0500 (Mon, 22 Jan 2007)
New Revision: 2026
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextJSETestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainTestCase.java
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF01/
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF02/ejb-jar.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF03/
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/jboss-app.xml
trunk/jbossws-tests/src/main/resources/tests-jboss40-excludes.txt
trunk/jbossws-tests/src/main/resources/tests-jboss42-excludes.txt
trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt
Log:
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -46,18 +46,9 @@
{
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Exception
{
- UnifiedDeploymentInfo udi;
URL webservicesURL = getWebservicesDescriptor(di);
- if (webservicesURL != null)
- {
- udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, webservicesURL);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- }
- else
- {
- udi = new JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB21);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- }
+ UnifiedDeploymentInfo udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, webservicesURL);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
return udi;
}
@@ -85,7 +76,8 @@
BeanMetaData beanMetaData = (BeanMetaData)itBeans.next();
String ejbClassName = beanMetaData.getEjbClass();
Class ejbClass = di.annotationsCl.loadClass(ejbClassName);
- isWebserviceDeployment = ejbClass.isAnnotationPresent(javax.jws.WebService.class);
+ if (ejbClass.isAnnotationPresent(javax.jws.WebService.class))
+ throw new UnsupportedOperationException("JAXWS not supported on EJB2.1 endpoints");
}
}
catch (RuntimeException e)
@@ -109,7 +101,7 @@
{
return di.localCl.findResource("META-INF/webservices.xml");
}
-
+
protected URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData) throws IOException
{
ServiceEndpointGeneratorEJB21 generator = new ServiceEndpointGeneratorEJB21();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -30,7 +30,6 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB21;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -90,11 +89,6 @@
JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
wsMetaData = builder.buildMetaData(udi);
}
- else if (udi.type == UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB21)
- {
- JAXWSMetaDataBuilderEJB21 builder = new JAXWSMetaDataBuilderEJB21();
- wsMetaData = builder.buildMetaData(udi);
- }
else if (udi.type == UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3)
{
JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -68,7 +68,7 @@
{
this.type = EndpointType.JSE;
}
- else if (udi.type == DeploymentType.JAXRPC_EJB21 || udi.type == DeploymentType.JAXWS_EJB21)
+ else if (udi.type == DeploymentType.JAXRPC_EJB21)
{
String ejbName = sepMetaData.getLinkName();
if (ejbName == null)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -41,7 +41,7 @@
{
public enum DeploymentType
{
- JAXRPC_Client, JAXRPC_JSE, JAXRPC_EJB21, JAXRPC_EJB3, JAXWS_JSE, JAXWS_EJB21, JAXWS_EJB3
+ JAXRPC_Client, JAXRPC_JSE, JAXRPC_EJB21, JAXRPC_EJB3, JAXWS_JSE, JAXWS_EJB3
};
public UnifiedDeploymentInfo(DeploymentType type)
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,104 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-// $Id$
-package org.jboss.ws.metadata.builder.jaxws;
-
-import java.util.Iterator;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-
-import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A server side meta data builder that is based on JSR-181 annotations
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- * @since 19-May-2005
- */
-public class JAXWSMetaDataBuilderEJB21
-{
- // provide logging
- private final Logger log = Logger.getLogger(JAXWSMetaDataBuilderEJB21.class);
-
- /** Build from annotations
- */
- public UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi)
- {
- log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
- try
- {
- UnifiedMetaData wsMetaData = new UnifiedMetaData();
- wsMetaData.setDeploymentName(udi.getCanonicalName());
- wsMetaData.setClassLoader(udi.classLoader);
-
- if (udi.classLoader == null)
- throw new WSException("Deployment class loader not initialized");
-
- // For every bean
- UnifiedApplicationMetaData appMetaData = (UnifiedApplicationMetaData)udi.metaData;
- Iterator it = appMetaData.getEnterpriseBeans();
- while (it.hasNext())
- {
- UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)it.next();
-
- String ejbClassName = beanMetaData.getEjbClass();
- Class beanClass = udi.classLoader.loadClass(ejbClassName);
- if (beanClass.isAnnotationPresent(WebService.class) || beanClass.isAnnotationPresent(WebServiceProvider.class))
- {
- String ejbLink = beanMetaData.getEjbName();
- JAXWSServerMetaDataBuilder.setupProviderOrWebService(wsMetaData, udi, beanClass, ejbLink);
-
- // setup the security domain
- if (beanClass.isAnnotationPresent(SecurityDomain.class))
- {
- SecurityDomain anSecurityDomain = (SecurityDomain)beanClass.getAnnotation(SecurityDomain.class);
- String lastDomain = wsMetaData.getSecurityDomain();
- String securityDomain = anSecurityDomain.value();
- if (lastDomain != null && lastDomain.equals(securityDomain) == false)
- throw new IllegalStateException("Multiple security domains not supported: " + securityDomain);
-
- wsMetaData.setSecurityDomain(securityDomain);
- }
- }
- }
-
- log.debug("END buildMetaData: " + wsMetaData);
- return wsMetaData;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot build meta data: " + ex.getMessage(), ex);
- }
- }
-}
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-22 18:48:34 UTC (rev 2026)
@@ -316,34 +316,6 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
- <jar jarfile="${tests.output.dir}/libs/jaxws-jsr181-webservice01-ejb21.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean01.class"/>
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/jsr181/webservice/META-INF01">
- <include name="ejb-jar.xml"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-jsr181-webservice02-ejb21.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean02.class"/>
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/jsr181/webservice/META-INF02">
- <include name="ejb-jar.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-jsr181-webservice03-ejb21.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.class"/>
- <include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/jsr181/webservice/META-INF03">
- <include name="ejb-jar.xml"/>
- </metainf>
- </jar>
<jar jarfile="${tests.output.dir}/libs/jaxws-jsr181-webservice01-ejb3.jar">
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean01.class"/>
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.context;
-
-// $Id$
-
-import java.io.File;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 29-Apr-2005
- */
-public class ContextEJBTestCase extends JBossWSTest
-{
- private static TestEndpoint port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(ContextJSETestCase.class, "jaxws-context.jar");
- }
-
- public void setUp() throws Exception
- {
- if (port == null)
- {
- URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
- Service service = Service.create(wsdlURL, qname);
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
- bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- }
- }
-
- public void testGetWebContext() throws Exception
- {
- String retStr = port.testGetMessageContext();
- assertEquals("pass", retStr);
- }
-
- public void testGetUserPrincipal() throws Exception
- {
- String retStr = port.testGetUserPrincipal();
- assertEquals("kermit", retStr);
- }
-
- public void testIsUserInRole() throws Exception
- {
- assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
- }
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.context;
-
-// $Id$
-
-import java.io.File;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 29-Apr-2005
- */
-public class ContextJSETestCase extends JBossWSTest
-{
- private static TestEndpoint port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(ContextJSETestCase.class, "jaxws-context.war");
- }
-
- public void setUp() throws Exception
- {
- if (port == null)
- {
- URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
- Service service = Service.create(wsdlURL, qname);
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
- bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- }
- }
-
- public void testGetWebContext() throws Exception
- {
- String retStr = port.testGetMessageContext();
- assertEquals("pass", retStr);
- }
-
- public void testGetUserPrincipal() throws Exception
- {
- String retStr = port.testGetUserPrincipal();
- assertEquals("kermit", retStr);
- }
-
- public void testIsUserInRole() throws Exception
- {
- assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
- }
-}
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextEJBTestCase.java (from rev 2020, trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java)
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextEJBTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextEJBTestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.context;
+
+// $Id$
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAXWS WebServiceContext
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-Apr-2005
+ */
+public class WebServiceContextEJBTestCase extends JBossWSTest
+{
+ private static TestEndpoint port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebServiceContextEJBTestCase.class, "jaxws-context.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+ }
+ }
+
+ public void testGetWebContext() throws Exception
+ {
+ String retStr = port.testGetMessageContext();
+ assertEquals("pass", retStr);
+ }
+
+ public void testGetUserPrincipal() throws Exception
+ {
+ String retStr = port.testGetUserPrincipal();
+ assertEquals("kermit", retStr);
+ }
+
+ public void testIsUserInRole() throws Exception
+ {
+ assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
+ }
+}
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextJSETestCase.java (from rev 2020, trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java)
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextJSETestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/WebServiceContextJSETestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.context;
+
+// $Id$
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAXWS WebServiceContext
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-Apr-2005
+ */
+public class WebServiceContextJSETestCase extends JBossWSTest
+{
+ private static TestEndpoint port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebServiceContextJSETestCase.class, "jaxws-context.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+ }
+ }
+
+ public void testGetWebContext() throws Exception
+ {
+ String retStr = port.testGetMessageContext();
+ assertEquals("pass", retStr);
+ }
+
+ public void testGetUserPrincipal() throws Exception
+ {
+ String retStr = port.testGetUserPrincipal();
+ assertEquals("kermit", retStr);
+ }
+
+ public void testIsUserInRole() throws Exception
+ {
+ assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
+ }
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.HandlerChain
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainClientTestCase extends JBossWSTest
+{
+ private static final String targetNS = "http://handlerchain.jsr181.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(HandlerChainClientTestCase.class, "jaxws-jsr181-handlerchain.war, jaxws-jsr181-handlerchain-client.jar");
+ }
+
+ public void testHandlerChainOnWebServiceRef() throws Throwable
+ {
+ String resStr = invokeTestClient("testService1", "Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+
+ public void testHandlerChainNegative() throws Throwable
+ {
+ String resStr = invokeTestClient("testService2", "Kermit");
+ assertEquals("Kermit|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut", resStr);
+ }
+
+ public void testHandlerChainOverride() throws Throwable
+ {
+ String resStr = invokeTestClient("testService3", "Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+
+ private String invokeTestClient(String testName, String reqStr) throws Throwable
+ {
+ new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { testName, reqStr });
+ String resStr = HandlerChainClient.testResult.get(testName);
+ return resStr;
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainTestCase.java (from rev 2021, trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java)
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainTestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.HandlerChain
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainTestCase extends JBossWSTest
+{
+ private static final String targetNS = "http://handlerchain.jsr181.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(HandlerChainTestCase.class, "jaxws-jsr181-handlerchain.war");
+ }
+
+ public void testDynamicHandlerChain() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "EndpointImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new LogHandler());
+ handlerChain.add(new AuthorizationHandler());
+ handlerChain.add(new RoutingHandler());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+
+ public void testHandlerChainOnServiceEndpointInterface() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "EndpointImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ EndpointWithHandlerChain port = (EndpointWithHandlerChain)service.getPort(EndpointWithHandlerChain.class);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jsr181.handlerchain;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.client.ClientLauncher;
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test the JSR-181 annotation: javax.jws.HandlerChain
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Oct-2005
- */
-public class JSR181HandlerChainTestCase extends JBossWSTest
-{
- private static final String targetNS = "http://handlerchain.jsr181.jaxws.ws.test.jboss.org/";
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181HandlerChainTestCase.class, "jaxws-jsr181-handlerchain.war, jaxws-jsr181-handlerchain-client.jar");
- }
-
- public void testDynamicHandlerChain() throws Exception
- {
- QName serviceName = new QName(targetNS, "EndpointImplService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- Endpoint port = (Endpoint)service.getPort(Endpoint.class);
-
- BindingProvider bindingProvider = (BindingProvider)port;
- List<Handler> handlerChain = new ArrayList<Handler>();
- handlerChain.add(new LogHandler());
- handlerChain.add(new AuthorizationHandler());
- handlerChain.add(new RoutingHandler());
- bindingProvider.getBinding().setHandlerChain(handlerChain);
-
- String resStr = port.echo("Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
- }
-
- public void testHandlerChainOnServiceEndpointInterface() throws Exception
- {
- QName serviceName = new QName(targetNS, "EndpointImplService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- EndpointWithHandlerChain port = (EndpointWithHandlerChain)service.getPort(EndpointWithHandlerChain.class);
-
- String resStr = port.echo("Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
- }
-
- public void testHandlerChainOnWebServiceRef() throws Throwable
- {
- String resStr = invokeTestClient("testService1", "Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
- }
-
- public void testHandlerChainNegative() throws Throwable
- {
- String resStr = invokeTestClient("testService2", "Kermit");
- assertEquals("Kermit|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut", resStr);
- }
-
- public void testHandlerChainOverride() throws Throwable
- {
- String resStr = invokeTestClient("testService3", "Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
- }
-
- private String invokeTestClient(String testName, String reqStr) throws Throwable
- {
- new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { testName, reqStr });
- String resStr = HandlerChainClient.testResult.get(testName);
- return resStr;
- }
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jsr181.webservice;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebService
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- * @since 29-Apr-2005
- */
-public class JSR181WebServiceEJB21TestCase extends JSR181WebServiceBase
-{
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebServiceEJB21TestCase.class, "");
- }
-
- public void testWebServiceTest() throws Exception
- {
- deploy("jaxws-jsr181-webservice01-ejb21.jar");
- try
- {
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
- webServiceTest();
- }
- finally
- {
- undeploy("jaxws-jsr181-webservice01-ejb21.jar");
- }
- }
-
- public void testWebServiceWsdlLocationTest() throws Exception
- {
- deploy("jaxws-jsr181-webservice02-ejb21.jar");
- try
- {
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
- webServiceWsdlLocationTest();
- }
- finally
- {
- undeploy("jaxws-jsr181-webservice02-ejb21.jar");
- }
- }
-
- public void testWebServiceEndpointInterfaceTest() throws Exception
- {
- deploy("jaxws-jsr181-webservice03-ejb21.jar");
- try
- {
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
- webServiceEndpointInterfaceTest();
- }
- finally
- {
- undeploy("jaxws-jsr181-webservice03-ejb21.jar");
- }
- }
-}
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
<jboss-web>
- <security-domain>java:/jaas/JBossWS</security-domain>
+ <security-domain>java:/jaas/JBossWS</security-domain>
</jboss-web>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/jboss-app.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/jboss-app.xml 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/jboss-app.xml 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,8 +1,6 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-app
- PUBLIC "-//JBoss//DTD Java EE Application 5.0///EN"
- "http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">
+<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD Java EE Application 5.0///EN" "http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">
<jboss-app>
<module>
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF02/ejb-jar.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF02/ejb-jar.xml 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/META-INF02/ejb-jar.xml 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<ejb-jar 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/ejb-jar_2_1.xsd"
- version="2.1">
-
- <enterprise-beans>
- <session>
- <ejb-name>TestService</ejb-name>
-
- <!-- This is only here to pass the EJB-2.1 verifier -->
- <service-endpoint>org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface</service-endpoint>
-
- <ejb-class>org.jboss.test.ws.jaxws.jsr181.webservice.EJB21Bean02</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Container</transaction-type>
- </session>
- </enterprise-beans>
-</ejb-jar>
-
Modified: trunk/jbossws-tests/src/main/resources/tests-jboss40-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-jboss40-excludes.txt 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/tests-jboss40-excludes.txt 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1 +1,3 @@
-nothing-to-exclude/**
\ No newline at end of file
+org/jboss/test/ws/jaxws/endpoint/**
+org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.class
+org/jboss/test/ws/jaxws/webserviceref/**
Modified: trunk/jbossws-tests/src/main/resources/tests-jboss42-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-jboss42-excludes.txt 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/tests-jboss42-excludes.txt 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1 +1,3 @@
-nothing-to-exclude/**
\ No newline at end of file
+org/jboss/test/ws/jaxws/endpoint/**
+org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.class
+org/jboss/test/ws/jaxws/webserviceref/**
Modified: trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt 2007-01-22 18:14:16 UTC (rev 2025)
+++ trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt 2007-01-22 18:48:34 UTC (rev 2026)
@@ -1,8 +1,9 @@
org/jboss/test/ws/jaxws/eardeployment/**
org/jboss/test/ws/jaxws/jbws944/**
org/jboss/test/ws/jaxws/jbws981/**
+org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClientTestCase.class
org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.class
org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.class
org/jboss/test/ws/jaxws/samples/retail/**
-org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.class
+org/jboss/test/ws/jaxws/webserviceref/**
org/jboss/test/ws/jaxws/xop/**
17 years, 9 months
JBossWS SVN: r2025 - trunk/build/etc/hudson.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-22 13:14:16 -0500 (Mon, 22 Jan 2007)
New Revision: 2025
Added:
trunk/build/etc/hudson/AS-4.0.config.xml
trunk/build/etc/hudson/AS-4.2.config.xml
trunk/build/etc/hudson/AS-5.0.config.xml
Removed:
trunk/build/etc/hudson/AS-5.x.config.xml
Log:
backup QA config
Added: trunk/build/etc/hudson/AS-4.0.config.xml
===================================================================
--- trunk/build/etc/hudson/AS-4.0.config.xml (rev 0)
+++ trunk/build/etc/hudson/AS-4.0.config.xml 2007-01-22 18:14:16 UTC (rev 2025)
@@ -0,0 +1,79 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command># common script settings
+pwd
+
+#
+# Module settings
+#
+HUDSON="/home/hbraun/hudson"
+MODULE="JBossWS-AS-4.0"
+WORKSPACE=$HUDSON/jobs/$MODULE/workspace
+JBOSS_INSTANCE=$HUDSON/jobs/AS-4.0/workspaceBranch_4_0/build/output/jboss-4.0.5.SP1-ejb3
+ENV_DEFAULTS="-Djboss50.home= -Djboss42.home= -Djbossws.integration.target=jboss40 -Djboss40.home=$JBOSS_INSTANCE"
+
+cd $WORKSPACE/trunk/build
+pwd
+
+#
+# build core modules (and update thirdparty libs)
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Dforce.thirdparty.get=true main
+
+#
+# deploy jboss40
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Djbossws.integration.target=jboss40 -Djboss40.home=$JBOSS_INSTANCE deploy-jboss40
+
+#
+# build test suite
+#
+cd $WORKSPACE/trunk/jbossws-tests
+pwd
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties $ENV_DEFAULTS main
+
+#
+# start jbossas
+#(make sure it's stopped first)
+#
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE stop
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE start
+sleep 30
+
+#
+# execute tests
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties $ENV_DEFAULTS tests
+
+#
+# stop jbossas
+#
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE stop</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>trunk/jbossws-tests/output/reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>heiko(a)openj.net</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>false</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <modules>https://svn.jboss.org/repos/jbossws/trunk</modules>
+ <useUpdate>true</useUpdate>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector"/>
+ <description>Builds JBossWS-TRUNK against AS 4.0</description>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <actions class="vector"/>
+</project>
\ No newline at end of file
Added: trunk/build/etc/hudson/AS-4.2.config.xml
===================================================================
--- trunk/build/etc/hudson/AS-4.2.config.xml (rev 0)
+++ trunk/build/etc/hudson/AS-4.2.config.xml 2007-01-22 18:14:16 UTC (rev 2025)
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command># common script settings
+pwd
+
+#
+# Module settings
+#
+HUDSON="/home/hbraun/hudson"
+MODULE="JBossWS-AS-4.2"
+WORKSPACE=$HUDSON/jobs/$MODULE/workspace
+JBOSS_INSTANCE=$HUDSON/jobs/AS-4.2/workspace/Branch_4_2/build/output/jboss-4.2.0.CR1-ejb3
+ENV_DEFAULTS="-Djboss50.home= -Djboss42.home= -Djbossws.integration.target=jboss42 -Djboss42.home=$JBOSS_INSTANCE"
+
+cd $WORKSPACE/trunk/build
+pwd
+
+#
+# build core modules (and update thirdparty libs)
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Dforce.thirdparty.get=true main
+
+#
+# deploy jboss42
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Djbossws.integration.target=jboss42 -Djboss42.home=$JBOSS_INSTANCE deploy-jboss42
+
+#
+# build test suite
+#
+cd $WORKSPACE/trunk/jbossws-tests
+pwd
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties $ENV_DEFAULTS main
+
+#
+# start jbossas
+#(make sure it's stopped first)
+#
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE stop
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE start
+sleep 30
+
+#
+# execute tests
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties $ENV_DEFAULTS tests
+
+#
+# stop jbossas
+#
+$WORKSPACE/trunk/build/etc/hudson/jboss-init.sh $JBOSS_INSTANCE stop
+
+</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>trunk/jbossws-tests/output/reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>heiko(a)openj.net</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>false</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <modules>https://svn.jboss.org/repos/jbossws/trunk</modules>
+ <useUpdate>true</useUpdate>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector"/>
+ <description>Builds JBossWS-TRUNK against AS 4.2</description>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <actions class="vector"/>
+</project>
\ No newline at end of file
Added: trunk/build/etc/hudson/AS-5.0.config.xml
===================================================================
--- trunk/build/etc/hudson/AS-5.0.config.xml (rev 0)
+++ trunk/build/etc/hudson/AS-5.0.config.xml 2007-01-22 18:14:16 UTC (rev 2025)
@@ -0,0 +1,83 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command># common script settings
+pwd
+
+#
+# Module settings
+#
+HUDSON="/home/hbraun/hudson"
+MODULE="JBossWS-TRUNK"
+WORKSPACE=$HUDSON/jobs/$MODULE/workspace
+
+cd $WORKSPACE/trunk/build
+pwd
+
+#
+# build core modules (and update thirdparty libs)
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Dforce.thirdparty.get=true main
+
+#
+# deploy jboss50
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties deploy-jboss50
+
+#
+# build test suite
+#
+cd $WORKSPACE/trunk/jbossws-tests
+pwd
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties main
+
+#
+# start jbossas
+#(make sure it's stopped first)
+#
+$WORKSPACE/trunk/build/etc/hudson/AS-5.x-init.sh stop
+$WORKSPACE/trunk/build/etc/hudson/AS-5.x-init.sh start
+sleep 30
+
+#
+# execute tests
+#
+ant -propertyfile $WORKSPACE/trunk/build/etc/hudson/AS-5.x.properties -Djboss50.home=$HUDSON/jobs/AS-5.x/workspace/trunk/build/output/jboss-5.0.0.Beta2 tests
+
+#
+# stop jbossas
+#
+$WORKSPACE/trunk/build/etc/hudson/AS-5.x-init.sh stop
+
+</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>trunk/jbossws-tests/output/reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>heiko(a)openj.net</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>false</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <modules>https://svn.jboss.org/repos/jbossws/trunk</modules>
+ <useUpdate>true</useUpdate>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>true</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector">
+ <hudson.triggers.SCMTrigger>
+ <spec>* * * * *</spec>
+ </hudson.triggers.SCMTrigger>
+ </triggers>
+ <description>Builds JBossWS-TRUNK against AS 5.0 TRUNK</description>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <actions class="vector"/>
+</project>
\ No newline at end of file
Deleted: trunk/build/etc/hudson/AS-5.x.config.xml
===================================================================
--- trunk/build/etc/hudson/AS-5.x.config.xml 2007-01-22 15:58:57 UTC (rev 2024)
+++ trunk/build/etc/hudson/AS-5.x.config.xml 2007-01-22 18:14:16 UTC (rev 2025)
@@ -1,31 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<project>
- <builders class="vector">
- <hudson.tasks.Shell>
- <command>cd trunk
-rm -f thirdparty/libraries.ent
-./build/build.sh clean
-./build/build.sh</command>
- </hudson.tasks.Shell>
- </builders>
- <publishers class="vector">
- <hudson.tasks.Mailer>
- <recipients>heiko.braun(a)jboss.com</recipients>
- <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
- <sendToIndividuals>false</sendToIndividuals>
- </hudson.tasks.Mailer>
- </publishers>
- <buildWrappers class="vector"/>
- <scm class="hudson.scm.SubversionSCM">
- <modules>https://svn.jboss.org/repos/jbossas/trunk</modules>
- <useUpdate>true</useUpdate>
- </scm>
- <canRoam>true</canRoam>
- <disabled>false</disabled>
- <enableRemoteTrigger>false</enableRemoteTrigger>
- <triggers class="vector"/>
- <description></description>
- <keepDependencies>false</keepDependencies>
- <properties/>
- <actions class="vector"/>
-</project>
\ No newline at end of file
17 years, 9 months
JBossWS SVN: r2024 - trunk/build/etc/hudson.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-22 10:58:57 -0500 (Mon, 22 Jan 2007)
New Revision: 2024
Modified:
trunk/build/etc/hudson/AS-5.x.properties
Log:
update 4.2 and 4.0 integration path
Modified: trunk/build/etc/hudson/AS-5.x.properties
===================================================================
--- trunk/build/etc/hudson/AS-5.x.properties 2007-01-22 15:56:24 UTC (rev 2023)
+++ trunk/build/etc/hudson/AS-5.x.properties 2007-01-22 15:58:57 UTC (rev 2024)
@@ -8,8 +8,8 @@
# Required JBoss Home
jboss50.home=../../../../AS-5.x/workspace/trunk/build/output/jboss-5.0.0.Beta2
-#jboss42.home=/home/hbraun/dev/prj/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/
-#jboss40.home=/home/hbraun/dev/prj/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/
+jboss42.home=../../../../AS-4.2/workspace/Branch_4_2/build/output/jboss-4.2.0.CR1-ejb3
+jboss40.home=../../../../AS-4.0/workspace/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3
# The JBoss server under test. This can be [jboss50|jboss42|jboss40|tomcat]
jbossws.integration.target=jboss50
17 years, 9 months
JBossWS SVN: r2023 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-22 10:56:24 -0500 (Mon, 22 Jan 2007)
New Revision: 2023
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
Removed:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
Log:
Resolve @HandlerChain.file relative to declaring class
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-22 15:47:57 UTC (rev 2022)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-22 15:56:24 UTC (rev 2023)
@@ -27,6 +27,8 @@
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -140,9 +142,35 @@
usRef.setWsdlLocation(wsref.wsdlLocation());
// Set the handlerChain from @HandlerChain on the annotated element
+ String handlerChain = usRef.getHandlerChain();
HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (usRef.getHandlerChain() == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
- usRef.setHandlerChain(anHandlerChain.file());
+ if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+ handlerChain = anHandlerChain.file();
+
+ // Resolve path to handler chain
+ if (handlerChain != null)
+ {
+ try
+ {
+ new URL(handlerChain);
+ }
+ catch (MalformedURLException ex)
+ {
+ Class declaringClass = null;
+ if (anElement instanceof Field)
+ declaringClass = ((Field)anElement).getDeclaringClass();
+ else if (anElement instanceof Method)
+ declaringClass = ((Method)anElement).getDeclaringClass();
+ else if (anElement instanceof Class)
+ declaringClass = (Class)anElement;
+
+ handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
+ VirtualFile vfHandlerChain = vfsRoot.findChild(handlerChain);
+ if (vfHandlerChain == null)
+ throw new IllegalStateException("Cannot find handler chain: " + handlerChain);
+ }
+ usRef.setHandlerChain(handlerChain);
+ }
Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName, targetClassName, usRef));
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-01-22 15:47:57 UTC (rev 2022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-01-22 15:56:24 UTC (rev 2023)
@@ -23,6 +23,8 @@
// $Id$
+import java.io.BufferedReader;
+import java.io.IOException;
import java.io.StringReader;
import java.util.Iterator;
@@ -35,8 +37,11 @@
import javax.xml.ws.LogicalMessage;
import javax.xml.ws.WebServiceException;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* The LogicalMessageContext interface extends MessageContext to provide access to a the
@@ -47,7 +52,11 @@
*/
public class LogicalMessageImpl implements LogicalMessage
{
+ // provide logging
+ private static final Logger log = Logger.getLogger(LogicalMessageImpl.class);
+
private SOAPBodyImpl soapBody;
+ private boolean setPayloadBodyChild;
public LogicalMessageImpl(SOAPMessage soapMessage)
{
@@ -64,18 +73,12 @@
public Source getPayload()
{
Source source = soapBody.getPayload();
+ setPayloadBodyChild = false;
if (source == null)
{
SOAPContentElement soapElement = (SOAPContentElement)soapBody.getChildElements().next();
- if (soapElement.isDOMValid())
- {
- source = new DOMSource(soapElement);
- }
- else
- {
- String xmlPayload = soapElement.getXMLFragment();
- source = new StreamSource(new StringReader(xmlPayload));
- }
+ source = soapElement.getPayload();
+ setPayloadBodyChild = true;
}
return source;
}
@@ -83,6 +86,11 @@
public void setPayload(Source source)
{
soapBody.setPayload(source);
+ if (setPayloadBodyChild)
+ {
+ SOAPContentElement soapElement = (SOAPContentElement)soapBody.getChildElements().next();
+ soapElement.setPayload(source);
+ }
}
public Object getPayload(JAXBContext jaxbContext)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-01-22 15:47:57 UTC (rev 2022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-01-22 15:56:24 UTC (rev 2023)
@@ -38,6 +38,11 @@
import javax.xml.soap.Name;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -160,7 +165,39 @@
{
return xmlFragment != null;
}
+
+ /** Get the payload as source.
+ */
+ public Source getPayload()
+ {
+ // expand to DOM, so the source is repeatedly readable
+ expandToDOM();
+ return new DOMSource(this);
+ }
+ /** Set the payload as source
+ */
+ public void setPayload(Source source)
+ {
+ try
+ {
+ TransformerFactory tf = TransformerFactory.newInstance();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+ tf.newTransformer().transform(source, new StreamResult(baos));
+ String xmlFragment = new String(baos.toByteArray());
+ if (xmlFragment.startsWith("<?xml"))
+ {
+ int index = xmlFragment.indexOf(">");
+ xmlFragment = xmlFragment.substring(index + 1);
+ }
+ setXMLFragment(xmlFragment);
+ }
+ catch (TransformerException ex)
+ {
+ WSException.rethrow(ex);
+ }
+ }
+
public String getXMLFragment()
{
// Serialize the valueContent
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 15:47:57 UTC (rev 2022)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 15:56:24 UTC (rev 2023)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jsr181.handlerchain;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jws.HandlerChain;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-
-import org.jboss.logging.Logger;
-
-public class HandlerChainClient
-{
- // provide logging
- private static final Logger log = Logger.getLogger(HandlerChainClient.class);
-
- @WebServiceRef(name = "Service1")
- @HandlerChain(file = "jaxws-handlers.xml")
- static Service service1;
-
- // Service2 should have no client side handler chain
- @WebServiceRef(name = "Service2")
- static Service service2;
-
- @WebServiceRef(name = "Service3")
- static Service service3;
-
- public static Map<String, String> testResult = new HashMap<String, String>();
-
- public static void main(String[] args) throws Exception
- {
- String testName = args[0];
- String reqStr = args[1];
-
- HandlerChainClient client = new HandlerChainClient();
- Method method = HandlerChainClient.class.getMethod(testName, new Class[] { String.class });
- try
- {
- String retStr = (String)method.invoke(client, reqStr);
- testResult.put(testName, retStr);
- }
- catch (InvocationTargetException ex)
- {
- log.error("Invocation error", ex);
- testResult.put(testName, ex.getTargetException().toString());
- }
- catch (Exception ex)
- {
- log.error("Error", ex);
- testResult.put(testName, ex.toString());
- }
- }
-
- public String testService1(String reqStr) throws Exception
- {
- Endpoint port = service1.getPort(Endpoint.class);
- return port.echo(reqStr);
- }
-
- public String testService2(String reqStr) throws Exception
- {
- Endpoint port = service2.getPort(Endpoint.class);
- return port.echo(reqStr);
- }
-
- public String testService3(String reqStr) throws Exception
- {
- Endpoint port = service3.getPort(Endpoint.class);
- return port.echo(reqStr);
- }
-}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 15:56:24 UTC (rev 2023)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+
+public class HandlerChainClient
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerChainClient.class);
+
+ @WebServiceRef(name = "Service1")
+ @HandlerChain(file = "jaxws-handlers.xml")
+ static Service service1;
+
+ // Service2 should have no client side handler chain
+ @WebServiceRef(name = "Service2")
+ static Service service2;
+
+ @WebServiceRef(name = "Service3")
+ static Service service3;
+
+ public static Map<String, String> testResult = new HashMap<String, String>();
+
+ public static void main(String[] args) throws Exception
+ {
+ String testName = args[0];
+ String reqStr = args[1];
+
+ HandlerChainClient client = new HandlerChainClient();
+ Method method = HandlerChainClient.class.getMethod(testName, new Class[] { String.class });
+ try
+ {
+ String retStr = (String)method.invoke(client, reqStr);
+ testResult.put(testName, retStr);
+ }
+ catch (InvocationTargetException ex)
+ {
+ log.error("Invocation error", ex);
+ testResult.put(testName, ex.getTargetException().toString());
+ }
+ catch (Exception ex)
+ {
+ log.error("Error", ex);
+ testResult.put(testName, ex.toString());
+ }
+ }
+
+ public String testService1(String reqStr) throws Exception
+ {
+ Endpoint port = service1.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
+
+ public String testService2(String reqStr) throws Exception
+ {
+ Endpoint port = service2.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
+
+ public String testService3(String reqStr) throws Exception
+ {
+ Endpoint port = service3.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
+}
17 years, 9 months
JBossWS SVN: r2022 - trunk/build/etc/hudson.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-22 10:47:57 -0500 (Mon, 22 Jan 2007)
New Revision: 2022
Added:
trunk/build/etc/hudson/jboss-init.sh
Log:
generic start script
Added: trunk/build/etc/hudson/jboss-init.sh
===================================================================
--- trunk/build/etc/hudson/jboss-init.sh (rev 0)
+++ trunk/build/etc/hudson/jboss-init.sh 2007-01-22 15:47:57 UTC (rev 2022)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if [ -z "$1" ]
+then
+ echo "Please specify a jboss instance to be started"; exit 1;
+fi
+
+#define where jboss is - this is the directory containing directories log, bin, conf etc
+JBOSS_INSTANCE=$1
+
+echo "Using jboss instance $JBOSS_INSTANCE"
+
+case "$2" in
+start)
+ cd $JBOSS_INSTANCE/bin
+ ./run.sh > /dev/null &
+ ;;
+stop)
+ cd $JBOSS_INSTANCE/bin
+ ./shutdown.sh -S > /dev/null &
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "usage: $0 (start|stop|restart|help)"
+esac
+
Property changes on: trunk/build/etc/hudson/jboss-init.sh
___________________________________________________________________
Name: svn:executable
+ *
17 years, 9 months
JBossWS SVN: r2021 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-22 07:49:11 -0500 (Mon, 22 Jan 2007)
New Revision: 2021
Modified:
trunk/build/etc/jbossws-component-info.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
Log:
Fix service-ref/handler-chain test case
Modified: trunk/build/etc/jbossws-component-info.xml
===================================================================
--- trunk/build/etc/jbossws-component-info.xml 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/build/etc/jbossws-component-info.xml 2007-01-22 12:49:11 UTC (rev 2021)
@@ -33,6 +33,7 @@
</import>
<import componentref="jboss/remoting">
<compatible version="1.4.5.GA"/>
+ <compatible version="2.2.0.Alpha2"/>
<compatible version="@jboss-remoting@"/>
</import>
<import componentref="sun-jaxb">
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -106,8 +106,7 @@
if (Service.class.getName().equals(targetClassName))
targetClassName = serviceClassName;
- log.debug("Service class name: " + serviceClassName);
- log.debug("Target class name: " + targetClassName);
+ log.debug("[name=" + serviceRefName + ",service=" + serviceClassName + ",target=" + targetClassName + "]");
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -111,7 +111,7 @@
log.debug("add general handlers: " + list);
unsortedChain.addAll(list);
}
-
+
// Sort handler logical handlers first
List<Handler> sortedChain = new ArrayList<Handler>();
for (Handler handler : unsortedChain)
@@ -124,7 +124,7 @@
if ((handler instanceof LogicalHandler) == false)
sortedChain.add(handler);
}
-
+
return Collections.unmodifiableList(sortedChain);
}
@@ -133,7 +133,7 @@
log.debug("initHandlerChain: " + type);
// clear all exisisting handler to avoid double registration
- log.debug("Clear handler map: " +handlerMap);
+ log.debug("Clear handler map: " + handlerMap);
for (HandlerMetaData handlerMetaData : epMetaData.getHandlerMetaData(type))
{
@@ -155,7 +155,7 @@
if (handler instanceof GenericSOAPHandler)
((GenericSOAPHandler)handler).setHeaders(soapHeaders);
- List<PortInfo> infos = getPortInfo(epMetaData, jaxwsMetaData);
+ List<PortInfo> infos = getPortInfos(epMetaData, jaxwsMetaData);
for (PortInfo info : infos)
{
addHandler(info, handler);
@@ -172,7 +172,7 @@
}
}
- private List<PortInfo> getPortInfo(EndpointMetaData epMetaData, HandlerMetaDataJAXWS handlerMetaData)
+ private List<PortInfo> getPortInfos(EndpointMetaData epMetaData, HandlerMetaDataJAXWS handlerMetaData)
{
String protocols = handlerMetaData.getProtocolBindings();
QName services = handlerMetaData.getServiceNamePattern();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -108,8 +108,12 @@
// If this Service was constructed through the ServiceObjectFactory
// this thread local association should be available
usRef = ServiceObjectFactory.getUnifiedServiceRefAssociation();
- if (usRef != null && usRef.getHandlerChain() != null)
- serviceMetaData.setHandlerChain(usRef.getHandlerChain());
+ if (usRef != null)
+ {
+ serviceMetaData.setServiceRefName(usRef.getServiceRefName());
+ if (usRef.getHandlerChain() != null)
+ serviceMetaData.setHandlerChain(usRef.getHandlerChain());
+ }
}
/**
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -69,6 +69,7 @@
private Map<QName, EndpointMetaData> endpoints = new LinkedHashMap<QName, EndpointMetaData>();
private QName serviceName;
+ private String serviceRefName;
private String wsdName;
private URL wsdlLocation;
private URL mappingLocation;
@@ -111,6 +112,16 @@
return serviceName;
}
+ public String getServiceRefName()
+ {
+ return serviceRefName;
+ }
+
+ public void setServiceRefName(String serviceRefName)
+ {
+ this.serviceRefName = serviceRefName;
+ }
+
public String getWebserviceDescriptionName()
{
return wsdName;
@@ -376,9 +387,10 @@
{
StringBuilder buffer = new StringBuilder("\nServiceMetaData:");
buffer.append("\n qname=" + serviceName);
+ buffer.append("\n refName=" + serviceRefName);
buffer.append("\n wsdName=" + wsdName);
- buffer.append("\n wsdlFile=" + wsdlLocation);
- buffer.append("\n mappingFile=" + mappingLocation);
+ buffer.append("\n wsdlLocation=" + wsdlLocation);
+ buffer.append("\n jaxrpcMapping=" + mappingLocation);
buffer.append("\n handlerChain=" + handlerChain);
buffer.append("\n publishLocation=" + wsdlPublishLocation);
buffer.append("\n properties=" + properties);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -41,9 +41,13 @@
@HandlerChain(file = "jaxws-handlers.xml")
static Service service1;
+ // Service2 should have no client side handler chain
@WebServiceRef(name = "Service2")
static Service service2;
+ @WebServiceRef(name = "Service3")
+ static Service service3;
+
public static Map<String, String> testResult = new HashMap<String, String>();
public static void main(String[] args) throws Exception
@@ -81,4 +85,10 @@
Endpoint port = service2.getPort(Endpoint.class);
return port.echo(reqStr);
}
+
+ public String testService3(String reqStr) throws Exception
+ {
+ Endpoint port = service3.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-22 12:49:11 UTC (rev 2021)
@@ -88,16 +88,22 @@
assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
}
+ public void testHandlerChainNegative() throws Throwable
+ {
+ String resStr = invokeTestClient("testService2", "Kermit");
+ assertEquals("Kermit|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut", resStr);
+ }
+
public void testHandlerChainOverride() throws Throwable
{
- String resStr = invokeTestClient("testService2", "Kermit");
+ String resStr = invokeTestClient("testService3", "Kermit");
assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
}
private String invokeTestClient(String testName, String reqStr) throws Throwable
{
new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { testName, reqStr });
- String resStr = HandlerChainClient.testResult.get("testService1");
+ String resStr = HandlerChainClient.testResult.get(testName);
return resStr;
}
}
Modified: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml 2007-01-22 10:22:58 UTC (rev 2020)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml 2007-01-22 12:49:11 UTC (rev 2021)
@@ -15,4 +15,10 @@
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-jsr181-handlerchain/TestService?wsdl</wsdl-override>
</service-ref>
+ <service-ref>
+ <service-ref-name>Service3</service-ref-name>
+ <handler-chain>jaxws-handlers.xml</handler-chain>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-jsr181-handlerchain/TestService?wsdl</wsdl-override>
+ </service-ref>
+
</jboss-client>
\ No newline at end of file
17 years, 9 months
JBossWS SVN: r2020 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-22 05:22:58 -0500 (Mon, 22 Jan 2007)
New Revision: 2020
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/UnifiedServiceRefObjectFactory.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
Log:
Support service-ref/handler-chain
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/UnifiedServiceRefObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/UnifiedServiceRefObjectFactory.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/UnifiedServiceRefObjectFactory.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -115,6 +115,10 @@
{
ref.setConfigFile(value);
}
+ else if (localName.equals("handler-chain"))
+ {
+ ref.setHandlerChain(value);
+ }
else if (localName.equals("wsdl-override"))
{
ref.setWsdlLocation(value);
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -23,12 +23,21 @@
// $Id$
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jws.HandlerChain;
import javax.management.MBeanServer;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.xml.transform.Source;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
@@ -49,14 +58,56 @@
// logging support
private static Logger log = Logger.getLogger(WebServiceRefHandler.class);
- public void setupWebServiceRef(Context encCtx, String encName, Class targetClass, WebServiceRef wsref, VirtualFile vfsRoot, Source metadata) throws NamingException
+ public void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement anElement, VirtualFile vfsRoot, Source metadata) throws NamingException
{
+ WebServiceRef wsref = null;
+
+ // Build the list of @WebServiceRef relevant annotations
+ List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+ for (Annotation an : anElement.getAnnotations())
+ {
+ if (an instanceof WebServiceRef)
+ wsrefList.add((WebServiceRef)an);
+
+ if (an instanceof WebServiceRefs)
+ {
+ WebServiceRefs wsrefs = (WebServiceRefs)an;
+ for (WebServiceRef aux : wsrefs.value())
+ wsrefList.add(aux);
+ }
+ }
+
+ // Use the single @WebServiceRef
+ if (wsrefList.size() == 1)
+ {
+ wsref = wsrefList.get(0);
+ }
+ else
+ {
+ for (WebServiceRef aux : wsrefList)
+ {
+ if (encName.endsWith("/" + aux.name()))
+ {
+ wsref = aux;
+ break;
+ }
+ }
+ }
+
+ if (wsref == null)
+ throw new IllegalArgumentException("@WebServiceRef must be present on: " + anElement);
+
+ Class targetClass = null;
+ if (anElement instanceof Field)
+ targetClass = ((Field)anElement).getType();
+ else if (anElement instanceof Method)
+ targetClass = ((Method)anElement).getParameterTypes()[0];
+
String externalName = encCtx.getNameInNamespace() + "/" + encName;
- String refTypeName = (targetClass != null ? targetClass.getName() : null);
- log.debug("setupWebServiceRef [jndi=" + externalName + ",refType=" + refTypeName + "]");
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ log.debug("setupWebServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
String serviceClassName = null;
- String targetClassName = null;
// #1 Use the explicit @WebServiceRef.value
if (wsref.value() != Object.class)
@@ -88,6 +139,11 @@
if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length() > 0)
usRef.setWsdlLocation(wsref.wsdlLocation());
+ // Set the handlerChain from @HandlerChain on the annotated element
+ HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+ if (usRef.getHandlerChain() == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+ usRef.setHandlerChain(anHandlerChain.file());
+
Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName, targetClassName, usRef));
}
catch (RuntimeException rte)
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -22,11 +22,12 @@
package org.jboss.ws.integration.jboss50;
+import java.lang.reflect.AnnotatedElement;
+
import javax.management.ObjectName;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceRef;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.ObjectNameFactory;
@@ -41,5 +42,5 @@
/** Binds a JAXWS WebServiceRef into the callers ENC
*/
- void setupWebServiceRef(Context encCtx, String encName, Class refType, WebServiceRef wsref, VirtualFile vfsRoot, Source metadata) throws NamingException;
+ void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement enElement, VirtualFile vfsRoot, Source metadata) throws NamingException;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -90,6 +90,9 @@
{
Reference ref = (Reference)obj;
+ // Get the target class name
+ String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
+
// Unmarshall the UnifiedServiceRef
UnifiedServiceRef usRef = unmarshallServiceRef(ref);
String serviceRefName = usRef.getServiceRefName();
@@ -99,21 +102,21 @@
if (serviceClassName == null)
serviceClassName = (String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ // If the target defaults to javax.xml.ws.Service, user the service as the target
+ if (Service.class.getName().equals(targetClassName))
+ targetClassName = serviceClassName;
+
log.debug("Service class name: " + serviceClassName);
+ log.debug("Target class name: " + targetClassName);
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
Class serviceClass = ctxLoader.loadClass(serviceClassName);
+ Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
if (Service.class.isAssignableFrom(serviceClass) == false)
throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
- // Load the target class
- String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
- Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
-
- log.debug("Target class name: " + serviceClassName);
-
// Receives either a javax.xml.ws.Service or a dynamic proxy
Object target;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -47,6 +47,7 @@
private QName serviceQName;
private String configName;
private String configFile;
+ private String handlerChain;
private List<PortInfo> portInfos = new ArrayList<PortInfo>();
private String wsdlLocation;
@@ -90,41 +91,51 @@
this.serviceQName = serviceQName;
}
- public List<PortInfo> getPortInfos()
+ public String getConfigFile()
{
- return portInfos;
+ return configFile;
}
- public String getWsdlLocation()
+ public void setConfigFile(String configFile)
{
- return wsdlLocation;
+ this.configFile = configFile;
}
- public void setWsdlLocation(String wsdlLocation)
+ public String getConfigName()
{
- this.wsdlLocation = wsdlLocation;
+ return configName;
}
- public String getConfigFile()
+ public void setConfigName(String configName)
{
- return configFile;
+ this.configName = configName;
}
- public void setConfigFile(String configFile)
+ public String getHandlerChain()
{
- this.configFile = configFile;
+ return handlerChain;
}
- public String getConfigName()
+ public void setHandlerChain(String handlerChain)
{
- return configName;
+ this.handlerChain = handlerChain;
}
- public void setConfigName(String configName)
+ public List<PortInfo> getPortInfos()
{
- this.configName = configName;
+ return portInfos;
}
+ public String getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
public String toString()
{
StringBuffer sb = new StringBuffer(100);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -93,10 +93,6 @@
public ServiceDelegateImpl(URL wsdlURL, QName serviceName)
{
- // If this Service was constructed through the ServiceObjectFactory
- // this thread local association should be available
- usRef = ServiceObjectFactory.getUnifiedServiceRefAssociation();
-
if (wsdlURL != null)
{
JAXWSClientMetaDataBuilder builder = new JAXWSClientMetaDataBuilder();
@@ -108,6 +104,12 @@
serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
wsMetaData.addService(serviceMetaData);
}
+
+ // If this Service was constructed through the ServiceObjectFactory
+ // this thread local association should be available
+ usRef = ServiceObjectFactory.getUnifiedServiceRefAssociation();
+ if (usRef != null && usRef.getHandlerChain() != null)
+ serviceMetaData.setHandlerChain(usRef.getHandlerChain());
}
/**
@@ -196,7 +198,6 @@
private void assertSEIConstraints(Class seiClass)
{
-
if (seiClass == null)
throw new IllegalArgumentException("Service endpoint interface cannot be null");
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -192,8 +192,7 @@
epMetaData.configure(epMetaData);
// Process an optional @HandlerChain annotation
- if (wsClass.isAnnotationPresent(HandlerChain.class))
- processHandlerChain(epMetaData, wsClass);
+ processHandlerChain(epMetaData, wsClass);
// Process @WebMethod
processWebMethods(epMetaData, wsClass);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -152,10 +152,18 @@
if (wsClass.isAnnotationPresent(SOAPMessageHandlers.class))
throw new WSException("Cannot combine @HandlerChain with @SOAPMessageHandlers");
+ // The explicit handler chain on the service has priority
+ String filename = epMetaData.getServiceMetaData().getHandlerChain();
+
HandlerChain anHandlerChain = wsClass.getAnnotation(HandlerChain.class);
+ if (filename == null && anHandlerChain != null)
+ filename = anHandlerChain.file();
+ // Nothing to do
+ if (filename == null)
+ return;
+
URL fileURL = null;
- String filename = anHandlerChain.file();
log.debug("processHandlerChain [" + filename + "] on: " + wsClass.getName());
// Try the filename as URL
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -72,6 +72,7 @@
private String wsdName;
private URL wsdlLocation;
private URL mappingLocation;
+ private String handlerChain;
private String wsdlPublishLocation;
// The type mapping that is maintained by this service
@@ -130,6 +131,16 @@
this.wsdlLocation = wsdlLocation;
}
+ public String getHandlerChain()
+ {
+ return handlerChain;
+ }
+
+ public void setHandlerChain(String handlerChain)
+ {
+ this.handlerChain = handlerChain;
+ }
+
public String getWsdlPublishLocation()
{
return wsdlPublishLocation;
@@ -367,7 +378,8 @@
buffer.append("\n qname=" + serviceName);
buffer.append("\n wsdName=" + wsdName);
buffer.append("\n wsdlFile=" + wsdlLocation);
- buffer.append("\n jaxrpcFile=" + mappingLocation);
+ buffer.append("\n mappingFile=" + mappingLocation);
+ buffer.append("\n handlerChain=" + handlerChain);
buffer.append("\n publishLocation=" + wsdlPublishLocation);
buffer.append("\n properties=" + properties);
buffer.append("\n" + types);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -37,11 +37,13 @@
// provide logging
private static final Logger log = Logger.getLogger(HandlerChainClient.class);
- // Test on field
@WebServiceRef(name = "Service1")
@HandlerChain(file = "jaxws-handlers.xml")
static Service service1;
+ @WebServiceRef(name = "Service2")
+ static Service service2;
+
public static Map<String, String> testResult = new HashMap<String, String>();
public static void main(String[] args) throws Exception
@@ -73,4 +75,10 @@
Endpoint port = service1.getPort(Endpoint.class);
return port.echo(reqStr);
}
+
+ public String testService2(String reqStr) throws Exception
+ {
+ Endpoint port = service2.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -84,8 +84,20 @@
public void testHandlerChainOnWebServiceRef() throws Throwable
{
- new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { "testService1", "Kermit" });
- String resStr = HandlerChainClient.testResult.get("testService1");
+ String resStr = invokeTestClient("testService1", "Kermit");
assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
}
+
+ public void testHandlerChainOverride() throws Throwable
+ {
+ String resStr = invokeTestClient("testService2", "Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+
+ private String invokeTestClient(String testName, String reqStr) throws Throwable
+ {
+ new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { testName, reqStr });
+ String resStr = HandlerChainClient.testResult.get("testService1");
+ return resStr;
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2007-01-22 10:22:58 UTC (rev 2020)
@@ -70,7 +70,7 @@
if(true)
{
- System.out.println("FIXME (JBWS-1460): @XmlMimeType on SEI parameter declarations");
+ System.out.println("FIXME: [JBWS-1460] @XmlMimeType on SEI parameter declarations");
return;
}
Modified: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml 2007-01-21 22:53:12 UTC (rev 2019)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml 2007-01-22 10:22:58 UTC (rev 2020)
@@ -10,4 +10,9 @@
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-jsr181-handlerchain/TestService?wsdl</wsdl-override>
</service-ref>
+ <service-ref>
+ <service-ref-name>Service2</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-jsr181-handlerchain/TestService?wsdl</wsdl-override>
+ </service-ref>
+
</jboss-client>
\ No newline at end of file
17 years, 9 months
JBossWS SVN: r2019 - in trunk: jbossws-tests/ant-import and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-21 17:53:12 -0500 (Sun, 21 Jan 2007)
New Revision: 2019
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointService.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointWithHandlerChain.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
Modified:
trunk/jbossws-core/src/main/java/javax/jws/HandlerChain.java
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/Endpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
Log:
Add support for @HandlerChain on field, method\nMore to come
Modified: trunk/jbossws-core/src/main/java/javax/jws/HandlerChain.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/jws/HandlerChain.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-core/src/main/java/javax/jws/HandlerChain.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -34,13 +34,11 @@
* handler configuration needs to be shared across multiple Web Services, or where the handler chain consists of
* handlers for multiple transports.
*
- * It is an error to combine this annotation with the @SOAPMessageHandlers annotation.
- *
* @author thomas.diesler(a)jboss.org
* @since 26-Apr-2005
*/
@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE })
+@Target(value = { ElementType.TYPE, ElementType.METHOD, ElementType.FIELD })
public @interface HandlerChain
{
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-21 22:53:12 UTC (rev 2019)
@@ -216,7 +216,7 @@
</war>
<!-- jaxws-jsr181-handlerchain -->
- <copy todir="${tests.output.dir}/classes/org/jboss/test/ws/jaxws/jsr181/handlerchain" file="${tests.output.dir}/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml"/>
+ <copy todir="${tests.output.dir}/classes/org/jboss/test/ws/jaxws/jsr181/handlerchain" file="${tests.output.dir}/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml"/>
<war warfile="${tests.output.dir}/libs/jaxws-jsr181-handlerchain.war" webxml="${tests.output.dir}/resources/jaxws/jsr181/handlerchain/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointImpl.class"/>
@@ -225,6 +225,21 @@
<include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/jaxws-handlers.xml"/>
</classes>
</war>
+ <jar destfile="${tests.output.dir}/libs/jaxws-jsr181-handlerchain-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/*Handler.class"/>
+ <include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/jsr181/handlerchain/jaxws-handlers.xml"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jsr181/handlerchain/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.jsr181.handlerchain.HandlerChainClient"/>
+ </manifest>
+ </jar>
<!-- jaxws-jsr181-oneway -->
<war warfile="${tests.output.dir}/libs/jaxws-jsr181-oneway.war" webxml="${tests.output.dir}/resources/jaxws/jsr181/oneway/WEB-INF/web.xml">
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/Endpoint.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/Endpoint.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/Endpoint.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -21,15 +21,12 @@
*/
package org.jboss.test.ws.jaxws.jsr181.handlerchain;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface Endpoint extends Remote
+public interface Endpoint
{
- public String echo(String input) throws RemoteException;
+ public String echo(String input);
}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointService.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointService.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointService.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -0,0 +1,20 @@
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+public class EndpointService extends Service
+{
+ public EndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public Endpoint getEndpointPort()
+ {
+ return (Endpoint)super.getPort(Endpoint.class);
+ }
+
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointWithHandlerChain.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointWithHandlerChain.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointWithHandlerChain.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(file = "jaxws-handlers.xml") // relative path from the class file
+public interface EndpointWithHandlerChain
+{
+ public String echo(String input);
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/EndpointWithHandlerChain.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jsr181.handlerchain;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+
+public class HandlerChainClient
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerChainClient.class);
+
+ // Test on field
+ @WebServiceRef(name = "Service1")
+ @HandlerChain(file = "jaxws-handlers.xml")
+ static Service service1;
+
+ public static Map<String, String> testResult = new HashMap<String, String>();
+
+ public static void main(String[] args) throws Exception
+ {
+ String testName = args[0];
+ String reqStr = args[1];
+
+ HandlerChainClient client = new HandlerChainClient();
+ Method method = HandlerChainClient.class.getMethod(testName, new Class[] { String.class });
+ try
+ {
+ String retStr = (String)method.invoke(client, reqStr);
+ testResult.put(testName, retStr);
+ }
+ catch (InvocationTargetException ex)
+ {
+ log.error("Invocation error", ex);
+ testResult.put(testName, ex.getTargetException().toString());
+ }
+ catch (Exception ex)
+ {
+ log.error("Error", ex);
+ testResult.put(testName, ex.toString());
+ }
+ }
+
+ public String testService1(String reqStr) throws Exception
+ {
+ Endpoint port = service1.getPort(Endpoint.class);
+ return port.echo(reqStr);
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/HandlerChainClient.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/handlerchain/JSR181HandlerChainTestCase.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -32,6 +32,7 @@
import junit.framework.Test;
+import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
@@ -47,10 +48,10 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(JSR181HandlerChainTestCase.class, "jaxws-jsr181-handlerchain.war");
+ return JBossWSTestSetup.newTestSetup(JSR181HandlerChainTestCase.class, "jaxws-jsr181-handlerchain.war, jaxws-jsr181-handlerchain-client.jar");
}
- public void testHandlerChain() throws Exception
+ public void testDynamicHandlerChain() throws Exception
{
QName serviceName = new QName(targetNS, "EndpointImplService");
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
@@ -65,7 +66,26 @@
handlerChain.add(new RoutingHandler());
bindingProvider.getBinding().setHandlerChain(handlerChain);
- String retObj = port.echo("Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", retObj);
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
}
+
+ public void testHandlerChainOnServiceEndpointInterface() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "EndpointImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-handlerchain/TestService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ EndpointWithHandlerChain port = (EndpointWithHandlerChain)service.getPort(EndpointWithHandlerChain.class);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
+
+ public void testHandlerChainOnWebServiceRef() throws Throwable
+ {
+ new ClientLauncher().launch(HandlerChainClient.class.getName(), "jbossws-client", new String[] { "testService1", "Kermit" });
+ String resStr = HandlerChainClient.testResult.get("testService1");
+ assertEquals("Kermit|LogOut|AuthOut|RoutOut|LogIn|AuthIn|RoutIn|endpoint|RoutOut|AuthOut|LogOut|RoutIn|AuthIn|LogIn", resStr);
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -33,15 +33,15 @@
private static Logger log = Logger.getLogger(SecureEndpointClient.class);
@WebServiceRef(name = "SecureService1")
- public static SecureEndpointService secureService1;
+ static SecureEndpointService secureService1;
@WebServiceRef(name = "SecureService2")
- public static Service secureService2;
+ static Service secureService2;
@WebServiceRef(name = "SecurePort1")
- public static SecureEndpoint securePort1;
+ static SecureEndpoint securePort1;
- public static String retStr;
+ static String retStr;
public static void main(String[] args)
{
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import javax.naming.InitialContext;
-import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
@@ -45,15 +44,15 @@
// Test on field with name
@WebServiceRef(name = "TestEndpointService3")
- public static TestEndpointService service3;
+ static TestEndpointService service3;
// Test on field without name
@WebServiceRef
- public static TestEndpointService service4;
+ static TestEndpointService service4;
// Test on method with name
@WebServiceRef(name = "TestEndpointService5")
- public static void setServiceSetter5(TestEndpointService service)
+ static void setServiceSetter5(TestEndpointService service)
{
TestEndpointClientOne.service5 = service;
}
@@ -61,7 +60,7 @@
// Test on method without name
@WebServiceRef
- public static void setServiceSetter6(TestEndpointService service)
+ static void setServiceSetter6(TestEndpointService service)
{
TestEndpointClientOne.service6 = service;
}
@@ -69,22 +68,22 @@
// Test on field with name and value
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
- public static TestEndpoint port2;
+ static TestEndpoint port2;
// Test on field with value
@WebServiceRef(value = TestEndpointService.class)
- public static TestEndpoint port3;
+ static TestEndpoint port3;
// Test on field
@WebServiceRef
- public static TestEndpoint port4;
+ static TestEndpoint port4;
// Test on field with name
@WebServiceRef (name = "Port5")
- public static TestEndpoint port5;
+ static TestEndpoint port5;
- public static InitialContext iniCtx;
- public static String retStr;
+ static InitialContext iniCtx;
+ static String retStr;
public static void main(String[] args)
{
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2007-01-21 18:51:37 UTC (rev 2018)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2007-01-21 22:53:12 UTC (rev 2019)
@@ -46,22 +46,22 @@
// Test on field
@WebServiceRef(name = "Service3")
- public static Service service3;
+ static Service service3;
// Test on field
@WebServiceRef(name = "Service4")
- public static TestEndpointService service4;
+ static TestEndpointService service4;
// Test on field
@WebServiceRef(name = "Port2")
- public static TestEndpoint port2;
+ static TestEndpoint port2;
// Test on field
@WebServiceRef(name = "Port3")
- public static TestEndpoint port3;
+ static TestEndpoint port3;
- public static InitialContext iniCtx;
- public static Map<String, String> testResult = new HashMap<String, String>();
+ static InitialContext iniCtx;
+ static Map<String, String> testResult = new HashMap<String, String>();
public static void main(String[] args) throws Exception
{
Added: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/application-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/application-client.xml 2007-01-21 22:53:12 UTC (rev 2019)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+
+ <display-name>EndpointService</display-name>
+
+</application-client>
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml 2007-01-21 22:53:12 UTC (rev 2019)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>Service1</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-jsr181-handlerchain/TestService?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 9 months
JBossWS SVN: r2018 - in trunk: integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-21 13:51:37 -0500 (Sun, 21 Jan 2007)
New Revision: 2018
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/AbstractWebServiceContext.java
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextImpl.java
Modified:
trunk/build/version.properties
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
Log:
Implement WebServiceContext.getUserPrincipal(), isUserInRole() for JSE
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/build/version.properties 2007-01-21 18:51:37 UTC (rev 2018)
@@ -6,7 +6,7 @@
specification.version=jbossws-2.0
version.id=1.2.0.CR3
-repository.id=1.2.0.CR3
+repository.id=snapshot
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-01-21 18:51:37 UTC (rev 2018)
@@ -44,7 +44,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.WebServiceContextImpl;
+import org.jboss.ws.core.jaxws.AbstractWebServiceContext;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
@@ -173,7 +173,7 @@
if (beanProp != null)
{
EJBContext ejbCtx = beanCtx.getEJBContext();
- beanProp.set(beanCtx.getInstance(), new EJB3WebServiceContextImpl(jaxwsMessageContext, ejbCtx));
+ beanProp.set(beanCtx.getInstance(), new WebServiceContextEJB(jaxwsMessageContext, ejbCtx));
}
}
@@ -190,11 +190,11 @@
/** Delegate to EJBContext
*/
- class EJB3WebServiceContextImpl extends WebServiceContextImpl
+ class WebServiceContextEJB extends AbstractWebServiceContext
{
private EJBContext ejbContext;
- public EJB3WebServiceContextImpl(MessageContext messageContext, EJBContext ejbContext)
+ public WebServiceContextEJB(MessageContext messageContext, EJBContext ejbContext)
{
super(messageContext);
this.ejbContext = ejbContext;
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/AbstractWebServiceContext.java (from rev 2015, trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextImpl.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/AbstractWebServiceContext.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/AbstractWebServiceContext.java 2007-01-21 18:51:37 UTC (rev 2018)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxws;
+
+import java.security.Principal;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.util.NotImplementedException;
+import org.w3c.dom.Element;
+
+/**
+ * A WebServiceContext makes it possible for a web service endpoint implementation
+ * class to access message context and security information relative to a request
+ * being served. Typically a WebServiceContext is injected into an endpoint implementation
+ * class using the Resource annotation.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 03-May-2006
+ */
+public abstract class AbstractWebServiceContext implements WebServiceContext
+{
+ private MessageContext messageContext;
+
+ public AbstractWebServiceContext(MessageContext messageContext)
+ {
+ this.messageContext = messageContext;
+ }
+
+ public MessageContext getMessageContext()
+ {
+ return messageContext;
+ }
+
+ public abstract Principal getUserPrincipal();
+
+ public abstract boolean isUserInRole(String role);
+
+ public EndpointReference getEndpointReference(Element... referenceParameters)
+ {
+ throw new NotImplementedException();
+ }
+
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextImpl.java 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextImpl.java 2007-01-21 18:51:37 UTC (rev 2018)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxws;
-
-import java.security.Principal;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.util.NotImplementedException;
-import org.w3c.dom.Element;
-
-/**
- * A WebServiceContext makes it possible for a web service endpoint implementation
- * class to access message context and security information relative to a request
- * being served. Typically a WebServiceContext is injected into an endpoint implementation
- * class using the Resource annotation.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 03-May-2006
- */
-public class WebServiceContextImpl implements WebServiceContext
-{
- private MessageContext messageContext;
-
-
- public WebServiceContextImpl(MessageContext messageContext)
- {
- this.messageContext = messageContext;
- }
-
- public MessageContext getMessageContext()
- {
- return messageContext;
- }
-
- public Principal getUserPrincipal()
- {
- throw new NotImplementedException();
- }
-
- public boolean isUserInRole(String role)
- {
- throw new NotImplementedException();
- }
-
- public EndpointReference getEndpointReference(Element... referenceParameters)
- {
- throw new NotImplementedException();
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
- {
- throw new NotImplementedException();
- }
-}
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java 2007-01-21 18:51:37 UTC (rev 2018)
@@ -25,13 +25,20 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Set;
import javax.annotation.Resource;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.WebServiceContextImpl;
+import org.jboss.security.RealmMapping;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SimplePrincipal;
/**
* Inject the JAXWS WebServiceContext
@@ -44,9 +51,9 @@
// provide logging
private static Logger log = Logger.getLogger(WebServiceContextInjector.class);
- public static void injectContext(Object epImpl, MessageContext msgContext)
+ public void injectContext(Object epImpl, MessageContext msgContext)
{
- WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgContext);
+ AbstractWebServiceContext webServiceContext = new WebServiceContextJSE(msgContext);
try
{
// scan fields that are marked with @Resource
@@ -82,4 +89,54 @@
log.warn("Cannot inject WebServiceContext", ex);
}
}
+
+ class WebServiceContextJSE extends AbstractWebServiceContext
+ {
+ private RealmMapping realmMapping;
+
+ public WebServiceContextJSE(MessageContext messageContext)
+ {
+ super(messageContext);
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ Principal principal = SecurityAssociation.getCallerPrincipal();
+ return principal;
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ boolean isUserInRole = false;
+ Principal principal = SecurityAssociation.getCallerPrincipal();
+ RealmMapping realmMapping = getRealmMapping();
+ if (realmMapping != null && principal != null)
+ {
+ Set<Principal> roles = new HashSet<Principal>();
+ roles.add(new SimplePrincipal(role));
+ isUserInRole = realmMapping.doesUserHaveRole(principal, roles);
+ }
+ return isUserInRole;
+ }
+
+ private RealmMapping getRealmMapping()
+ {
+ if (realmMapping == null)
+ {
+ String lookupName = "java:comp/env/security/realmMapping";
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ realmMapping = (RealmMapping) iniCtx.lookup(lookupName);
+ }
+ catch (NamingException e)
+ {
+ log.debug("Cannot obtain realm mapping from: " + lookupName);
+ }
+ }
+ return realmMapping;
+ }
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-01-21 18:51:37 UTC (rev 2018)
@@ -89,7 +89,7 @@
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext instanceof SOAPMessageContextJAXWS)
- WebServiceContextInjector.injectContext(seiImpl, (SOAPMessageContextJAXWS)msgContext);
+ new WebServiceContextInjector().injectContext(seiImpl, (SOAPMessageContextJAXWS)msgContext);
Class implClass = seiImpl.getClass();
Method seiMethod = epInv.getJavaMethod();
Modified: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml 2007-01-21 17:53:05 UTC (rev 2017)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml 2007-01-21 18:51:37 UTC (rev 2018)
@@ -1,7 +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">
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
- <security-domain>JBossWS</security-domain>
+ <security-domain>java:/jaas/JBossWS</security-domain>
</jboss-web>
\ No newline at end of file
17 years, 9 months
JBossWS SVN: r2017 - in trunk: integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-21 12:53:05 -0500 (Sun, 21 Jan 2007)
New Revision: 2017
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/TestEndpoint.java
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl
Removed:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl
Modified:
trunk/integration-jboss50/.classpath
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointEJB.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/web.xml
Log:
Implement WebServiceContext.getUserPrincipal(), isUserInRole()
Modified: trunk/integration-jboss50/.classpath
===================================================================
--- trunk/integration-jboss50/.classpath 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/integration-jboss50/.classpath 2007-01-21 17:53:05 UTC (rev 2017)
@@ -29,7 +29,7 @@
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xercesImpl.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/mail.jar"/>
+ <classpathentry kind="lib" path="/build/thirdparty/jbosssx-client.jar" sourcepath="/build/thirdparty/jbosssx-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
- <classpathentry kind="lib" path="/build/thirdparty/jbosssx-client.jar" sourcepath="/build/thirdparty/jbosssx-src.zip"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -24,20 +24,27 @@
// $Id$
import java.lang.reflect.Method;
+import java.security.Principal;
+import javax.ejb.EJBContext;
import javax.management.ObjectName;
import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.handler.MessageContext;
import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.stateless.StatelessBeanContext;
import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.injection.lang.reflect.BeanProperty;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.WebServiceContextImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
@@ -113,23 +120,15 @@
StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
Class beanClass = container.getBeanClass();
- SOAPMessageContextJAXWS jaxwsMessageContext = null;
- SOAPMessageContextJAXRPC jaxrpcMessageContext = null;
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof SOAPMessageContextJAXRPC)
- {
- jaxrpcMessageContext = (SOAPMessageContextJAXRPC)msgContext;
- jaxwsMessageContext = new SOAPMessageContextJAXWS(msgContext);
- }
- else if (msgContext instanceof SOAPMessageContextJAXWS)
- {
- jaxwsMessageContext = (SOAPMessageContextJAXWS)msgContext;
- jaxrpcMessageContext = new SOAPMessageContextJAXRPC(msgContext);
- }
-
Method implMethod = getImplMethod(beanClass, seiMethod);
- BeanContextLifecycleCallback callback = new CallbackImpl(jaxrpcMessageContext, jaxwsMessageContext);
- Object retObj = container.localInvoke(implMethod, args, null, callback);
+ MethodInfo info = container.getMethodInfo(implMethod);
+
+ EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+ ejb3Inv.setAdvisor(container);
+ ejb3Inv.setArguments(args);
+ ejb3Inv.setContextCallback(new CallbackImpl());
+
+ Object retObj = ejb3Inv.invokeNext();
epInv.setReturnValue(retObj);
}
@@ -150,24 +149,67 @@
private SOAPMessageContextJAXWS jaxwsMessageContext;
private SOAPMessageContextJAXRPC jaxrpcMessageContext;
- public CallbackImpl(SOAPMessageContextJAXRPC jaxrpcMessageContext, SOAPMessageContextJAXWS jaxwsMessageContext)
+ public CallbackImpl()
{
- this.jaxwsMessageContext = jaxwsMessageContext;
- this.jaxrpcMessageContext = jaxrpcMessageContext;
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext instanceof SOAPMessageContextJAXRPC)
+ {
+ jaxrpcMessageContext = (SOAPMessageContextJAXRPC)msgContext;
+ jaxwsMessageContext = new SOAPMessageContextJAXWS(msgContext);
+ }
+ else if (msgContext instanceof SOAPMessageContextJAXWS)
+ {
+ jaxwsMessageContext = (SOAPMessageContextJAXWS)msgContext;
+ jaxrpcMessageContext = new SOAPMessageContextJAXRPC(msgContext);
+ }
}
- public void attached(BeanContext ctx)
+ public void attached(BeanContext beanCtx)
{
- StatelessBeanContext sbc = (StatelessBeanContext)ctx;
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
- sbc.setMessageContextJAXWS(jaxwsMessageContext);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ {
+ EJBContext ejbCtx = beanCtx.getEJBContext();
+ beanProp.set(beanCtx.getInstance(), new EJB3WebServiceContextImpl(jaxwsMessageContext, ejbCtx));
+ }
}
- public void released(BeanContext ctx)
+ public void released(BeanContext beanCtx)
{
- StatelessBeanContext sbc = (StatelessBeanContext)ctx;
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
sbc.setMessageContextJAXRPC(null);
- sbc.setMessageContextJAXWS(null);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ beanProp.set(beanCtx.getInstance(), null);
}
}
+
+ /** Delegate to EJBContext
+ */
+ class EJB3WebServiceContextImpl extends WebServiceContextImpl
+ {
+ private EJBContext ejbContext;
+
+ public EJB3WebServiceContextImpl(MessageContext messageContext, EJBContext ejbContext)
+ {
+ super(messageContext);
+ this.ejbContext = ejbContext;
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ return ejbContext.getCallerPrincipal();
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ return ejbContext.isCallerInRole(role);
+ }
+ }
}
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-21 17:53:05 UTC (rev 2017)
@@ -50,13 +50,14 @@
<war warfile="${tests.output.dir}/libs/jaxws-context.war" webxml="${tests.output.dir}/resources/jaxws/context/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/context/EndpointJSE.class"/>
- <include name="org/jboss/test/ws/jaxws/context/EndpointInterface.class"/>
</classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/context/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
</war>
<jar jarfile="${tests.output.dir}/libs/jaxws-context.jar">
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/context/EndpointEJB.class"/>
- <include name="org/jboss/test/ws/jaxws/context/EndpointInterface.class"/>
</fileset>
</jar>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextEJBTestCase.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -24,18 +24,16 @@
// $Id$
import java.io.File;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS WebServiceContext
@@ -45,35 +43,42 @@
*/
public class ContextEJBTestCase extends JBossWSTest
{
+ private static TestEndpoint port;
+
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(ContextEJBTestCase.class, "jaxws-context.jar");
+ return JBossWSTestSetup.newTestSetup(ContextJSETestCase.class, "jaxws-context.jar");
}
- public void testWSDLAccess() throws MalformedURLException
+ public void setUp() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-context?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ if (port == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+ }
}
-
- public void testClientAccess() throws Exception
+
+ public void testGetWebContext() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl").toURL();
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestService");
- Service service = Service.create(wsdlURL, qname);
- EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
-
- if (isTargetJBoss50() == false)
- {
- System.out.println("FIXME: [JBWS-1443] - getMessageContext Not Implemented");
- return;
- }
-
- String helloWorld = "Hello world!";
- Object retObj = port.echo(helloWorld);
- assertEquals(helloWorld + "/" + helloWorld, retObj);
+ String retStr = port.testGetMessageContext();
+ assertEquals("pass", retStr);
}
-
+
+ public void testGetUserPrincipal() throws Exception
+ {
+ String retStr = port.testGetUserPrincipal();
+ assertEquals("kermit", retStr);
+ }
+
+ public void testIsUserInRole() throws Exception
+ {
+ assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/ContextJSETestCase.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -24,18 +24,16 @@
// $Id$
import java.io.File;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS WebServiceContext
@@ -45,30 +43,42 @@
*/
public class ContextJSETestCase extends JBossWSTest
{
+ private static TestEndpoint port;
+
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(ContextJSETestCase.class, "jaxws-context.war");
}
- public void testWSDLAccess() throws MalformedURLException
+ public void setUp() throws Exception
{
-
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-context?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ if (port == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+ }
}
-
- public void testClientAccess() throws Exception
+
+ public void testGetWebContext() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl").toURL();
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestService");
- Service service = Service.create(wsdlURL, qname);
- EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
-
- String helloWorld = "Hello world!";
- Object retObj = port.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String retStr = port.testGetMessageContext();
+ assertEquals("pass", retStr);
}
-
+
+ public void testGetUserPrincipal() throws Exception
+ {
+ String retStr = port.testGetUserPrincipal();
+ assertEquals("kermit", retStr);
+ }
+
+ public void testIsUserInRole() throws Exception
+ {
+ assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointEJB.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointEJB.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointEJB.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -23,57 +23,50 @@
// $Id$
+import java.security.Principal;
+
import javax.annotation.Resource;
-import javax.ejb.SessionContext;
+import javax.annotation.security.RolesAllowed;
import javax.ejb.Stateless;
+import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import org.jboss.annotation.security.SecurityDomain;
import org.jboss.ws.annotation.WebContext;
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.context.EndpointInterface", serviceName = "TestService", targetNamespace = "http://org.jboss.ws/jaxws/context")
-@WebContext(contextRoot = "/jaxws-context", urlPattern = "/*")
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/context")
+@SOAPBinding(style = Style.RPC)
@Stateless
+
+@WebContext(contextRoot = "/jaxws-context", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+@SecurityDomain("JBossWS")
+@RolesAllowed("friend")
public class EndpointEJB
{
@Resource
WebServiceContext wsCtx;
- @Resource
- SessionContext ejbCtx;
-
- public String echo(String input)
+ @WebMethod
+ public String testGetMessageContext()
{
- try
- {
- String retValue = getValueJAXWS() + "/" + getValueJAXRPC();
- return retValue;
- }
- catch (SOAPException ex)
- {
- throw new WebServiceException(ex);
- }
+ SOAPMessageContext jaxwsContext = (SOAPMessageContext)wsCtx.getMessageContext();
+ return jaxwsContext != null ? "pass" : "fail";
}
- private String getValueJAXWS() throws SOAPException
+ @WebMethod
+ public String testGetUserPrincipal()
{
- javax.xml.ws.handler.soap.SOAPMessageContext jaxwsContext = (javax.xml.ws.handler.soap.SOAPMessageContext)wsCtx.getMessageContext();
- SOAPMessage soapMessage = jaxwsContext.getMessage();
- SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
- soapElement = (SOAPElement)soapElement.getChildElements().next();
- return soapElement.getValue();
+ Principal principal = wsCtx.getUserPrincipal();
+ return principal.getName();
}
- private String getValueJAXRPC() throws SOAPException
+ @WebMethod
+ public boolean testIsUserInRole(String role)
{
- javax.xml.rpc.handler.soap.SOAPMessageContext jaxrpcContext = (javax.xml.rpc.handler.soap.SOAPMessageContext)ejbCtx.getMessageContext();
- SOAPMessage soapMessage = jaxrpcContext.getMessage();
- SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
- soapElement = (SOAPElement)soapElement.getChildElements().next();
- return soapElement.getValue();
+ return wsCtx.isUserInRole(role);
}
}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.context;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@WebService(targetNamespace = "http://org.jboss.ws/jaxws/context")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface EndpointInterface extends Remote
-{
- String echo(String input) throws RemoteException;
-}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -23,34 +23,40 @@
// $Id: $
+import java.security.Principal;
+
import javax.annotation.Resource;
+import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.context.EndpointInterface", serviceName = "TestService", targetNamespace = "http://org.jboss.ws/jaxws/context")
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/context")
+@SOAPBinding(style = Style.RPC)
public class EndpointJSE
{
@Resource
WebServiceContext wsCtx;
- public String echo(String input)
+ @WebMethod
+ public String testGetMessageContext()
{
- try
- {
- SOAPMessageContext msgContext = (SOAPMessageContext)wsCtx.getMessageContext();
- SOAPMessage soapMessage = msgContext.getMessage();
- SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
- soapElement = (SOAPElement)soapElement.getChildElements().next();
- return soapElement.getValue();
- }
- catch (SOAPException ex)
- {
- throw new WebServiceException(ex);
- }
+ SOAPMessageContext jaxwsContext = (SOAPMessageContext)wsCtx.getMessageContext();
+ return jaxwsContext != null ? "pass" : "fail";
}
+
+ @WebMethod
+ public String testGetUserPrincipal()
+ {
+ Principal principal = wsCtx.getUserPrincipal();
+ return principal.getName();
+ }
+
+ @WebMethod
+ public boolean testIsUserInRole(String role)
+ {
+ return wsCtx.isUserInRole(role);
+ }
}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/TestEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/TestEndpoint.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/TestEndpoint.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -0,0 +1,53 @@
+
+package org.jboss.test.ws.jaxws.context;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/context")
+@SOAPBinding(style = Style.RPC)
+public interface TestEndpoint {
+
+
+ /**
+ *
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/context", partName = "return")
+ public String testGetMessageContext();
+
+ /**
+ *
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/context", partName = "return")
+ public String testGetUserPrincipal();
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns boolean
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/context", partName = "return")
+ public boolean testIsUserInRole(
+ @WebParam(name = "arg0", partName = "arg0")
+ String arg0);
+
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-01-21 17:53:05 UTC (rev 2017)
@@ -35,10 +35,10 @@
@WebService(name = "SecureEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
@Stateless(name = "SecureEndpoint")
@SOAPBinding(style = Style.RPC)
-@RolesAllowed("friend")
@WebContext(authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
@SecurityDomain("JBossWS")
+@RolesAllowed("friend")
public class SecureEndpointImpl
{
// Provide logging
Added: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml 2007-01-21 17:53:05 UTC (rev 2017)
@@ -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>
+ <security-domain>JBossWS</security-domain>
+</jboss-web>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/web.xml 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/web.xml 2007-01-21 17:53:05 UTC (rev 2017)
@@ -1,19 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+
<servlet>
<servlet-name>TestService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.context.EndpointJSE</servlet-class>
</servlet>
-
+
<servlet-mapping>
<servlet-name>TestService</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
-
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>TestService</web-resource-name>
+ <url-pattern>/*</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>friend</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>Security Realm</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>friend</role-name>
+ </security-role>
+
</web-app>
Added: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl 2007-01-21 17:53:05 UTC (rev 2017)
@@ -0,0 +1,66 @@
+<definitions name='TestEndpointService' targetNamespace='http://org.jboss.ws/jaxws/context' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/jaxws/context' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='TestEndpoint_testIsUserInRole'>
+ <part name='arg0' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_testGetMessageContext'></message>
+ <message name='TestEndpoint_testGetUserPrincipal'></message>
+ <message name='TestEndpoint_testGetUserPrincipalResponse'>
+ <part name='return' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_testGetMessageContextResponse'>
+ <part name='return' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_testIsUserInRoleResponse'>
+ <part name='return' type='xsd:boolean'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='testGetMessageContext'>
+ <input message='tns:TestEndpoint_testGetMessageContext'/>
+ <output message='tns:TestEndpoint_testGetMessageContextResponse'/>
+ </operation>
+ <operation name='testGetUserPrincipal'>
+ <input message='tns:TestEndpoint_testGetUserPrincipal'/>
+ <output message='tns:TestEndpoint_testGetUserPrincipalResponse'/>
+ </operation>
+ <operation name='testIsUserInRole' parameterOrder='arg0'>
+ <input message='tns:TestEndpoint_testIsUserInRole'/>
+ <output message='tns:TestEndpoint_testIsUserInRoleResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='testGetMessageContext'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </output>
+ </operation>
+ <operation name='testGetUserPrincipal'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </output>
+ </operation>
+ <operation name='testIsUserInRole'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/jaxws/context' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestEndpointService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='http://@jbosstest.host.name@:8080/jaxws-context'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestEndpoint.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl 2007-01-21 13:08:14 UTC (rev 2016)
+++ trunk/jbossws-tests/src/main/resources/jaxws/context/WEB-INF/wsdl/TestService.wsdl 2007-01-21 17:53:05 UTC (rev 2017)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="TestService" targetNamespace="http://org.jboss.ws/jaxws/context" xmlns:tns="http://org.jboss.ws/jaxws/context"
- xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- <types/>
- <message name="EndpointInterface_echo">
- <part name="String_1" type="xsd:string"/>
- </message>
- <message name="EndpointInterface_echoResponse">
- <part name="result" type="xsd:string"/>
- </message>
- <portType name="EndpointInterface">
- <operation name="echo" parameterOrder="String_1">
- <input message="tns:EndpointInterface_echo"/>
- <output message="tns:EndpointInterface_echoResponse"/>
- </operation>
- </portType>
- <binding name="EndpointInterfaceBinding" type="tns:EndpointInterface">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
- <operation name="echo">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal" namespace="http://org.jboss.ws/jaxws/context"/>
- </input>
- <output>
- <soap:body use="literal" namespace="http://org.jboss.ws/jaxws/context"/>
- </output>
- </operation>
- </binding>
- <service name="TestService">
- <port name="EndpointInterfacePort" binding="tns:EndpointInterfaceBinding">
- <soap:address location="http://@jbosstest.host.name@:8080/jaxws-context"/>
- </port>
- </service>
-</definitions>
17 years, 9 months