[jbossws-commits] JBossWS SVN: r3183 - in trunk: integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42 and 37 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue May 22 09:06:14 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-05-22 09:06:13 -0400 (Tue, 22 May 2007)
New Revision: 3183
Added:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityHandler.java
trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wseventing/
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/
trunk/jbossws-core/src/test/resources/jaxws/samples/
trunk/jbossws-core/src/test/resources/jaxws/samples/webserviceref/
trunk/jbossws-core/src/test/resources/jaxws/samples/wsaddressing/
trunk/jbossws-core/src/test/resources/jaxws/samples/wseventing/
trunk/jbossws-core/src/test/resources/jaxws/samples/wssecurity/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/WebParamTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/WebResultTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceEJB3TestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceJSETestCase.java
Removed:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB3.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityRolesHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/JSR181OneWayTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/JSR181SOAPBindingTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/JSR181WebMethodTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceBase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceJSETestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsaddressing/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wseventing/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wssecurity/
trunk/testsuite/src/resources/jaxws/samples/handlerchain/META-INF/
trunk/testsuite/src/resources/jaxws/samples/jsr181ejb/
trunk/testsuite/src/resources/jaxws/samples/jsr181pojo/
trunk/testsuite/src/resources/jaxws/samples/webserviceref/
trunk/testsuite/src/resources/jaxws/samples/wsaddressing/
trunk/testsuite/src/resources/jaxws/samples/wseventing/
trunk/testsuite/src/resources/jaxws/samples/wssecurity/
Modified:
trunk/build/build.xml
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
trunk/integration/jboss50/ant-import/build-thirdparty.xml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeployer.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java
trunk/integration/jbws/ant-import/build-deploy.xml
trunk/integration/jbws/ant-import/build-testsuite.xml
trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
trunk/integration/jbws/src/test/resources/excludes-jboss50.txt
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java
trunk/integration/sunri/.classpath
trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
trunk/integration/xfire/.classpath
trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
trunk/jbossws-core/ant-import-tests/build-testsuite.xml
trunk/testsuite/.classpath
trunk/testsuite/ant-import/build-jars-jaxws.xml
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/application.xml
trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/jboss-app.xml
Log:
Fix testsuite/native
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/build/build.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -69,9 +69,10 @@
<ant antfile="${int.jbws.dir}/build.xml" target="most" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml" target="most" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml" target="most" inheritall="false"/>
+ <ant antfile="${core.dir}/build.xml" target="tests-main" inheritall="false"/>
</target>
- <target name="all" description="Create a distribution zip file" depends="most,build-bin-dist,build-src-dist">
+ <target name="all" description="Create a distribution zip file" depends="most"> <!--build-bin-dist,build-src-dist -->
</target>
</project>
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -32,6 +32,7 @@
import org.jboss.metadata.EjbPortComponentMetaData;
import org.jboss.metadata.MessageDrivenMetaData;
import org.jboss.metadata.SessionMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
@@ -48,9 +49,9 @@
*/
public class ApplicationMetaDataAdapter
{
- public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep, UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
{
- udi.addAttachment(ApplicationMetaData.class, apmd);
+ dep.getContext().addAttachment(ApplicationMetaData.class, apmd);
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
buildUnifiedBeanMetaData(umd, apmd);
@@ -60,7 +61,7 @@
umd.setSecurityDomain(apmd.getSecurityDomain());
umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
- udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -34,6 +34,7 @@
import org.jboss.mx.util.MBeanProxy;
import org.jboss.mx.util.MBeanProxyCreationException;
import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.WSDeploymentException;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
@@ -50,7 +51,7 @@
// logging support
private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptorEJB3.class);
- public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi)
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep, UnifiedDeploymentInfo udi)
{
Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
@@ -70,7 +71,7 @@
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
umd.setEnterpriseBeans(beans);
- udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -32,6 +32,7 @@
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
/**
@@ -45,14 +46,14 @@
// logging support
private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
- public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
+ public static UnifiedDeploymentInfo buildDeploymentInfo(Deployment dep, UnifiedDeploymentInfo udi, DeploymentInfo di)
{
- udi.addAttachment(DeploymentInfo.class, di);
+ dep.getContext().addAttachment(DeploymentInfo.class, di);
if (di.parent != null)
{
udi.parent = new UnifiedDeploymentInfo(null);
- buildDeploymentInfo(udi.parent, di.parent);
+ buildDeploymentInfo(dep, udi.parent, di.parent);
}
udi.vfRoot = new ResourceLoaderAdapter(di.localCl);
@@ -62,7 +63,7 @@
udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
- buildMetaData(udi, di.metaData);
+ buildMetaData(dep, udi, di);
log.debug("UnifiedDeploymentInfo:\n" + udi);
return udi;
@@ -89,20 +90,20 @@
return deploymentURL;
}
- private static void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+ private static void buildMetaData(Deployment dep, UnifiedDeploymentInfo udi, DeploymentInfo di)
{
- if (metaData instanceof WebMetaData)
+ if (di.metaData instanceof WebMetaData)
{
- udi.metaData = WebMetaDataAdapter.buildUnifiedWebMetaData(udi, (WebMetaData)metaData);
+ udi.metaData = WebMetaDataAdapter.buildUnifiedWebMetaData(dep, udi, (WebMetaData)di.metaData);
udi.webappURL = udi.url;
}
- else if (metaData instanceof ApplicationMetaData)
+ else if (di.metaData instanceof ApplicationMetaData)
{
- udi.metaData = ApplicationMetaDataAdapter.buildUnifiedApplicationMetaData(udi, (ApplicationMetaData)metaData);
+ udi.metaData = ApplicationMetaDataAdapter.buildUnifiedApplicationMetaData(dep, udi, (ApplicationMetaData)di.metaData);
}
else if (udi.deployedObject != null)
{
- udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(udi);
+ udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(dep, udi);
;
}
}
Copied: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java (from rev 3182, trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB21.java)
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,73 @@
+/*
+ * 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.wsf.container.jboss42;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Element;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB21 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData == null)
+ throw new IllegalStateException("Cannot obtain application meta data");
+
+ String securityDomain = appMetaData.getSecurityDomain();
+ if (securityDomain != null)
+ jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+ ApplicationMetaData applMetaData = dep.getContext().getAttachment(ApplicationMetaData.class);
+ AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
+ if (assemblyDescriptor != null)
+ {
+ Map securityRoles = assemblyDescriptor.getSecurityRoles();
+ if (securityRoles != null)
+ {
+ Iterator it = securityRoles.keySet().iterator();
+ while (it.hasNext())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
+ }
+ }
+ }
+ }
+}
Copied: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java (from rev 3182, trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB3.java)
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,117 @@
+/*
+ * 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.wsf.container.jboss42;
+
+//$Id$
+
+import javax.annotation.security.RolesAllowed;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.dom4j.Element;
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.deployment.WSDeploymentException;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB3 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ String securityDomain = null;
+
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof StatelessContainer)
+ {
+ StatelessContainer container = (StatelessContainer)manager;
+
+ SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
+ if (anSecurityDomain != null)
+ {
+ if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
+ throw new IllegalStateException("Multiple security domains not supported");
+
+ securityDomain = anSecurityDomain.value();
+ }
+ }
+ }
+
+ if (securityDomain != null)
+ jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // The container objects below provide access to all of the ejb metadata
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof StatelessContainer)
+ {
+ StatelessContainer container = (StatelessContainer)manager;
+
+ RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+ if (anRolesAllowed != null)
+ {
+ for (String role : anRolesAllowed.value())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText(role);
+ }
+ }
+ }
+ }
+ }
+
+ private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSDeploymentException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSDeploymentException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Deleted: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB21.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB21.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB21.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,67 +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.wsf.container.jboss42;
-
-//$Id$
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.AssemblyDescriptorMetaData;
-import org.jboss.wsf.spi.deployment.SecurityRolesHandler;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class SecurityRolesHandlerEJB21 implements SecurityRolesHandler
-{
- // logging support
- protected Logger log = Logger.getLogger(SecurityRolesHandlerEJB21.class);
-
- /** Add the roles from ejb-jar.xml to the security roles
- */
- public void addSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
- {
- // Fix: http://jira.jboss.org/jira/browse/JBWS-309
- ApplicationMetaData applMetaData = (ApplicationMetaData)udi.getAttachment(ApplicationMetaData.class);
- AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
- if (assemblyDescriptor != null)
- {
- Map securityRoles = assemblyDescriptor.getSecurityRoles();
- if (securityRoles != null)
- {
- Iterator it = securityRoles.keySet().iterator();
- while (it.hasNext())
- {
- webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
- }
- }
- }
- }
-}
Deleted: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB3.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityRolesHandlerEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,93 +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.wsf.container.jboss42;
-
-//$Id$
-
-import javax.annotation.security.RolesAllowed;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.dom4j.Element;
-import org.jboss.ejb3.Ejb3ModuleMBean;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanProxyCreationException;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.wsf.spi.deployment.SecurityRolesHandler;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class SecurityRolesHandlerEJB3 implements SecurityRolesHandler
-{
- // logging support
- protected Logger log = Logger.getLogger(SecurityRolesHandlerEJB3.class);
-
- /** Add the roles from ejb-jar.xml to the security roles
- */
- public void addSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
- {
- // The container objects below provide access to all of the ejb metadata
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
- for (Object manager : ejb3Module.getContainers().values())
- {
- if (manager instanceof StatelessContainer)
- {
- StatelessContainer container = (StatelessContainer)manager;
-
- RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
- if (anRolesAllowed != null)
- {
- for (String role : anRolesAllowed.value())
- {
- webApp.addElement("security-role").addElement("role-name").addText(role);
- }
- }
- }
- }
- }
-
- private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
- {
- Ejb3ModuleMBean ejb3Module;
- try
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
- if (ejb3Module == null)
- throw new WSDeploymentException("Cannot obtain EJB3 module: " + objectName);
-
- return ejb3Module;
- }
- catch (MBeanProxyCreationException ex)
- {
- throw new WSDeploymentException("Cannot obtain proxy to EJB3 module");
- }
- }
-}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -54,13 +54,13 @@
if (type.toString().startsWith("JAXWS"))
{
udi = new JAXWSDeployment(type);
- DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(dep, udi, unit);
}
else
{
WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
udi = new JAXRPCDeployment(type, wsMetaData);
- DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(dep, udi, unit);
}
dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -68,7 +68,7 @@
log.debug("publishServiceEndpoint: " + warURL);
try
{
- DeploymentInfo di = udi.getAttachment(DeploymentInfo.class);
+ DeploymentInfo di = dep.getContext().getAttachment(DeploymentInfo.class);
if (di == null)
throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -33,6 +33,7 @@
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.WebSecurityMetaData;
import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
@@ -47,9 +48,9 @@
*/
public class WebMetaDataAdapter
{
- public static UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, WebMetaData webMetaData)
+ public static UnifiedWebMetaData buildUnifiedWebMetaData(Deployment dep, UnifiedDeploymentInfo udi, WebMetaData webMetaData)
{
- udi.addAttachment(WebMetaData.class, webMetaData);
+ dep.getContext().addAttachment(WebMetaData.class, webMetaData);
UnifiedWebMetaData umd = new UnifiedWebMetaData();
umd.setContextRoot(webMetaData.getContextRoot());
@@ -61,7 +62,7 @@
umd.setPublishLocationAdapter(getPublishLocationAdpater(webMetaData));
umd.setSecurityMetaData(getSecurityMetaData(webMetaData.getSecurityContraints()));
- udi.addAttachment(UnifiedWebMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedWebMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss50/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/jboss50/ant-import/build-thirdparty.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/ant-import/build-thirdparty.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -51,6 +51,7 @@
<pathelement location="${jboss50.server.lib}/jboss-javaee.jar"/>
<pathelement location="${jboss50.server.lib}/jbosssx.jar"/>
<pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3.jar"/>
+ <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
</path>
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -36,6 +36,7 @@
import org.jboss.metadata.SessionMetaData;
import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
import org.jboss.metadata.ApplicationMetaData.Webservices;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
@@ -55,17 +56,17 @@
// logging support
private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptor.class);
- public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep, UnifiedDeploymentInfo udi, DeploymentUnit unit)
{
ApplicationMetaData appMetaData = unit.getAttachment(ApplicationMetaData.class);
- udi.addAttachment(ApplicationMetaData.class, appMetaData);
+ dep.getContext().addAttachment(ApplicationMetaData.class, appMetaData);
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
buildUnifiedBeanMetaData(umd, appMetaData);
buildWebservicesMetaData(umd, appMetaData);
umd.setSecurityDomain(appMetaData.getSecurityDomain());
- udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -39,6 +39,7 @@
import org.jboss.ejb3.metamodel.WebserviceDescription;
import org.jboss.ejb3.metamodel.Webservices;
import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
@@ -58,17 +59,17 @@
// logging support
private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptorEJB3.class);
- public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep, UnifiedDeploymentInfo udi, DeploymentUnit unit)
{
Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- udi.addAttachment(Ejb3Deployment.class, ejb3Deployment);
+ dep.getContext().addAttachment(Ejb3Deployment.class, ejb3Deployment);
EjbJarDD jarDD = unit.getAttachment(EjbJarDD.class);
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
buildUnifiedBeanMetaData(umd, ejb3Deployment);
buildWebservicesMetaData(umd, jarDD);
- udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -29,6 +29,7 @@
import org.jboss.logging.Logger;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
// $Id$
@@ -44,16 +45,16 @@
// logging support
private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
- public static void buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+ public static void buildDeploymentInfo(Deployment dep, UnifiedDeploymentInfo udi, DeploymentUnit unit)
{
- udi.addAttachment(DeploymentUnit.class, unit);
+ dep.getContext().addAttachment(DeploymentUnit.class, unit);
try
{
if (unit.getDeploymentContext().getParent() != null)
{
udi.parent = new UnifiedDeploymentInfo(null);
- buildDeploymentInfo(udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
+ buildDeploymentInfo(dep, udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
}
udi.vfRoot = new VirtualFileAdaptor(unit.getDeploymentContext().getRoot());
@@ -62,7 +63,7 @@
udi.simpleName = unit.getSimpleName();
udi.url = udi.vfRoot.toURL();
- buildMetaData(udi, unit);
+ buildMetaData(dep, udi, unit);
// Since we create temporary classes, we need to create a delegate loader
// This prevents CCE problems where the parent loader is available at deploy time,
@@ -81,19 +82,19 @@
}
}
- private static void buildMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ private static void buildMetaData(Deployment dep, UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
if (unit.getAttachment(Ejb3Deployment.class) != null)
{
- udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(udi, unit);
+ udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(dep, udi, unit);
}
else if (unit.getAttachment(ApplicationMetaData.class) != null)
{
- udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(udi, unit);
+ udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(dep, udi, unit);
}
else if (unit.getAttachment(WebMetaData.class) != null)
{
- udi.metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(udi, unit);
+ udi.metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(dep, udi, unit);
udi.webappURL = udi.vfRoot.toURL();
}
}
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,73 @@
+/*
+ * 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.wsf.container.jboss50;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Element;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB21 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData == null)
+ throw new IllegalStateException("Cannot obtain application meta data");
+
+ String securityDomain = appMetaData.getSecurityDomain();
+ if (securityDomain != null)
+ jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+ ApplicationMetaData applMetaData = dep.getContext().getAttachment(ApplicationMetaData.class);
+ AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
+ if (assemblyDescriptor != null)
+ {
+ Map securityRoles = assemblyDescriptor.getSecurityRoles();
+ if (securityRoles != null)
+ {
+ Iterator it = securityRoles.keySet().iterator();
+ while (it.hasNext())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java (from rev 3182, trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB3.java)
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,91 @@
+/*
+ * 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.wsf.container.jboss50;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.dom4j.Element;
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB3 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ String securityDomain = null;
+
+ Ejb3Deployment ejb3Deployment = dep.getContext().getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
+ if (anSecurityDomain != null)
+ {
+ if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
+ throw new IllegalStateException("Multiple security domains not supported");
+
+ securityDomain = anSecurityDomain.value();
+ }
+ }
+ }
+
+ if (securityDomain != null)
+ jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ Ejb3Deployment ejb3Deployment = dep.getContext().getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+ if (anRolesAllowed != null)
+ {
+ for (String role : anRolesAllowed.value())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText(role);
+ }
+ }
+ }
+ }
+ }
+}
Deleted: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB21.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB21.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,63 +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.wsf.container.jboss50;
-
-//$Id$
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.dom4j.Element;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.AssemblyDescriptorMetaData;
-import org.jboss.wsf.spi.deployment.SecurityRolesHandler;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class SecurityRolesHandlerEJB21 implements SecurityRolesHandler
-{
- /** Add the roles from ejb-jar.xml to the security roles
- */
- public void addSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
- {
- // Fix: http://jira.jboss.org/jira/browse/JBWS-309
- ApplicationMetaData applMetaData = (ApplicationMetaData)udi.getAttachment(ApplicationMetaData.class);
- AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
- if (assemblyDescriptor != null)
- {
- Map securityRoles = assemblyDescriptor.getSecurityRoles();
- if (securityRoles != null)
- {
- Iterator it = securityRoles.keySet().iterator();
- while (it.hasNext())
- {
- webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
- }
- }
- }
- }
-}
Deleted: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB3.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityRolesHandlerEJB3.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,66 +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.wsf.container.jboss50;
-
-//$Id$
-
-import java.util.Iterator;
-
-import javax.annotation.security.RolesAllowed;
-
-import org.dom4j.Element;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.wsf.spi.deployment.SecurityRolesHandler;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class SecurityRolesHandlerEJB3 implements SecurityRolesHandler
-{
- /** Add the roles from ejb-jar.xml to the security roles
- */
- public void addSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
- {
- Ejb3Deployment ejb3Deployment = udi.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
- if (anRolesAllowed != null)
- {
- for (String role : anRolesAllowed.value())
- {
- webApp.addElement("security-role").addElement("role-name").addText(role);
- }
- }
- }
- }
- }
-}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeployer.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -54,13 +54,13 @@
if (type.toString().startsWith("JAXWS"))
{
udi = new JAXWSDeployment(type);
- DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(dep, udi, unit);
}
else
{
WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
udi = new JAXRPCDeployment(type, wsMetaData);
- DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(dep, udi, unit);
}
dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,8 +35,8 @@
import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
import org.jboss.metadata.web.Servlet;
import org.jboss.metadata.web.ServletMapping;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
@@ -50,10 +50,10 @@
*/
public class WebMetaDataAdaptor
{
- public static UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+ public static UnifiedWebMetaData buildUnifiedWebMetaData(Deployment dep, UnifiedDeploymentInfo udi, DeploymentUnit unit)
{
WebMetaData wmd = unit.getAttachment(WebMetaData.class);
- udi.addAttachment(WebMetaData.class, wmd);
+ dep.getContext().addAttachment(WebMetaData.class, wmd);
UnifiedWebMetaData umd = new UnifiedWebMetaData();
umd.setContextRoot(wmd.getContextRoot());
@@ -65,7 +65,7 @@
umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
- udi.addAttachment(UnifiedWebMetaData.class, umd);
+ dep.getContext().addAttachment(UnifiedWebMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jbws/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/jbws/ant-import/build-deploy.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jbws/ant-import/build-deploy.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -56,6 +56,9 @@
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jbws.output.lib.dir}/jbossws-jbws50.sar"/>
<copy tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war" file="${jbws.output.lib.dir}/jbossws-context.war" overwrite="true"/>
+ <!-- Deploy juddi-service.sar -->
+ <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip dest="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="${core.dir}/thirdparty/juddi-service.sar"/>
</target>
<!-- Remove jbossws from jboss50 -->
@@ -84,6 +87,8 @@
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<delete file="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"/>
+ <!-- Undeploy juddi-service.sar -->
+ <delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
</target>
<!-- Deploy jbossws to jboss42 -->
@@ -120,6 +125,9 @@
</copy>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jbws.output.lib.dir}/jbossws-jbws42.sar"/>
+ <!-- Deploy juddi-service.sar -->
+ <mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip dest="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="${core.dir}/thirdparty/juddi-service.sar"/>
</target>
<!-- Remove jbossws from jboss42 -->
@@ -147,6 +155,8 @@
</fileset>
</delete>
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+ <!-- Undeploy juddi-service.sar -->
+ <delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
</target>
</project>
Modified: trunk/integration/jbws/ant-import/build-testsuite.xml
===================================================================
--- trunk/integration/jbws/ant-import/build-testsuite.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jbws/ant-import/build-testsuite.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -42,20 +42,21 @@
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
<pathelement location="${jboss.client}/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.client}/jboss-common-core.jar"/>
- <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
<pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
<pathelement location="${jboss.server.lib}/jboss-javaee.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
</path>
<path id="tests.client.classpath">
<pathelement location="${jboss.client}/javassist.jar"/>
- <pathelement location="${jboss.client}/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/wsdl4j.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
- <path refid="javac.classpath"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi.jar"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi-saaj.jar"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/scout.jar"/>
+ <path refid="javac.classpath"/>
</path>
</target>
@@ -67,7 +68,6 @@
<pathelement location="${jboss.client}/jaxb-api.jar"/>
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
<pathelement location="${jboss.client}/jboss-common-client.jar"/>
- <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3x.jar"/>
<pathelement location="${jboss.client}/jbosssx-client.jar"/>
</path>
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -150,16 +150,16 @@
<bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
- <property name="securityRolesHandlerEJB21"><inject bean="WSSecurityRolesHandlerEJB21"/></property>
- <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss42.WebAppDeployerDeployer">
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
</bean>
<!-- Deployer helper beans -->
- <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB21"/>
- <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB3"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.jbws.WebAppDesciptorModifierImpl">
<property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
</bean>
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -162,8 +162,8 @@
<bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
- <property name="securityRolesHandlerEJB21"><inject bean="WSSecurityRolesHandlerEJB21"/></property>
- <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
@@ -171,8 +171,8 @@
</bean>
<!-- Deployer helper beans -->
- <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
- <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.jbws.WebAppDesciptorModifierImpl">
<property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
</bean>
Modified: trunk/integration/jbws/src/test/resources/excludes-jboss50.txt
===================================================================
--- trunk/integration/jbws/src/test/resources/excludes-jboss50.txt 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/jbws/src/test/resources/excludes-jboss50.txt 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,12 +1,5 @@
+#
+# $Id$
+#
-org/jboss/test/ws/jaxws/samples/context/**
-org/jboss/test/ws/jaxws/samples/handlerchain/**
-org/jboss/test/ws/jaxws/samples/httpbinding/**
-org/jboss/test/ws/jaxws/samples/jaxr/**
-org/jboss/test/ws/jaxws/samples/jsr181ejb/**
-org/jboss/test/ws/jaxws/samples/logicalhandler/**
-org/jboss/test/ws/jaxws/samples/provider/**
-org/jboss/test/ws/jaxws/samples/retail/**
-org/jboss/test/ws/jaxws/samples/webservice/**
-org/jboss/test/ws/jaxws/samples/webserviceref/**
-org/jboss/test/ws/jaxws/samples/wssecurity/**
+# Nothing to exclude
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -41,7 +41,7 @@
// #1 Use the explicit context root from the web meta data
UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- UnifiedWebMetaData webMetaData = udi.getAttachment(UnifiedWebMetaData.class);
+ UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
contextRoot = webMetaData.getContextRoot();
@@ -54,7 +54,7 @@
WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
if (anWebContext != null && anWebContext.contextRoot().length() > 0)
{
- if (contextRoot != null && contextRoot.equals(anWebContext.contextRoot()))
+ if (contextRoot != null && contextRoot.equals(anWebContext.contextRoot()) == false)
throw new IllegalStateException("Context root must be the same for all deployed endpoints");
contextRoot = anWebContext.contextRoot();
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityHandler.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,35 @@
+/*
+ * 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.wsf.spi.deployment;
+
+// $Id$
+
+import org.dom4j.Element;
+
+public interface SecurityHandler
+{
+ /** Add the security domain to jboss-web.xml */
+ void addSecurityDomain(Element jbossWeb, Deployment dep);
+
+ /** Add the security roles to web.xml */
+ void addSecurityRoles(Element webApp, Deployment dep);
+}
Property changes on: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityRolesHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityRolesHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/SecurityRolesHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,11 +0,0 @@
-package org.jboss.wsf.spi.deployment;
-
-import org.dom4j.Element;
-
-
-public interface SecurityRolesHandler
-{
- /** Add the roles from ejb-jar.xml to the security roles
- */
- void addSecurityRoles(Element webApp, UnifiedDeploymentInfo udi);
-}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -50,7 +50,7 @@
// #1 For JSE lookup the url-pattern from the servlet mappings
UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- UnifiedWebMetaData webMetaData = udi.getAttachment(UnifiedWebMetaData.class);
+ UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
{
String epName = ep.getShortName();
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -26,8 +26,6 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import javax.management.ObjectName;
@@ -68,19 +66,6 @@
/** An optional ObjectName of the deployed object */
public ObjectName deployedObject;
- /** An arbitrary map of state associated with the deployment */
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
-
- public <T> T getAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-
- public <T> T addAttachment(Class<T> key, T value)
- {
- return (T)attachments.put(key, value);
- }
-
/** The sortName concatenated with the canonical names of all parents. */
public String getCanonicalName()
{
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -37,6 +37,7 @@
import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
/**
* A deployer that generates a webapp for an EJB endpoint
@@ -46,17 +47,17 @@
*/
public class WebAppGeneratorDeployer extends AbstractDeployer
{
- private SecurityRolesHandler securityRolesHandlerEJB21;
- private SecurityRolesHandler securityRolesHandlerEJB3;
+ private SecurityHandler securityHandlerEJB21;
+ private SecurityHandler securityHandlerEJB3;
- public void setSecurityRolesHandlerEJB21(SecurityRolesHandler securityRolesHandlerEJB21)
+ public void setSecurityHandlerEJB21(SecurityHandler handler)
{
- this.securityRolesHandlerEJB21 = securityRolesHandlerEJB21;
+ this.securityHandlerEJB21 = handler;
}
- public void setSecurityRolesHandlerEJB3(SecurityRolesHandler securityRolesHandlerEJB3)
+ public void setSecurityHandlerEJB3(SecurityHandler handler)
{
- this.securityRolesHandlerEJB3 = securityRolesHandlerEJB3;
+ this.securityHandlerEJB3 = handler;
}
@Override
@@ -68,18 +69,18 @@
if (dep.getType().toString().endsWith("EJB21"))
{
- udi.webappURL = generatWebDeployment(dep, securityRolesHandlerEJB21);
+ udi.webappURL = generatWebDeployment(dep, securityHandlerEJB21);
}
else if (dep.getType().toString().endsWith("EJB3"))
{
- udi.webappURL = generatWebDeployment(dep, securityRolesHandlerEJB3);
+ udi.webappURL = generatWebDeployment(dep, securityHandlerEJB3);
}
}
- private URL generatWebDeployment(Deployment dep, SecurityRolesHandler securityHandler)
+ private URL generatWebDeployment(Deployment dep, SecurityHandler securityHandler)
{
Document webDoc = createWebAppDescriptor(dep, securityHandler);
- Document jbossDoc = createJBossWebAppDescriptor(dep);
+ Document jbossDoc = createJBossWebAppDescriptor(dep, securityHandler);
File tmpWar = null;
try
@@ -116,7 +117,7 @@
}
}
- private Document createWebAppDescriptor(Deployment dep, SecurityRolesHandler securityHandler)
+ private Document createWebAppDescriptor(Deployment dep, SecurityHandler securityHandler)
{
UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
@@ -220,13 +221,13 @@
loginConfig.addElement("auth-method").addText(authMethod);
loginConfig.addElement("realm-name").addText("EJBServiceEndpointServlet Realm");
- securityHandler.addSecurityRoles(webApp, udi);
+ securityHandler.addSecurityRoles(webApp, dep);
}
return document;
}
- private Document createJBossWebAppDescriptor(Deployment dep)
+ private Document createJBossWebAppDescriptor(Deployment dep, SecurityHandler securityHandler)
{
Document document = DocumentHelper.createDocument();
@@ -239,9 +240,7 @@
*/
Element jbossWeb = document.addElement("jboss-web");
- String securityDomain = (String)dep.getContext().getProperty("security-domain");
- if (securityDomain != null)
- jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ securityHandler.addSecurityDomain(jbossWeb, dep);
// Get the context root for this deployment
String contextRoot = dep.getService().getContextRoot();
Modified: trunk/integration/sunri/.classpath
===================================================================
--- trunk/integration/sunri/.classpath 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/sunri/.classpath 2007-05-22 13:06:13 UTC (rev 3183)
@@ -22,5 +22,6 @@
<classpathentry kind="lib" path="thirdparty/servlet-api.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/integration-spi"/>
<classpathentry kind="lib" path="/integration-spi/thirdparty/dom4j.jar"/>
+ <classpathentry kind="lib" path="/integration-spi/thirdparty/jboss-common-core.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -145,7 +145,7 @@
<bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
- <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
@@ -153,8 +153,8 @@
</bean>
<!-- Deployer helper beans -->
- <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
- <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.sunri.WebAppDesciptorModifierImpl">
<property name="listenerClass">org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</property>
<property name="servletClass">org.jboss.wsf.spi.invocation.EndpointServlet</property>
Modified: trunk/integration/xfire/.classpath
===================================================================
--- trunk/integration/xfire/.classpath 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/xfire/.classpath 2007-05-22 13:06:13 UTC (rev 3183)
@@ -12,5 +12,6 @@
<classpathentry kind="lib" path="thirdparty/xfire-all.jar" sourcepath="thirdparty/xfire-distribution-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/jaxws-api.jar"/>
<classpathentry kind="lib" path="thirdparty/xfire-jsr181-api.jar"/>
+ <classpathentry kind="lib" path="/integration-spi/thirdparty/jboss-common-core.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -143,7 +143,7 @@
<bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
- <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
@@ -156,8 +156,8 @@
</bean>
<!-- Deployer helper beans -->
- <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
- <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.xfire.WebAppDesciptorModifierImpl">
<property name="servletClass">org.jboss.wsf.stack.xfire.XFireConfigurableServletExt</property>
</bean>
Added: trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml (rev 0)
+++ trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-samples-jaxws" description="Build the jaxws samples deployments">
+
+ <mkdir dir="${tests.output.dir}/libs"/>
+
+ <!-- jaxws-webserviceref -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.class"/>
+ </classes>
+ </war>
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne"/>
+ </manifest>
+ </jar>
+ <war destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-servlet-client.war"
+ webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+ <include name="wsdl/**"/>
+ </webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+ <include name="jboss.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.class"/>
+ </fileset>
+ </jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-secure">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient"/>
+ </manifest>
+ </jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-override">
+ <include name="jbossws-client-config.xml"/>
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientTwo"/>
+ </manifest>
+ </jar>
+
+ <!-- jaxws-samples-wsaddressing -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws-handlers.xml"/>
+ </classes>
+ </war>
+
+ <!-- jaxws-samples-wseventing.war -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-wseventing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wseventing/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF">
+ <include name="wsdl/jboss-web.xml"/>
+ <include name="wsdl/sysmon.wsdl"/>
+ <include name="wsdl/ws-eventing.wsdl"/>
+ <include name="wsdl/ws-eventing.xsd"/>
+ <include name="wsdl/ws-addr.xsd"/>
+ </webinf>
+ </war>
+
+ <!-- jaxws-samples-wssecurity-encrypt -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
+ <include name="wsse.keystore"/>
+ <include name="wsse.truststore"/>
+ </webinf>
+ </war>
+
+ <!-- jaxws-samples-wssecurity-sign -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-sign.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-sign/WEB-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
+ <include name="wsse.keystore"/>
+ <include name="wsse.truststore"/>
+ </webinf>
+ </war>
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
+</project>
Property changes on: trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/ant-import-tests/build-testsuite.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -238,6 +238,7 @@
<ant antfile="${core.dir}/ant-import-tests/build-jars-jaxrpc.xml" target="build-jars-jaxrpc"/>
<ant antfile="${core.dir}/ant-import-tests/build-samples-jaxrpc.xml" target="build-samples-jaxrpc"/>
<ant antfile="${core.dir}/ant-import-tests/build-jars-jaxws.xml" target="build-jars-jaxws"/>
+ <ant antfile="${core.dir}/ant-import-tests/build-samples-jaxws.xml" target="build-samples-jaxws"/>
</target>
<target name="tests-main" depends="tests-jars" description="Build the deployments."/>
Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref)
Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsaddressing)
Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wseventing (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wseventing)
Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wssecurity)
Copied: trunk/jbossws-core/src/test/resources/jaxws/samples/webserviceref (from rev 3182, trunk/testsuite/src/resources/jaxws/samples/webserviceref)
Copied: trunk/jbossws-core/src/test/resources/jaxws/samples/wsaddressing (from rev 3182, trunk/testsuite/src/resources/jaxws/samples/wsaddressing)
Copied: trunk/jbossws-core/src/test/resources/jaxws/samples/wseventing (from rev 3182, trunk/testsuite/src/resources/jaxws/samples/wseventing)
Copied: trunk/jbossws-core/src/test/resources/jaxws/samples/wssecurity (from rev 3182, trunk/testsuite/src/resources/jaxws/samples/wssecurity)
Modified: trunk/testsuite/.classpath
===================================================================
--- trunk/testsuite/.classpath 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/.classpath 2007-05-22 13:06:13 UTC (rev 3183)
@@ -13,5 +13,6 @@
<classpathentry kind="lib" path="/integration-spi/thirdparty/activation.jar"/>
<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-api.jar"/>
<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-impl.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jbossws-core"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -48,8 +48,8 @@
</fileset>
</jar>
- <!-- jaxws-eardeployment -->
- <war warfile="${tests.output.dir}/libs/jaxws-eardeployment.war" webxml="${tests.output.dir}/resources/jaxws/samples/eardeployment/WEB-INF/web.xml">
+ <!-- jaxws-samples-eardeployment -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-eardeployment.war" webxml="${tests.output.dir}/resources/jaxws/samples/eardeployment/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/eardeployment/JSEBean.class"/>
</classes>
@@ -57,7 +57,7 @@
<include name="wsdl/**"/>
</webinf>
</war>
- <jar jarfile="${tests.output.dir}/libs/jaxws-eardeployment.jar">
+ <jar jarfile="${tests.output.dir}/libs/jaxws-samples-eardeployment.jar">
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/eardeployment/EJB3Bean.class"/>
</fileset>
@@ -65,19 +65,19 @@
<include name="wsdl/**"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-eardeployment.ear">
+ <jar jarfile="${tests.output.dir}/libs/jaxws-samples-eardeployment.ear">
<fileset dir="${tests.output.dir}/libs">
- <include name="jaxws-eardeployment.jar"/>
- <include name="jaxws-eardeployment.war"/>
+ <include name="jaxws-samples-eardeployment.jar"/>
+ <include name="jaxws-samples-eardeployment.war"/>
</fileset>
<metainf dir="${tests.output.dir}/resources/jaxws/samples/eardeployment/META-INF">
<include name="jboss-app.xml"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-eardeployment42.ear">
+ <jar jarfile="${tests.output.dir}/libs/jaxws-samples-eardeployment42.ear">
<fileset dir="${tests.output.dir}/libs">
- <include name="jaxws-eardeployment.jar"/>
- <include name="jaxws-eardeployment.war"/>
+ <include name="jaxws-samples-eardeployment.jar"/>
+ <include name="jaxws-samples-eardeployment.war"/>
</fileset>
<metainf dir="${tests.output.dir}/resources/jaxws/samples/eardeployment/META-INF">
<include name="application.xml"/>
@@ -102,21 +102,6 @@
<include name="org/jboss/test/ws/jaxws/samples/handlerchain/jaxws-handlers-server.xml"/>
</classes>
</war>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-handlerchain-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/handlerchain/Endpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/handlerchain/*Handler.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClient.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/handlerchain/jaxws-handlers-client.xml"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/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.samples.handlerchain.HandlerChainClient"/>
- </manifest>
- </jar>
<!-- jaxws-samples-httpbinding -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-httpbinding-jaxb.war" webxml="${tests.output.dir}/resources/jaxws/samples/httpbinding/jaxb/WEB-INF/web.xml">
@@ -140,46 +125,6 @@
</webinf>
</war>
- <!-- jaxws-samples-jsr181ejb -->
- <jar jarfile="${tests.output.dir}/libs/jaxws-samples-jsr181ejb.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/jsr181ejb/EJB3Bean01.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/jsr181ejb/EJB3RemoteInterface.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/jsr181ejb/META-INF">
- <include name="jboss-wsse-server.xml"/>
- <include name="wsse.*"/>
- </metainf>
- </jar>
-
- <!-- jaxws-samples-jsr181pojo -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-jsr181pojo.war" webxml="${tests.output.dir}/resources/jaxws/samples/jsr181pojo/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/jsr181pojo/JSEBean01.class"/>
- </classes>
- </war>
-
- <!-- jaxws-samples-jsr181pojo-docwrapped -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-jsr181pojo-docwrapped.war"
- webxml="${tests.output.dir}/resources/jaxws/samples/jsr181pojo/docwrapped/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/jsr181pojo/docwrapped/JSEBean01.class"/>
- </classes>
- </war>
- <jar jarfile="${tests.output.dir}/libs/jaxws-samples-jsr181pojo-docwrapped-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/jsr181pojo/docwrapped/EndpointInterface.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/jsr181pojo/docwrapped/Concat.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/jsr181pojo/docwrapped/ConcatResponse.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/jsr181pojo/docwrapped/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
<!-- jaxws-samples-logicalhandler -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-logicalhandler-source.war"
webxml="${tests.output.dir}/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml">
@@ -254,17 +199,6 @@
<include name="wsdl/*"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-samples-retail-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/retail/**/*.class"/>
- <exclude name="org/jboss/test/ws/jaxws/samples/retail/**/*Bean.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/retail/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
<!-- jaxws-samples-soapbinding -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-soapbinding.war" webxml="${tests.output.dir}/resources/jaxws/samples/soapbinding/WEB-INF/web.xml">
@@ -350,151 +284,6 @@
</fileset>
</jar>
- <!-- jaxws-webserviceref -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.class"/>
- </classes>
- </war>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne"/>
- </manifest>
- </jar>
- <war destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-servlet-client.war"
- webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="wsdl/**"/>
- </webinf>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
- <include name="jboss-web.xml"/>
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="jboss.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.class"/>
- </fileset>
- </jar>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-secure">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient"/>
- </manifest>
- </jar>
- <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-override">
- <include name="jbossws-client-config.xml"/>
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="wsdl/**"/>
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientTwo"/>
- </manifest>
- </jar>
-
- <!-- jaxws-samples-wsaddressing -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpointImpl.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws-handlers.xml"/>
- </classes>
- </war>
-
- <!-- jaxws-samples-wseventing.war -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-wseventing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/wseventing/*.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF">
- <include name="wsdl/jboss-web.xml"/>
- <include name="wsdl/sysmon.wsdl"/>
- <include name="wsdl/ws-eventing.wsdl"/>
- <include name="wsdl/ws-eventing.xsd"/>
- <include name="wsdl/ws-addr.xsd"/>
- </webinf>
- </war>
-
- <!-- jaxws-samples-wssecurity-encrypt -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF">
- <include name="jboss-wsse-server.xml"/>
- </webinf>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
- <include name="wsse.keystore"/>
- <include name="wsse.truststore"/>
- </webinf>
- </war>
-
- <!-- jaxws-samples-wssecurity-sign -->
- <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-sign.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-sign/WEB-INF">
- <include name="jboss-wsse-server.xml"/>
- </webinf>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
- <include name="wsse.keystore"/>
- <include name="wsse.truststore"/>
- </webinf>
- </war>
-
<!-- jaxws-samples-xop-doclit -->
<war jarfile="${tests.output.dir}/libs/jaxws-samples-xop-doclit.war" webxml="${tests.output.dir}/resources/jaxws/samples/xop/doclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -43,7 +43,7 @@
{
public static Test suite()
{
- String earName = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-eardeployment.ear" : "jaxws-eardeployment42.ear");
+ String earName = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-samples-eardeployment.ear" : "jaxws-samples-eardeployment42.ear");
return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -27,7 +27,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A client side handler
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,67 +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.samples.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 at jboss.org
- * @since 15-Oct-2005
- */
-public class HandlerChainClientTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(HandlerChainClientTestCase.class, "jaxws-samples-handlerchain.war, jaxws-samples-handlerchain-client.jar");
- }
-
- public void testHandlerChainOnWebServiceRef() throws Throwable
- {
- String resStr = invokeTestClient("testService1", "Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn", resStr);
- }
-
- public void testHandlerChainNegative() throws Throwable
- {
- String resStr = invokeTestClient("testService2", "Kermit");
- assertEquals("Kermit|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut", resStr);
- }
-
- public void testHandlerChainOverride() throws Throwable
- {
- String resStr = invokeTestClient("testService3", "Kermit");
- assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|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;
- }
-}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -27,7 +27,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
/**
* A jaxws protocol handler
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/JSR181OneWayTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/JSR181OneWayTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/JSR181OneWayTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -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.test.ws.jaxws.samples.oneway;
-
-import java.io.StringReader;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.wsf.spi.utils.DOMUtils;
-import org.jboss.wsf.spi.utils.DOMWriter;
-import org.w3c.dom.Element;
-
-/**
- * Test the JSR-181 annotation: javax.jws.Oneway
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Oct-2005
- */
-public class JSR181OneWayTestCase extends JBossWSTest
-{
- private static final String targetNS = "http://oneway.samples.jaxws.ws.test.jboss.org/";
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181OneWayTestCase.class, "jaxws-samples-oneway.war");
- }
-
- public void testWebService() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-oneway/TestService?wsdl");
- QName serviceName = new QName(targetNS, "PingEndpointService");
- QName portName = new QName(targetNS, "PingEndpointPort");
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
-
- String payload = "<ns1:ping xmlns:ns1='http://oneway.samples.jaxws.ws.test.jboss.org/'/>";
- dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));
-
- payload = "<ns1:feedback xmlns:ns1='http://oneway.samples.jaxws.ws.test.jboss.org/'/>";
- Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
-
- Element docElement = getElementFromSource(retObj);
- Element retElement = DOMUtils.getFirstChildElement(docElement);
- String retPayload = DOMWriter.printNode(retElement, false);
- assertEquals("<return>ok</return>", retPayload);
- }
-}
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/JSR181OneWayTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -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.samples.oneway;
+
+import java.io.StringReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.wsf.spi.utils.DOMUtils;
+import org.jboss.wsf.spi.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.Oneway
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 07-Oct-2005
+ */
+public class OneWayTestCase extends JBossWSTest
+{
+ private static final String targetNS = "http://oneway.samples.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(OneWayTestCase.class, "jaxws-samples-oneway.war");
+ }
+
+ public void testWebService() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-oneway/TestService?wsdl");
+ QName serviceName = new QName(targetNS, "PingEndpointService");
+ QName portName = new QName(targetNS, "PingEndpointPort");
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
+
+ String payload = "<ns1:ping xmlns:ns1='http://oneway.samples.jaxws.ws.test.jboss.org/'/>";
+ dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));
+
+ payload = "<ns1:feedback xmlns:ns1='http://oneway.samples.jaxws.ws.test.jboss.org/'/>";
+ Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
+
+ Element docElement = getElementFromSource(retObj);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
+ String retPayload = DOMWriter.printNode(retElement, false);
+ assertEquals("<return>ok</return>", retPayload);
+ }
+}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.samples.retail;
import javax.annotation.PostConstruct;
@@ -42,22 +42,25 @@
* that offers access though RMI and SOAP
*/
@Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.OrderMgmt", name="OrderMgmt", serviceName = "OrderMgmtService")
- at WebContext(contextRoot="/jaxws-samples-retail")
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.OrderMgmt", name = "OrderMgmt", serviceName = "OrderMgmtService")
+ at WebContext(contextRoot = "/jaxws-samples-retail")
@HandlerChain(file = "jaxws-handler.xml")
-public class OrderMgmtBean implements OrderMgmt {
+public class OrderMgmtBean implements OrderMgmt
+{
private static final Logger log = Logger.getLogger(OrderMgmtBean.class);
- @WebServiceRef(wsdlLocation="META-INF/wsdl/CCVerificationService.wsdl")
+ @WebServiceRef(wsdlLocation = "META-INF/wsdl/CCVerificationService.wsdl")
private CCVerificationService verificationService;
private CCVerification verificationPort;
- @WebServiceRef(wsdlLocation="META-INF/wsdl/ProfileMgmtService.wsdl")
+ @WebServiceRef(wsdlLocation = "META-INF/wsdl/ProfileMgmtService.wsdl")
private ProfileMgmtService profileService;
private ProfileMgmt profilePort;
- @PostConstruct public void initialize(){
+ @PostConstruct
+ public void initialize()
+ {
verificationPort = verificationService.getCCVerificationPort();
profilePort = profileService.getProfileMgmtPort();
}
@@ -78,7 +81,7 @@
// verify billing details
String creditCard = order.getCustomer().getCreditCardDetails();
- Response<Boolean> response = verificationPort.verifyAsync( creditCard );
+ Response<Boolean> response = verificationPort.verifyAsync(creditCard);
// high value customer discount
DiscountRequest discountRequest = new DiscountRequest(order.getCustomer());
@@ -103,5 +106,4 @@
return new OrderStatus("Prepared", order.getOrderNum(), 0);
}
-
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -21,9 +21,12 @@
*/
package org.jboss.test.ws.jaxws.samples.retail;
+// $Id$
+
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
import junit.framework.Test;
@@ -32,49 +35,40 @@
/**
* @author Heiko Braun <heiko.braun at jboss.com>
- * @version $Id$
- * @since Nov 8, 2006
+ * @since 08-Nov-2006
*/
public class RetailSampleTestCase extends JBossWSTest {
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-retail/OrderMgmtBean";
- private static Order ORDER;
- private static Customer CUSTOMER;
-
- static
- {
- CUSTOMER = new Customer();
- CUSTOMER.setFirstName("Chuck");
- CUSTOMER.setLastName("Norris");
- CUSTOMER.setCreditCardDetails("1000-4567-3456-XXXX");
-
- ORDER = new Order(CUSTOMER);
- ORDER.setOrderNum(12345);
- ORDER.getItems().add( new OrderItem("Introduction to Web Services", 39.99) );
- }
-
private OrderMgmt orderMgmtWS;
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(RetailSampleTestCase.class, "jaxws-samples-retail.jar, jaxws-samples-retail-client.jar");
+ return JBossWSTestSetup.newTestSetup(RetailSampleTestCase.class, "jaxws-samples-retail.jar");
}
protected void setUp() throws Exception
{
-
QName serviceName = new QName("http://retail.samples.jaxws.ws.test.jboss.org/", "OrderMgmtService");
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS+"?wsdl");
- javax.xml.ws.Service service = javax.xml.ws.Service.create(wsdlURL, serviceName);
+ Service service = Service.create(wsdlURL, serviceName);
orderMgmtWS = (OrderMgmt)service.getPort(OrderMgmt.class);
-
}
public void testWebService() throws Exception
{
- OrderStatus result = orderMgmtWS.prepareOrder(ORDER);
+ Customer customer = new Customer();
+ customer.setFirstName("Chuck");
+ customer.setLastName("Norris");
+ customer.setCreditCardDetails("1000-4567-3456-XXXX");
+
+ Order order = new Order(customer);
+ order.setOrderNum(12345);
+ order.getItems().add( new OrderItem("Introduction to Web Services", 39.99) );
+
+ OrderStatus result = orderMgmtWS.prepareOrder(order);
assertNotNull("Result was null", result);
assertEquals("Prepared", result.getStatus());
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.samples.retail.cc;
import javax.ejb.Stateless;
@@ -30,23 +30,23 @@
import org.jboss.wsf.spi.annotation.WebContext;
@Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name="CCVerification")
- at WebContext(contextRoot="/jaxws-samples-retail")
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name = "CCVerification")
+ at WebContext(contextRoot = "/jaxws-samples-retail")
@HandlerChain(file = "../jaxws-handler.xml")
-public class CCVerificationBean implements CCVerification {
+public class CCVerificationBean implements CCVerification
+{
private static final Logger log = Logger.getLogger(CCVerificationBean.class);
- public Boolean verify(String creditcard) {
-
+ public Boolean verify(String creditcard)
+ {
log.info("Verifying credit card: " + creditcard);
-
CreditcardProcessor.process(creditcard);
-
return true;
}
- public Response<Boolean> verifyAsync(String creditCardNumber) {
+ public Response<Boolean> verifyAsync(String creditCardNumber)
+ {
return null;
}
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -21,17 +21,10 @@
*/
package org.jboss.test.ws.jaxws.samples.retail.handler;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.SOAPElementImpl;
-import org.jboss.ws.core.soap.SOAPElementWriter;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.wsf.spi.handler.GenericSOAPHandler;
public class SOAPMessageTrace extends GenericSOAPHandler
{
@@ -43,48 +36,13 @@
public boolean handleInbound(MessageContext msgContext)
{
timer.push(System.currentTimeMillis());
- return trace();
+ return true;
}
@Override
public boolean handleOutbound(MessageContext msgContext)
{
- trace();
log.info("Exectime time: " + timer.pop() + " ms");
return true;
}
-
- private boolean trace() {
- String envStr = getCurrentSOAPEnvelope();
- if(envStr!=null)
- {
- log.info("\n"+envStr);
- }
-
- return true;
- }
-
- /**
- * Dump the current message into a string
- */
- private String getCurrentSOAPEnvelope()
- {
-
- String env = null;
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-
- try
- {
- SOAPMessageImpl soapMsg = (SOAPMessageImpl)msgContext.getSOAPMessage();
- SOAPEnvelope soapReqEnv = soapMsg.getSOAPPart().getEnvelope();
- env = SOAPElementWriter.writeElement((SOAPElementImpl)soapReqEnv, true);
- }
- catch (SOAPException e)
- {
- //
- }
-
- return env ;
- }
-
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.samples.retail.profile;
import javax.ejb.Stateless;
@@ -28,12 +28,14 @@
import org.jboss.wsf.spi.annotation.WebContext;
@Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name="ProfileMgmt", serviceName = "ProfileMgmtService")
- at WebContext(contextRoot="/jaxws-samples-retail")
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name = "ProfileMgmt", serviceName = "ProfileMgmtService")
+ at WebContext(contextRoot = "/jaxws-samples-retail")
@HandlerChain(file = "../jaxws-handler.xml")
-public class ProfileMgmtBean implements ProfileMgmt {
+public class ProfileMgmtBean implements ProfileMgmt
+{
- public DiscountResponse getCustomerDiscount(DiscountRequest request) {
+ public DiscountResponse getCustomerDiscount(DiscountRequest request)
+ {
return new DiscountResponse(request.getCustomer(), 10.00);
}
}
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/JSR181SOAPBindingTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/JSR181SOAPBindingTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/JSR181SOAPBindingTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,223 +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.samples.soapbinding;
-
-import java.io.ByteArrayInputStream;
-import java.net.URL;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConnection;
-import javax.xml.soap.SOAPConnectionFactory;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.soap.NameImpl;
-
-/**
- * Test the JSR-181 annotation: javax.jws.SOAPBinding
- *
- * @author Thomas.Diesler at jboss.org
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- * @since 17-Oct-2005
- */
-public class JSR181SOAPBindingTestCase extends JBossWSTest
-{
- private String targetNS = "http://soapbinding.samples.jaxws.ws.test.jboss.org/";
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181SOAPBindingTestCase.class, "jaxws-samples-soapbinding.war");
- }
-
- public void testExampleService() throws Exception
- {
- QName serviceName = new QName(targetNS, "ExampleService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/ExampleService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- ExampleSEI port = (ExampleSEI)service.getPort(ExampleSEI.class);
-
- Object retObj = port.concat("first", "second", "third");
- assertEquals("first|second|third", retObj);
- }
-
- public void testDocBareService() throws Exception
- {
- QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBarePort");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- JAXBContext jbc = JAXBContext.newInstance(new Class[] { SubmitBareRequest.class, SubmitBareResponse.class });
- Dispatch dispatch = service.createDispatch(portName, jbc, Mode.PAYLOAD);
-
- SubmitBareRequest poReq = new SubmitBareRequest("Ferrari");
- SubmitBareResponse poRes = (SubmitBareResponse)dispatch.invoke(poReq);
- assertEquals("Ferrari", poRes.getProduct());
- }
-
- public void testDocBareServiceMessageAccess() throws Exception
- {
- QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBarePort");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>" +
- " <ns1:product>Ferrari</ns1:product>" +
- " </ns1:SubmitPO>" +
- " </env:Body>" +
- "</env:Envelope>";
-
- SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
- SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg);
-
- NameImpl name = new NameImpl(new QName(targetNS, "SubmitPOResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
- assertEquals("Ferrari", soapElement.getValue());
- }
-
- public void testNamespacedDocBareServiceMessageAccess() throws Exception
- {
- QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBarePort");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
-
- String requestNamespace = "http://namespace/request";
- String resultNamespace = "http://namespace/result";
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:SubmitNamespacedPO xmlns:ns1='" + requestNamespace+ "'>" +
- " <ns2:product xmlns:ns2='" + targetNS + "'>Ferrari</ns2:product>" +
- " </ns1:SubmitNamespacedPO>" +
- " </env:Body>" +
- "</env:Envelope>";
-
- SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
- SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg);
-
- NameImpl name = new NameImpl(new QName(resultNamespace, "SubmitBareResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
- assertEquals("Ferrari", soapElement.getValue());
- }
-
- public void testDocWrappedService() throws Exception
- {
- QName serviceName = new QName(targetNS, "DocWrappedService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- DocWrapped port = (DocWrapped)service.getPort(DocWrapped.class);
-
- PurchaseOrderAck poRes = port.submitPO(new PurchaseOrder("Ferarri"));
-
- assertEquals("Ferarri", poRes.getProduct());
- }
-
- public void testDocWrappedServiceMessageAccess() throws Exception
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>" +
- " <PurchaseOrder>" +
- " <ns1:product>Ferrari</ns1:product>" +
- " </PurchaseOrder>" +
- " </ns1:SubmitPO>" +
- " </env:Body>" +
- "</env:Envelope>";
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
-
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService?wsdl");
- QName serviceName = new QName(targetNS, "DocWrappedService");
- QName portName = new QName(targetNS, "DocWrappedPort");
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
-
- SOAPMessage resMsg = (SOAPMessage) dispatch.invoke(reqMsg);
-
- NameImpl name = new NameImpl(new QName(targetNS, "SubmitPOResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName("PurchaseOrderAck"))).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
- assertEquals("Ferrari", soapElement.getValue());
- }
-
- public void testNamespacedDocWrappedServiceMessageAccess() throws Exception
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
-
- String purchaseNamespace = "http://namespace/purchase";
- String resultNamespace = "http://namespace/result";
- String stringNamespace = "http://namespace/string";
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:SubmitNamespacedPO xmlns:ns1='" + targetNS + "'>" +
- " <ns2:NamespacedPurchaseOrder xmlns:ns2='" + purchaseNamespace + "'>" +
- " <ns1:product>Ferrari</ns1:product>" +
- " </ns2:NamespacedPurchaseOrder>" +
- " <ns3:NamespacedString xmlns:ns3='" + stringNamespace + "'>Ferrari</ns3:NamespacedString>" +
- " </ns1:SubmitNamespacedPO>" +
- " </env:Body>" +
- "</env:Envelope>";
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
- URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService");
-
- SOAPMessage resMsg = con.call(reqMsg, epURL);
-
- NameImpl name = new NameImpl(new QName(targetNS, "SubmitNamespacedPOResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(resultNamespace, "NamespacedPurchaseOrderAck"))).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
- assertEquals("Ferrari", soapElement.getValue());
- }
-}
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/JSR181SOAPBindingTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,223 @@
+/*
+ * 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.samples.soapbinding;
+
+import java.io.ByteArrayInputStream;
+import java.net.URL;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.soap.NameImpl;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.SOAPBinding
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @since 17-Oct-2005
+ */
+public class SOAPBindingTestCase extends JBossWSTest
+{
+ private String targetNS = "http://soapbinding.samples.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(SOAPBindingTestCase.class, "jaxws-samples-soapbinding.war");
+ }
+
+ public void testExampleService() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "ExampleService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/ExampleService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ ExampleSEI port = (ExampleSEI)service.getPort(ExampleSEI.class);
+
+ Object retObj = port.concat("first", "second", "third");
+ assertEquals("first|second|third", retObj);
+ }
+
+ public void testDocBareService() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "DocBareService");
+ QName portName = new QName(targetNS, "DocBarePort");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ JAXBContext jbc = JAXBContext.newInstance(new Class[] { SubmitBareRequest.class, SubmitBareResponse.class });
+ Dispatch dispatch = service.createDispatch(portName, jbc, Mode.PAYLOAD);
+
+ SubmitBareRequest poReq = new SubmitBareRequest("Ferrari");
+ SubmitBareResponse poRes = (SubmitBareResponse)dispatch.invoke(poReq);
+ assertEquals("Ferrari", poRes.getProduct());
+ }
+
+ public void testDocBareServiceMessageAccess() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "DocBareService");
+ QName portName = new QName(targetNS, "DocBarePort");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>" +
+ " <ns1:product>Ferrari</ns1:product>" +
+ " </ns1:SubmitPO>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+
+ SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+ SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg);
+
+ NameImpl name = new NameImpl(new QName(targetNS, "SubmitPOResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
+ assertEquals("Ferrari", soapElement.getValue());
+ }
+
+ public void testNamespacedDocBareServiceMessageAccess() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "DocBareService");
+ QName portName = new QName(targetNS, "DocBarePort");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
+
+ String requestNamespace = "http://namespace/request";
+ String resultNamespace = "http://namespace/result";
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:SubmitNamespacedPO xmlns:ns1='" + requestNamespace+ "'>" +
+ " <ns2:product xmlns:ns2='" + targetNS + "'>Ferrari</ns2:product>" +
+ " </ns1:SubmitNamespacedPO>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+
+ SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+ SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg);
+
+ NameImpl name = new NameImpl(new QName(resultNamespace, "SubmitBareResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
+ assertEquals("Ferrari", soapElement.getValue());
+ }
+
+ public void testDocWrappedService() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "DocWrappedService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ DocWrapped port = (DocWrapped)service.getPort(DocWrapped.class);
+
+ PurchaseOrderAck poRes = port.submitPO(new PurchaseOrder("Ferarri"));
+
+ assertEquals("Ferarri", poRes.getProduct());
+ }
+
+ public void testDocWrappedServiceMessageAccess() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>" +
+ " <PurchaseOrder>" +
+ " <ns1:product>Ferrari</ns1:product>" +
+ " </PurchaseOrder>" +
+ " </ns1:SubmitPO>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService?wsdl");
+ QName serviceName = new QName(targetNS, "DocWrappedService");
+ QName portName = new QName(targetNS, "DocWrappedPort");
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE);
+
+ SOAPMessage resMsg = (SOAPMessage) dispatch.invoke(reqMsg);
+
+ NameImpl name = new NameImpl(new QName(targetNS, "SubmitPOResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName("PurchaseOrderAck"))).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
+ assertEquals("Ferrari", soapElement.getValue());
+ }
+
+ public void testNamespacedDocWrappedServiceMessageAccess() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+
+ String purchaseNamespace = "http://namespace/purchase";
+ String resultNamespace = "http://namespace/result";
+ String stringNamespace = "http://namespace/string";
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:SubmitNamespacedPO xmlns:ns1='" + targetNS + "'>" +
+ " <ns2:NamespacedPurchaseOrder xmlns:ns2='" + purchaseNamespace + "'>" +
+ " <ns1:product>Ferrari</ns1:product>" +
+ " </ns2:NamespacedPurchaseOrder>" +
+ " <ns3:NamespacedString xmlns:ns3='" + stringNamespace + "'>Ferrari</ns3:NamespacedString>" +
+ " </ns1:SubmitNamespacedPO>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+ URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService");
+
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+
+ NameImpl name = new NameImpl(new QName(targetNS, "SubmitNamespacedPOResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(resultNamespace, "NamespacedPurchaseOrderAck"))).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
+ assertEquals("Ferrari", soapElement.getValue());
+ }
+}
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/JSR181WebMethodTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/JSR181WebMethodTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/JSR181WebMethodTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,151 +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.samples.webmethod;
-
-import java.io.ByteArrayInputStream;
-import java.io.StringReader;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConnection;
-import javax.xml.soap.SOAPConnectionFactory;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.soap.NameImpl;
-import org.jboss.wsf.spi.utils.DOMUtils;
-import org.w3c.dom.Element;
-
-/**
- * Test the JSR-181 annotation: javax.jws.webmethod
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Oct-2005
- */
-public class JSR181WebMethodTestCase extends JBossWSTest
-{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-samples-webmethod/TestService";
- private String targetNS = "http://webmethod.samples.jaxws.ws.test.jboss.org/";
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebMethodTestCase.class, "jaxws-samples-webmethod.war");
- }
-
- public void testLegalAccess() throws Exception
- {
- URL wsdlURL = new URL(endpointURL + "?wsdl");
- QName serviceName = new QName(targetNS, "TestEndpointService");
-
- Service service = Service.create(wsdlURL, serviceName);
- TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
- Object retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
- }
-
- public void testLegalMessageAccess() throws Exception
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:echoString xmlns:ns1='" + targetNS + "'>" +
- " <arg0>Hello</arg0>" +
- " </ns1:echoString>" +
- " </env:Body>" +
- "</env:Envelope>";
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
-
- URL epURL = new URL(endpointURL);
- SOAPMessage resMsg = con.call(reqMsg, epURL);
-
- NameImpl name = new NameImpl(new QName(targetNS, "echoStringResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("return")).next();
- assertEquals("Hello", soapElement.getValue());
- }
-
- public void testIllegalMessageAccess() throws Exception
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
- " <String_1>Hello</String_1>" +
- " </ns1:noWebMethod>" +
- " </env:Body>" +
- "</env:Envelope>";
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
-
- URL epURL = new URL(endpointURL);
- SOAPMessage resMsg = con.call(reqMsg, epURL);
- SOAPFault soapFault = resMsg.getSOAPBody().getFault();
- assertNotNull("Expected SOAPFault", soapFault);
-
- String faultString = soapFault.getFaultString();
- assertTrue(faultString, faultString.indexOf("noWebMethod") > 0);
- }
-
- public void testIllegalCallAccess() throws Exception
- {
- URL wsdlURL = new URL(endpointURL + "?wsdl");
- QName serviceName = new QName(targetNS, "TestEndpointService");
- QName portName = new QName(targetNS, "TestEndpointPort");
-
- String reqPayload =
- "<ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
- " <String_1>Hello</String_1>" +
- "</ns1:noWebMethod>";
-
- String expPayload =
- "<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <faultcode>env:Client</faultcode>" +
- " <faultstring>Endpoint {http://webmethod.samples.jaxws.ws.test.jboss.org/}TestEndpointPort does not contain operation meta data for: {http://webmethod.samples.jaxws.ws.test.jboss.org/}noWebMethod</faultstring>" +
- "</env:Fault>";
-
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
- Source retSource = (Source)dispatch.invoke(new StreamSource(new StringReader(reqPayload)));
- Element retEl = getElementFromSource(retSource);
-
- assertEquals(DOMUtils.parse(expPayload), retEl);
- }
-}
\ No newline at end of file
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/JSR181WebMethodTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,151 @@
+/*
+ * 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.samples.webmethod;
+
+import java.io.ByteArrayInputStream;
+import java.io.StringReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.wsf.spi.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.webmethod
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 07-Oct-2005
+ */
+public class WebMethodTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-samples-webmethod/TestService";
+ private String targetNS = "http://webmethod.samples.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebMethodTestCase.class, "jaxws-samples-webmethod.war");
+ }
+
+ public void testLegalAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "TestEndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+
+ public void testLegalMessageAccess() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:echoString xmlns:ns1='" + targetNS + "'>" +
+ " <arg0>Hello</arg0>" +
+ " </ns1:echoString>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+
+ URL epURL = new URL(endpointURL);
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+
+ NameImpl name = new NameImpl(new QName(targetNS, "echoStringResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("return")).next();
+ assertEquals("Hello", soapElement.getValue());
+ }
+
+ public void testIllegalMessageAccess() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
+ " <String_1>Hello</String_1>" +
+ " </ns1:noWebMethod>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+
+ URL epURL = new URL(endpointURL);
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+ SOAPFault soapFault = resMsg.getSOAPBody().getFault();
+ assertNotNull("Expected SOAPFault", soapFault);
+
+ String faultString = soapFault.getFaultString();
+ assertTrue(faultString, faultString.indexOf("noWebMethod") > 0);
+ }
+
+ public void testIllegalCallAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "TestEndpointService");
+ QName portName = new QName(targetNS, "TestEndpointPort");
+
+ String reqPayload =
+ "<ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
+ " <String_1>Hello</String_1>" +
+ "</ns1:noWebMethod>";
+
+ String expPayload =
+ "<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <faultcode>env:Client</faultcode>" +
+ " <faultstring>Endpoint {http://webmethod.samples.jaxws.ws.test.jboss.org/}TestEndpointPort does not contain operation meta data for: {http://webmethod.samples.jaxws.ws.test.jboss.org/}noWebMethod</faultstring>" +
+ "</env:Fault>";
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
+ Source retSource = (Source)dispatch.invoke(new StreamSource(new StringReader(reqPayload)));
+ Element retEl = getElementFromSource(retSource);
+
+ assertEquals(DOMUtils.parse(expPayload), retEl);
+ }
+}
\ No newline at end of file
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,119 +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.samples.webparam;
-
-import java.io.File;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-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.core.StubExt;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebParam
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Oct-2005
- */
-public class JSR181WebParamTestCase extends JBossWSTest
-{
- private String targetNS = "http://www.openuri.org/jsr181/WebParamExample";
-
- private static PingService port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebParamTestCase.class, "jaxws-samples-webparam.war");
- }
-
- public void setUp() throws Exception
- {
- if (port == null)
- {
- QName serviceName = new QName(targetNS, "PingServiceService");
- URL wsdlURL = new File("resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl").toURL();
-
- Service service = Service.create(wsdlURL, serviceName);
- port = service.getPort(PingService.class);
- }
- }
-
- public void testEcho() throws Exception
- {
- PingDocument doc = new PingDocument();
- doc.setContent("Hello Kermit");
- PingDocument retObj = port.echo(doc);
- assertEquals(doc.getContent(), retObj.getContent());
- }
-
- public void testPingOneWay() throws Exception
- {
- StubExt stub = (StubExt)port;
- EndpointMetaData epMetaData = stub.getEndpointMetaData();
- OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS, "PingOneWay"));
- ParameterMetaData param = opMetaData.getParameter(new QName("Ping"));
- assertNotNull ("Expected param", param);
-
- PingDocument doc = new PingDocument();
- doc.setContent("Hello Kermit");
- port.pingOneWay(doc);
- }
-
- public void testPingTwoWay() throws Exception
- {
- PingDocument doc = new PingDocument();
- doc.setContent("Hello Kermit");
- Holder<PingDocument> holder = new Holder<PingDocument>(doc);
-
- port.pingTwoWay(holder);
- assertEquals("Hello Kermit Response", holder.value.getContent());
- }
-
- public void testSecurePing() throws Exception
- {
- StubExt stub = (StubExt)port;
- EndpointMetaData epMetaData = stub.getEndpointMetaData();
- OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS, "SecurePing"));
-
- ParameterMetaData param1 = opMetaData.getParameter(new QName("Ping"));
- assertNotNull ("Expected param", param1);
- ParameterMetaData param2 = opMetaData.getParameter(new QName(targetNS, "SecHeader"));
- assertNotNull ("Expected param", param2);
- assertTrue ("Expected header param", param2.isInHeader());
-
- PingDocument doc = new PingDocument();
- doc.setContent("Hello Kermit");
- SecurityHeader secHeader = new SecurityHeader();
- secHeader.setValue("some secret");
-
- port.securePing(doc, secHeader);
- }
-}
\ No newline at end of file
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/WebParamTestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/WebParamTestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webparam/WebParamTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,119 @@
+/*
+ * 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.samples.webparam;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Holder;
+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.core.StubExt;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebParam
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 07-Oct-2005
+ */
+public class WebParamTestCase extends JBossWSTest
+{
+ private String targetNS = "http://www.openuri.org/jsr181/WebParamExample";
+
+ private static PingService port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebParamTestCase.class, "jaxws-samples-webparam.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "PingServiceService");
+ URL wsdlURL = new File("resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl").toURL();
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(PingService.class);
+ }
+ }
+
+ public void testEcho() throws Exception
+ {
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ PingDocument retObj = port.echo(doc);
+ assertEquals(doc.getContent(), retObj.getContent());
+ }
+
+ public void testPingOneWay() throws Exception
+ {
+ StubExt stub = (StubExt)port;
+ EndpointMetaData epMetaData = stub.getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS, "PingOneWay"));
+ ParameterMetaData param = opMetaData.getParameter(new QName("Ping"));
+ assertNotNull ("Expected param", param);
+
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ port.pingOneWay(doc);
+ }
+
+ public void testPingTwoWay() throws Exception
+ {
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ Holder<PingDocument> holder = new Holder<PingDocument>(doc);
+
+ port.pingTwoWay(holder);
+ assertEquals("Hello Kermit Response", holder.value.getContent());
+ }
+
+ public void testSecurePing() throws Exception
+ {
+ StubExt stub = (StubExt)port;
+ EndpointMetaData epMetaData = stub.getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS, "SecurePing"));
+
+ ParameterMetaData param1 = opMetaData.getParameter(new QName("Ping"));
+ assertNotNull ("Expected param", param1);
+ ParameterMetaData param2 = opMetaData.getParameter(new QName(targetNS, "SecHeader"));
+ assertNotNull ("Expected param", param2);
+ assertTrue ("Expected header param", param2.isInHeader());
+
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ SecurityHeader secHeader = new SecurityHeader();
+ secHeader.setValue("some secret");
+
+ port.securePing(doc, secHeader);
+ }
+}
\ No newline at end of file
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,111 +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.samples.webresult;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConnection;
-import javax.xml.soap.SOAPConnectionFactory;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPMessage;
-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.core.soap.NameImpl;
-
-/**
- * Test the JSR-181 annotation: javax.jws.webresult
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Oct-2005
- */
-public class JSR181WebResultTestCase extends JBossWSTest
-{
- private String targetNS = "http://webresult.samples.jaxws.ws.test.jboss.org/";
-
- private static CustomerService port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebResultTestCase.class, "jaxws-samples-webresult.war");
- }
-
- public void setUp() throws Exception
- {
- if (port == null)
- {
- QName serviceName = new QName(targetNS, "CustomerServiceService");
- URL wsdlURL = new File("resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl").toURL();
-
- Service service = Service.create(wsdlURL, serviceName);
- port = service.getPort(CustomerService.class);
- }
- }
-
- public void testLocateCustomer() throws Exception
- {
- USAddress addr = new USAddress();
- addr.setAddress("Wall Street");
-
- CustomerRecord retObj = port.locateCustomer("Mickey", "Mouse", addr);
- assertEquals("Mickey", retObj.getFirstName());
- assertEquals("Mouse", retObj.getLastName());
- assertEquals("Wall Street", retObj.getAddress().getAddress());
- }
-
- public void testMessageAccess() throws Exception
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
-
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:locateCustomer xmlns:ns1='" + targetNS + "'>" +
- " <FirstName>Mickey</FirstName>" +
- " <LastName>Mouse</LastName>" +
- " <Address>" +
- " <address>Wall Street</address>" +
- " </Address>" +
- " </ns1:locateCustomer>" +
- " </env:Body>" +
- "</env:Envelope>";
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
-
- URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-webresult");
-
- SOAPMessage resMsg = con.call(reqMsg, epURL);
-
- NameImpl name = new NameImpl(new QName(targetNS, "locateCustomerResponse"));
- SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("CustomerRecord")).next();
- assertNotNull("Expected CustomerRecord", soapElement);
- }
-}
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/WebResultTestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/WebResultTestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webresult/WebResultTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,111 @@
+/*
+ * 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.samples.webresult;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+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.core.soap.NameImpl;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.webresult
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 07-Oct-2005
+ */
+public class WebResultTestCase extends JBossWSTest
+{
+ private String targetNS = "http://webresult.samples.jaxws.ws.test.jboss.org/";
+
+ private static CustomerService port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebResultTestCase.class, "jaxws-samples-webresult.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "CustomerServiceService");
+ URL wsdlURL = new File("resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl").toURL();
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(CustomerService.class);
+ }
+ }
+
+ public void testLocateCustomer() throws Exception
+ {
+ USAddress addr = new USAddress();
+ addr.setAddress("Wall Street");
+
+ CustomerRecord retObj = port.locateCustomer("Mickey", "Mouse", addr);
+ assertEquals("Mickey", retObj.getFirstName());
+ assertEquals("Mouse", retObj.getLastName());
+ assertEquals("Wall Street", retObj.getAddress().getAddress());
+ }
+
+ public void testMessageAccess() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:locateCustomer xmlns:ns1='" + targetNS + "'>" +
+ " <FirstName>Mickey</FirstName>" +
+ " <LastName>Mouse</LastName>" +
+ " <Address>" +
+ " <address>Wall Street</address>" +
+ " </Address>" +
+ " </ns1:locateCustomer>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+
+ URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-webresult");
+
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+
+ NameImpl name = new NameImpl(new QName(targetNS, "locateCustomerResponse"));
+ SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("CustomerRecord")).next();
+ assertNotNull("Expected CustomerRecord", soapElement);
+ }
+}
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceBase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceBase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceBase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -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.samples.webservice;
-
-//$Id$
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.rmi.RemoteException;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import org.jboss.test.ws.JBossWSTest;
-
-/**
- * Base testing class for @WebService
- *
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-public class JSR181WebServiceBase extends JBossWSTest
-{
-
- private EndpointInterface getPort(String endpointURI) throws MalformedURLException
- {
- QName serviceName = new QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + endpointURI + "?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- return service.getPort(EndpointInterface.class);
- }
-
- private EndpointInterface03 getPort03(String endpointURI) throws MalformedURLException
- {
- QName serviceName = new QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + endpointURI + "?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- return service.getPort(EndpointInterface03.class);
- }
-
- private void sayHello(String endpointURI) throws RemoteException, MalformedURLException
- {
- String helloWorld = "Hello world!";
- Object retObj = getPort(endpointURI).echo(helloWorld);
- assertEquals(helloWorld, retObj);
- }
-
- public void webServiceTest(String endpointURI) throws Exception
- {
- sayHello(endpointURI);
- }
-
- public void webServiceWsdlLocationTest(String endpointURI) throws Exception
- {
- sayHello(endpointURI);
- }
-
- public void webServiceEndpointInterfaceTest(String endpointURI) throws Exception
- {
- String helloWorld = "Hello Interface!";
- Object retObj = getPort03(endpointURI).echo(helloWorld);
- assertEquals(helloWorld, retObj);
- }
-}
\ No newline at end of file
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,100 +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.samples.webservice;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebService
- *
- * @author Thomas.Diesler at jboss.org
- * @author <a href="jason.greene at jboss.com">Jason T. Greene</a>
- * @since 29-Apr-2005
- */
-public class JSR181WebServiceEJB3TestCase extends JSR181WebServiceBase
-{
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebServiceEJB3TestCase.class, "");
- }
-
- public void testRemoteAccess() throws Exception
- {
- deploy("jaxws-samples-webservice01-ejb3.jar");
- try
- {
- InitialContext iniCtx = getInitialContext();
- EJB3RemoteInterface ejb3Remote = (EJB3RemoteInterface)iniCtx.lookup("/ejb3/EJB3EndpointInterface");
-
- String helloWorld = "Hello world!";
- Object retObj = ejb3Remote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
- }
- finally
- {
- undeploy("jaxws-samples-webservice01-ejb3.jar");
- }
- }
-
- public void testWebServiceTest() throws Exception
- {
- deploy("jaxws-samples-webservice01-ejb3.jar");
- try
- {
- webServiceTest("jaxws-samples-webservice01-ejb3");
- }
- finally
- {
- undeploy("jaxws-samples-webservice01-ejb3.jar");
- }
- }
-
- public void testWebServiceWsdlLocationTest() throws Exception
- {
- deploy("jaxws-samples-webservice02-ejb3.jar");
- try
- {
- webServiceWsdlLocationTest("jaxws-samples-webservice02-ejb3");
- }
- finally
- {
- undeploy("jaxws-samples-webservice02-ejb3.jar");
- }
- }
-
- public void WebServiceEndpointInterfaceTest() throws Exception
- {
- deploy("jaxws-samples-webservice03-ejb3.jar");
- try
- {
- webServiceEndpointInterfaceTest("jaxws-samples-webservice03-ejb3");
- }
- finally
- {
- undeploy("jaxws-samples-webservice03-ejb3.jar");
- }
- }
-}
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceJSETestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceJSETestCase.java 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceJSETestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -1,80 +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.samples.webservice;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebService
- *
- * @author Thomas.Diesler at jboss.org
- * @author <a href="jason.greene at jboss.com">Jason T. Greene</a>
- * @since 29-Apr-2005
- */
-public class JSR181WebServiceJSETestCase extends JSR181WebServiceBase
-{
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(JSR181WebServiceJSETestCase.class, "");
- }
-
- public void testWebServiceTest() throws Exception
- {
- deploy("jaxws-samples-webservice01-jse.war");
- try
- {
- webServiceTest("jaxws-samples-webservice01-jse");
- }
- finally
- {
- undeploy("jaxws-samples-webservice01-jse.war");
- }
- }
-
- public void testWebServiceWsdlLocation() throws Exception
- {
- deploy("jaxws-samples-webservice02-jse.war");
- try
- {
- webServiceWsdlLocationTest("jaxws-samples-webservice02-jse");
- }
- finally
- {
- undeploy("jaxws-samples-webservice02-jse.war");
- }
- }
-
- public void testWebServiceEndpointInterface() throws Exception
- {
- deploy("jaxws-samples-webservice03-jse.war");
- try
- {
- webServiceEndpointInterfaceTest("jaxws-samples-webservice03-jse");
- }
- finally
- {
- undeploy("jaxws-samples-webservice03-jse.war");
- }
- }
-}
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceBase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -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.samples.webservice;
+
+//$Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.test.ws.JBossWSTest;
+
+/**
+ * Base testing class for @WebService
+ *
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ */
+public class WebServiceBase extends JBossWSTest
+{
+
+ private EndpointInterface getPort(String endpointURI) throws MalformedURLException
+ {
+ QName serviceName = new QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + endpointURI + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointInterface.class);
+ }
+
+ private EndpointInterface03 getPort03(String endpointURI) throws MalformedURLException
+ {
+ QName serviceName = new QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + endpointURI + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointInterface03.class);
+ }
+
+ private void sayHello(String endpointURI) throws RemoteException, MalformedURLException
+ {
+ String helloWorld = "Hello world!";
+ Object retObj = getPort(endpointURI).echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+
+ public void webServiceTest(String endpointURI) throws Exception
+ {
+ sayHello(endpointURI);
+ }
+
+ public void webServiceWsdlLocationTest(String endpointURI) throws Exception
+ {
+ sayHello(endpointURI);
+ }
+
+ public void webServiceEndpointInterfaceTest(String endpointURI) throws Exception
+ {
+ String helloWorld = "Hello Interface!";
+ Object retObj = getPort03(endpointURI).echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+}
\ No newline at end of file
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceEJB3TestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceEJB3TestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceEJB3TestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,80 @@
+/*
+ * 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.samples.webservice;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebService
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author <a href="jason.greene at jboss.com">Jason T. Greene</a>
+ * @since 29-Apr-2005
+ */
+public class WebServiceEJB3TestCase extends WebServiceBase
+{
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebServiceEJB3TestCase.class, "");
+ }
+
+ public void testWebServiceTest() throws Exception
+ {
+ deploy("jaxws-samples-webservice01-ejb3.jar");
+ try
+ {
+ webServiceTest("jaxws-samples-webservice01-ejb3");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice01-ejb3.jar");
+ }
+ }
+
+ public void testWebServiceWsdlLocationTest() throws Exception
+ {
+ deploy("jaxws-samples-webservice02-ejb3.jar");
+ try
+ {
+ webServiceWsdlLocationTest("jaxws-samples-webservice02-ejb3");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice02-ejb3.jar");
+ }
+ }
+
+ public void WebServiceEndpointInterfaceTest() throws Exception
+ {
+ deploy("jaxws-samples-webservice03-ejb3.jar");
+ try
+ {
+ webServiceEndpointInterfaceTest("jaxws-samples-webservice03-ejb3");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice03-ejb3.jar");
+ }
+ }
+}
Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceJSETestCase.java (from rev 3182, trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceJSETestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceJSETestCase.java (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceJSETestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
@@ -0,0 +1,80 @@
+/*
+ * 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.samples.webservice;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebService
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author <a href="jason.greene at jboss.com">Jason T. Greene</a>
+ * @since 29-Apr-2005
+ */
+public class WebServiceJSETestCase extends WebServiceBase
+{
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(WebServiceJSETestCase.class, "");
+ }
+
+ public void testWebServiceTest() throws Exception
+ {
+ deploy("jaxws-samples-webservice01-jse.war");
+ try
+ {
+ webServiceTest("jaxws-samples-webservice01-jse");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice01-jse.war");
+ }
+ }
+
+ public void testWebServiceWsdlLocation() throws Exception
+ {
+ deploy("jaxws-samples-webservice02-jse.war");
+ try
+ {
+ webServiceWsdlLocationTest("jaxws-samples-webservice02-jse");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice02-jse.war");
+ }
+ }
+
+ public void testWebServiceEndpointInterface() throws Exception
+ {
+ deploy("jaxws-samples-webservice03-jse.war");
+ try
+ {
+ webServiceEndpointInterfaceTest("jaxws-samples-webservice03-jse");
+ }
+ finally
+ {
+ undeploy("jaxws-samples-webservice03-jse.war");
+ }
+ }
+}
Modified: trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/application.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/application.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -10,12 +10,12 @@
<module>
<web>
- <web-uri>jaxws-eardeployment.war</web-uri>
+ <web-uri>jaxws-samples-eardeployment.war</web-uri>
<context-root>earjse</context-root>
</web>
</module>
<module>
- <java>jaxws-eardeployment.jar</java>
+ <java>jaxws-samples-eardeployment.jar</java>
</module>
</application>
\ No newline at end of file
Modified: trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/jboss-app.xml
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/jboss-app.xml 2007-05-22 08:56:41 UTC (rev 3182)
+++ trunk/testsuite/src/resources/jaxws/samples/eardeployment/META-INF/jboss-app.xml 2007-05-22 13:06:13 UTC (rev 3183)
@@ -5,7 +5,7 @@
<jboss-app>
<module>
<web>
- <web-uri>jaxws-eardeployment.war</web-uri>
+ <web-uri>jaxws-samples-eardeployment.war</web-uri>
<context-root>/earjse</context-root>
</web>
</module>
More information about the jbossws-commits
mailing list