JBossWS SVN: r3187 - in trunk: integration/jboss50/ant-import and 12 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 13:27:48 -0400 (Tue, 22 May 2007)
New Revision: 3187
Modified:
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/ant-import/build-thirdparty.xml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.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/WebAppGeneratorDeployer.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
trunk/jbossws-core/ant-import-tests/build-testsuite.xml
trunk/jbossws-core/ant-import/build-thirdparty.xml
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws723/JBWS723TestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
trunk/jbossws-core/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml
Log:
Fix ejb21 security
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -49,7 +49,12 @@
String securityDomain = appMetaData.getSecurityDomain();
if (securityDomain != null)
- jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
}
public void addSecurityRoles(Element webApp, Deployment dep)
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -71,7 +71,12 @@
}
if (securityDomain != null)
- jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
}
public void addSecurityRoles(Element webApp, Deployment dep)
Modified: trunk/integration/jboss50/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/jboss50/ant-import/build-thirdparty.xml 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss50/ant-import/build-thirdparty.xml 2007-05-22 17:27:48 UTC (rev 3187)
@@ -50,6 +50,7 @@
<pathelement location="${jboss50.server.lib}/jboss.jar"/>
<pathelement location="${jboss50.server.lib}/jboss-javaee.jar"/>
<pathelement location="${jboss50.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss50.server.lib}/jboss-security-spi.jar"/>
<pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3.jar"/>
<pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -40,7 +40,9 @@
import org.jboss.invocation.PayloadKey;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextUtil;
+import org.jboss.security.plugins.SecurityContextAssociation;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.invocation.AbstractInvocationHandler;
@@ -126,10 +128,17 @@
{
log.debug("Invoke: " + inv.getJavaMethod().getName());
- // these are provided by the ServerLoginHandler
- Principal principal = SecurityAssociation.getPrincipal();
- Object credential = SecurityAssociation.getCredential();
+ Principal principal = null;
+ Object credential = null;
+ SecurityContext securityContext = SecurityContextAssociation.getSecurityContext();
+ if (securityContext != null)
+ {
+ SecurityContextUtil util = securityContext.getUtil();
+ principal = util.getUserPrincipal();
+ credential = util.getCredential();
+ }
+
// invoke on the container
try
{
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -79,7 +79,7 @@
throw new WebServiceException("Cannot find service endpoint target: " + objectName);
}
- public void invoke(Endpoint ep, Object beanInstance, Invocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation wsInv) throws Exception
{
try
{
@@ -87,18 +87,18 @@
StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
Class beanClass = container.getBeanClass();
- Method method = getImplMethod(beanClass, epInv.getJavaMethod());
- Object[] args = epInv.getArgs();
+ Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
+ Object[] args = wsInv.getArgs();
MethodInfo info = container.getMethodInfo(method);
- EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
- ejb3Inv.setAdvisor(container);
- ejb3Inv.setArguments(args);
- ejb3Inv.setContextCallback(new CallbackImpl(epInv));
+ EJBContainerInvocation<StatelessContainer, StatelessBeanContext> jbInv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+ jbInv.setAdvisor(container);
+ jbInv.setArguments(args);
+ jbInv.setContextCallback(new CallbackImpl(wsInv));
- Object retObj = ejb3Inv.invokeNext();
+ Object retObj = jbInv.invokeNext();
- epInv.setReturnValue(retObj);
+ wsInv.setReturnValue(retObj);
}
catch (Throwable th)
{
Modified: 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 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -49,7 +49,12 @@
String securityDomain = appMetaData.getSecurityDomain();
if (securityDomain != null)
- jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
}
public void addSecurityRoles(Element webApp, Deployment dep)
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -65,7 +65,12 @@
}
if (securityDomain != null)
- jbossWeb.addElement("security-domain").addText("java:/jaas/" + securityDomain);
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
}
public void addSecurityRoles(Element webApp, Deployment dep)
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 15:39:58 UTC (rev 3186)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -38,6 +38,8 @@
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
/**
* A deployer that generates a webapp for an EJB endpoint
@@ -156,20 +158,34 @@
// Add web-app/security-constraint for each port component
for (Endpoint ep : dep.getService().getEndpoints())
{
- Class targetBean = ep.getTargetBeanClass();
+ String ejbName = ep.getShortName();
+
boolean secureWSDLAccess = false;
String transportGuarantee = null;
String beanAuthMethod = null;
- WebContext anWebContext = (WebContext)targetBean.getAnnotation(WebContext.class);
- if (anWebContext != null && anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- if (anWebContext != null && anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- if (anWebContext != null && anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
+ WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
+ UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
+ {
+ UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ UnifiedEjbPortComponentMetaData pc = bmd.getPortComponent();
+ if (pc != null)
+ {
+ beanAuthMethod = pc.getAuthMethod();
+ transportGuarantee = pc.getTransportGuarantee();
+ }
+ }
+ else if(anWebContext != null)
+ {
+ if (anWebContext.authMethod().length() > 0)
+ beanAuthMethod = anWebContext.authMethod();
+ if (anWebContext.transportGuarantee().length() > 0)
+ transportGuarantee = anWebContext.transportGuarantee();
+ if (anWebContext.secureWSDLAccess())
+ secureWSDLAccess = anWebContext.secureWSDLAccess();
+ }
- String ejbName = ep.getShortName();
if (beanAuthMethod != null || transportGuarantee != null)
{
/*
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -53,4 +53,14 @@
}
dep.getContext().addAttachment(DDEndpoints.class, dd);
}
+
+ @Override
+ public void destroy(Deployment dep)
+ {
+ DDEndpoints dd = dep.getContext().getAttachment(DDEndpoints.class);
+ if (dd != null)
+ {
+ dd.destroyFileURL();
+ }
+ }
}
\ No newline at end of file
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -31,8 +31,7 @@
import java.util.List;
import org.jboss.wsf.spi.deployment.WSDeploymentException;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.utils.IOUtils;
//$Id$
@@ -61,10 +60,9 @@
{
destroyFileURL();
- ServerConfig serverConfig = ServerConfigFactory.getInstance().getServerConfig();
- File tmpDir = serverConfig.getServerTempDir();
try
{
+ File tmpDir = IOUtils.createTempDirectory();
tmpFile = File.createTempFile("jbossws-sun-jaxws", ".xml", tmpDir);
Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
writeTo(writer);
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -93,4 +93,15 @@
}
dep.getContext().addAttachment(DDBeans.class, dd);
}
+
+
+ @Override
+ public void destroy(Deployment dep)
+ {
+ DDBeans dd = dep.getContext().getAttachment(DDBeans.class);
+ if (dd != null)
+ {
+ dd.destroyFileURL();
+ }
+ }
}
\ No newline at end of file
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -33,8 +33,7 @@
import java.util.List;
import org.jboss.wsf.spi.deployment.WSDeploymentException;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.utils.IOUtils;
//$Id$
@@ -77,10 +76,9 @@
{
destroyFileURL();
- ServerConfig serverConfig = ServerConfigFactory.getInstance().getServerConfig();
- File tmpDir = serverConfig.getServerTempDir();
try
{
+ File tmpDir = IOUtils.createTempDirectory();
tmpFile = File.createTempFile("jbossws-xfire-services", ".xml", tmpDir);
Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
writeTo(writer);
Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-05-22 17:27:48 UTC (rev 3187)
@@ -79,6 +79,7 @@
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar" dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx.jar" dest="${thirdparty.dir}/jbosssx.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-src.zip" dest="${thirdparty.dir}/jbosssx-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jbossas/core-libs/${jbossas-core-libs}/lib/jboss-j2ee.jar" dest="${thirdparty.dir}/jboss-j2ee.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jbpm/bpel/${jbpm-bpel}/lib/jbpm-bpel.sar" dest="${thirdparty.dir}/jbpm-bpel.sar" usetimestamp="true" verbose="true" />
@@ -123,7 +124,7 @@
<pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
<pathelement location="${thirdparty.dir}/jboss-remoting.jar"/>
<pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
- <pathelement location="${thirdparty.dir}/jbosssx-client.jar"/>
+ <pathelement location="${thirdparty.dir}/jbosssx.jar"/>
<pathelement location="${thirdparty.dir}/mail.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api.jar"/>
Modified: trunk/jbossws-core/ant-import-tests/build-testsuite.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-05-22 17:27:48 UTC (rev 3187)
@@ -110,6 +110,7 @@
<wsconsume wsdl="${tests.resources.dir}/interop/soapwsdl/BaseDataTypesRpcLit/WEB-INF/wsdl/service.wsdl" package="org.jboss.test.ws.interop.soapwsdl.baserpclit" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume wsdl="${tests.resources.dir}/jaxws/complex/META-INF/wsdl/RegistrationService.wsdl" package="org.jboss.test.ws.jaxws.complex" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl" package="org.jboss.test.ws.jaxws.holder" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
+ <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecurity" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
</target>
<!--
@@ -201,6 +202,7 @@
<classpath location="${tests.output.dir}/classes"/>
</taskdef>
+ <wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
</target>
<target name="tests-generate-resources" depends="servicegen,wstools,wsprovide">
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws723/JBWS723TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws723/JBWS723TestCase.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws723/JBWS723TestCase.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -31,8 +31,6 @@
import junit.framework.Test;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -57,39 +55,6 @@
return JBossWSTestSetup.newTestSetup(JBWS723TestCase.class, "jaxrpc-jbws723.jar, jaxrpc-jbws723-client.jar");
}
- protected void setUp() throws Exception
- {
- super.setUp();
- SecurityAssociation.setPrincipal(null);
- SecurityAssociation.setCredential(null);
- }
-
- /** Test required principal/credential for this bean
- */
- public void testRoleSecuredSLSB() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/RoleSecuredSLSB");
-
- OrganizationRemote bean = null;
- try
- {
- bean = home.create();
- fail("Security exception expected");
- }
- catch (Exception e)
- {
- // all cool, now try again with valid credentials
- SecurityAssociation.setPrincipal(new SimplePrincipal(USERNAME));
- SecurityAssociation.setCredential(PASSWORD);
- //bean = home.create();
- }
-
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- //String info = bean.getContactInfo("mafia");
- //assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
- }
-
public void testRoleSecuredWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-jbws723/RoleSecured?wsdl");
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -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.jaxrpc.samples.secureejb;
import java.net.URL;
@@ -31,14 +31,11 @@
import junit.framework.Test;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-
/**
* A web service client that connects to a secured SLSB endpoint using.
*
@@ -55,39 +52,6 @@
return JBossWSTestSetup.newTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-client.jar");
}
- protected void setUp() throws Exception
- {
- super.setUp();
- SecurityAssociation.setPrincipal(null);
- SecurityAssociation.setCredential(null);
- }
-
- /** Test required principal/credential for this bean
- */
- public void testRoleSecuredSLSB() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/RoleSecuredSLSB");
-
- OrganizationRemote bean = null;
- try
- {
- bean = home.create();
- fail("Security exception expected");
- }
- catch (Exception e)
- {
- // all cool, now try again with valid credentials
- SecurityAssociation.setPrincipal(new SimplePrincipal(USERNAME));
- SecurityAssociation.setCredential(PASSWORD);
- //bean = home.create();
- }
-
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- //String info = bean.getContactInfo("mafia");
- //assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
- }
-
public void testRoleSecuredWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-samples-ejb/RoleSecured?wsdl");
@@ -95,7 +59,7 @@
WSDLDefinitions wsdl = factory.parse(wsdlURL);
assertNotNull("Expect unsecured wsdl access by default for jaxrpc", wsdl);
}
-
+
public void testRoleSecuredServiceAccess() throws Exception
{
InitialContext iniCtx = getInitialContext();
@@ -165,14 +129,14 @@
WSDLDefinitions wsdl = factory.parse(wsdlURL);
assertNotNull("Expect unsecured wsdl access", wsdl);
}
-
+
public void testConfidentialServiceAccess() throws Exception
{
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "ConfidentialPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
-
+
Stub stub = (Stub)port;
String address = (String)stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
assertEquals("https://" + getServerHost() + ":8443/jaxrpc-samples-ejb/ConfidentialSecured", address);
@@ -182,17 +146,16 @@
{
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-ejb/ConfidentialSecured");
port.getContactInfo("mafia");
-
+
if (isTargetJBoss50())
System.out.println("FIXME: [JBAS-3595] - Tomcat allows http access with transport guarantie CONFIDENTIAL");
- else
- fail("Security exception expected");
+ else fail("Security exception expected");
}
catch (RemoteException ignore)
{
// ignore expected exception
}
-
+
// test confidential access
//stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "https://" + getServerHost() + ":8443/jaxrpc-samples-ejb/ConfidentialSecured");
//String info = port.getContactInfo("mafia");
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2007-05-22 17:27:48 UTC (rev 3187)
@@ -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.jaxrpc.wsse;
import java.io.ByteArrayInputStream;
@@ -32,7 +32,6 @@
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
-import org.jboss.security.SecurityAssociation;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.extensions.security.Constants;
@@ -64,21 +63,12 @@
/** Test that we can build an envelope from InputStream */
public void testRoundTrip() throws Exception
{
- String envStr =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header>" +
- " <tns:someHeader xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'" +
- " tns:test='hi' xmlns:tns='http://org.jboss.ws/2004'>some header value</tns:someHeader>" +
- " </env:Header> " +
- " <env:Body>" +
- " <tns:echoString2 xmlns:tns='http://org.jboss.ws/2004'>" +
- " <string>Hello World!</string>" +
- " </tns:echoString2>" +
- " <tns:echoString xmlns:tns='http://org.jboss.ws/2004'>" +
- " <string>Hello World!</string>" +
- " </tns:echoString>" +
- " </env:Body>" +
- "</env:Envelope>";
+ String envStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + " <env:Header>"
+ + " <tns:someHeader xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'"
+ + " tns:test='hi' xmlns:tns='http://org.jboss.ws/2004'>some header value</tns:someHeader>" + " </env:Header> " + " <env:Body>"
+ + " <tns:echoString2 xmlns:tns='http://org.jboss.ws/2004'>" + " <string>Hello World!</string>" + " </tns:echoString2>"
+ + " <tns:echoString xmlns:tns='http://org.jboss.ws/2004'>" + " <string>Hello World!</string>" + " </tns:echoString>" + " </env:Body>"
+ + "</env:Envelope>";
ByteArrayInputStream inputStream = new ByteArrayInputStream(envStr.getBytes());
@@ -111,9 +101,6 @@
log.debug("Decoded message:" + DOMWriter.printNode(doc, true));
- assertEquals(SecurityAssociation.getPrincipal().toString(), "hi");
- assertEquals(SecurityAssociation.getCredential(), "there");
-
assertEquals(inputString, DOMWriter.printNode(doc, true));
}
Modified: trunk/jbossws-core/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml
===================================================================
--- trunk/jbossws-core/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml 2007-05-22 15:39:58 UTC (rev 3186)
+++ trunk/jbossws-core/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml 2007-05-22 17:27:48 UTC (rev 3187)
@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
<jboss>
<security-domain>java:/jaas/JBossWS</security-domain>
+ <webservices>
+ <context-root>/jaxrpc-samples-ejb</context-root>
+ </webservices>
+
<enterprise-beans>
<session>
<ejb-name>RoleSecuredSLSB</ejb-name>
<jndi-name>ejb/RoleSecuredSLSB</jndi-name>
<port-component>
<port-component-name>RoleSecured</port-component-name>
- <port-component-uri>/jaxrpc-samples-ejb/RoleSecured</port-component-uri>
+ <port-component-uri>/RoleSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
</port-component>
@@ -22,7 +26,7 @@
<jndi-name>ejb/BasicSecuredSLSB</jndi-name>
<port-component>
<port-component-name>BasicSecured</port-component-name>
- <port-component-uri>/jaxrpc-samples-ejb/BasicSecured</port-component-uri>
+ <port-component-uri>/BasicSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
</port-component>
@@ -32,7 +36,7 @@
<jndi-name>ejb/ConfidentialSLSB</jndi-name>
<port-component>
<port-component-name>ConfidentialSecured</port-component-name>
- <port-component-uri>/jaxrpc-samples-ejb/ConfidentialSecured</port-component-uri>
+ <port-component-uri>/ConfidentialSecured</port-component-uri>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</port-component>
</session>
18 years, 11 months
JBossWS SVN: r3186 - in trunk: integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50 and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 11:39:58 -0400 (Tue, 22 May 2007)
New Revision: 3186
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeployer.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/DocWrappedServiceImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrder.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrderAck.java
trunk/jbossws-core/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
trunk/jbossws-core/src/test/resources/jaxrpc/jbws723/META-INF/jboss.xml
Log:
REmove duplicate processing of contextRoot, urlPattern
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -26,10 +26,10 @@
import javax.xml.rpc.handler.soap.SOAPMessageContext;
import org.jboss.ejb.plugins.AbstractInterceptor;
-import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationKey;
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -50,24 +50,23 @@
/** Before and after we call the service endpoint bean, we process the handler chains.
*/
- public Object invoke(final Invocation mi) throws Exception
+ public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
{
// If no msgContext, it's not for us
- SOAPMessageContext msgContext = (SOAPMessageContext)mi.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
if (msgContext == null)
{
- return getNext().invoke(mi);
+ return getNext().invoke(jbInv);
}
// Get the endpoint invocation
- org.jboss.wsf.spi.invocation.Invocation epInv = (org.jboss.wsf.spi.invocation.Invocation)mi
- .getValue(org.jboss.wsf.spi.invocation.Invocation.class.getName());
+ Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());
// Get the handler callback
- HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+ HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());
// Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
- if (callback != null && epInv != null)
+ if (callback != null && wsInv != null)
{
try
{
@@ -81,13 +80,13 @@
// The SOAPContentElements stored in the EndpointInvocation might have changed after
// handler processing. Get the updated request payload. This should be a noop if request
// handlers did not modify the incomming SOAP message.
- Object[] reqParams = epInv.getArgs();
- mi.setArguments(reqParams);
- Object resObj = getNext().invoke(mi);
+ Object[] reqParams = wsInv.getArgs();
+ jbInv.setArguments(reqParams);
+ Object resObj = getNext().invoke(jbInv);
// Setting the message to null should trigger binding of the response message
msgContext.setMessage(null);
- epInv.setReturnValue(resObj);
+ wsInv.setReturnValue(resObj);
}
// call the response handlers
@@ -95,7 +94,7 @@
handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
// update the return value after response handler processing
- Object resObj = epInv.getReturnValue();
+ Object resObj = wsInv.getReturnValue();
return resObj;
}
@@ -121,7 +120,7 @@
else
{
log.warn("Handler callback not available");
- return getNext().invoke(mi);
+ return getNext().invoke(jbInv);
}
}
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -26,10 +26,10 @@
import javax.xml.rpc.handler.soap.SOAPMessageContext;
import org.jboss.ejb.plugins.AbstractInterceptor;
-import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationKey;
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -50,24 +50,23 @@
/** Before and after we call the service endpoint bean, we process the handler chains.
*/
- public Object invoke(final Invocation mi) throws Exception
+ public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
{
// If no msgContext, it's not for us
- SOAPMessageContext msgContext = (SOAPMessageContext)mi.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
if (msgContext == null)
{
- return getNext().invoke(mi);
+ return getNext().invoke(jbInv);
}
// Get the endpoint invocation
- org.jboss.wsf.spi.invocation.Invocation epInv = (org.jboss.wsf.spi.invocation.Invocation)mi
- .getValue(org.jboss.wsf.spi.invocation.Invocation.class.getName());
+ Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());
// Get the handler callback
- HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+ HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());
// Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
- if (callback != null && epInv != null)
+ if (callback != null && wsInv != null)
{
try
{
@@ -81,13 +80,13 @@
// The SOAPContentElements stored in the EndpointInvocation might have changed after
// handler processing. Get the updated request payload. This should be a noop if request
// handlers did not modify the incomming SOAP message.
- Object[] reqParams = epInv.getArgs();
- mi.setArguments(reqParams);
- Object resObj = getNext().invoke(mi);
+ Object[] reqParams = wsInv.getArgs();
+ jbInv.setArguments(reqParams);
+ Object resObj = getNext().invoke(jbInv);
// Setting the message to null should trigger binding of the response message
msgContext.setMessage(null);
- epInv.setReturnValue(resObj);
+ wsInv.setReturnValue(resObj);
}
// call the response handlers
@@ -95,7 +94,7 @@
handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
// update the return value after response handler processing
- Object resObj = epInv.getReturnValue();
+ Object resObj = wsInv.getReturnValue();
return resObj;
}
@@ -121,7 +120,7 @@
else
{
log.warn("Handler callback not available");
- return getNext().invoke(mi);
+ return getNext().invoke(jbInv);
}
}
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -76,4 +76,21 @@
{
this.contextRoot = contextRoot;
}
+
+ public Endpoint getEndpointByName(String shortName)
+ {
+ if (shortName == null)
+ throw new IllegalArgumentException("shortName cannot be null");
+
+ Endpoint retEndpoint = null;
+ for (Endpoint ep : endpoints)
+ {
+ if (ep.getShortName().equals(shortName))
+ {
+ retEndpoint = ep;
+ break;
+ }
+ }
+ return retEndpoint;
+ }
}
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 13:40:41 UTC (rev 3185)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -24,7 +24,9 @@
//$Id$
import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
* A deployer that assigns the context root to the service
@@ -40,7 +42,6 @@
String contextRoot = null;
// #1 Use the explicit context root from the web meta data
- UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
contextRoot = webMetaData.getContextRoot();
@@ -62,15 +63,23 @@
}
}
- // #3 Use the implicit context root derived from the deployment name
+ // #3 Use the explicit context root from webservices/context-root
+ UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (contextRoot == null && appMetaData != null)
+ {
+ contextRoot = appMetaData.getWebServiceContextRoot();
+ }
+
+ // #4 Use the implicit context root derived from the deployment name
if (contextRoot == null)
{
- String name = udi.simpleName;
- contextRoot = name.substring(0, name.length() - 4);
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ String simpleName = udi.simpleName;
+ contextRoot = simpleName.substring(0, simpleName.length() - 4);
if (udi.parent != null)
{
- name = udi.parent.simpleName;
- contextRoot = name.substring(0, name.length() - 4) + "-" + contextRoot;
+ simpleName = udi.parent.simpleName;
+ contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" + contextRoot;
}
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -53,4 +53,7 @@
/** Set the context root for this service */
void setContextRoot(String contextRoot);
+
+ /** Get the Endpoint for a give short name */
+ Endpoint getEndpointByName(String shortName);
}
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 13:40:41 UTC (rev 3185)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -24,6 +24,9 @@
//$Id$
import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
/**
@@ -49,7 +52,6 @@
String urlPattern = null;
// #1 For JSE lookup the url-pattern from the servlet mappings
- UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
{
@@ -59,7 +61,19 @@
throw new IllegalStateException("Cannot obtain servlet mapping for: " + epName);
}
- // #2 For EJB use @WebContext.urlPattern
+ // #2 Use the explicit urlPattern from port-component/port-component-uri
+ UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null)
+ {
+ UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+ UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ urlPattern = pcmd.getPortComponentURI();
+ }
+ }
+
+ // #3 For EJB use @WebContext.urlPattern
if (urlPattern == null)
{
Class beanClass = ep.getTargetBeanClass();
@@ -68,7 +82,7 @@
urlPattern = anWebContext.urlPattern();
}
- // #3 Fallback to the ejb-name
+ // #4 Fallback to the ejb-name
if (urlPattern == null)
{
urlPattern = "/" + ep.getShortName();
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -59,16 +59,6 @@
this.portComponentURI = portComponentURI;
}
- public String getURLPattern()
- {
- String pattern = "/*";
- if (portComponentURI != null)
- {
- return portComponentURI;
- }
- return pattern;
- }
-
public String getAuthMethod()
{
return authMethod;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -31,13 +31,11 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.StringTokenizer;
import javax.management.ObjectName;
import javax.wsdl.Definition;
import javax.wsdl.Import;
import javax.wsdl.Port;
-import javax.wsdl.Service;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.extensions.soap12.SOAP12Address;
import javax.xml.namespace.QName;
@@ -67,12 +65,13 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
@@ -128,79 +127,36 @@
}
}
- protected void initEndpointAddress(UnifiedDeploymentInfo udi, ServerEndpointMetaData sepMetaData)
+ protected void initEndpointAddress(Deployment dep, UnifiedDeploymentInfo udi, ServerEndpointMetaData sepMetaData)
{
- // For JAXWS these may have been set by @WebContext attributes
- String contextRoot = sepMetaData.getContextRoot();
- String urlPattern = sepMetaData.getURLPattern();
- String linkName = sepMetaData.getLinkName();
+ String contextRoot = dep.getService().getContextRoot();
+ String urlPattern = null;
- if (udi.metaData instanceof UnifiedWebMetaData)
+ // Get the URL pattern from the endpoint
+ String linkName = sepMetaData.getLinkName();
+ if (linkName != null && dep.getService().getEndpointByName(linkName) != null)
{
- UnifiedWebMetaData webMetaData = (UnifiedWebMetaData)udi.metaData;
- String jbwebContextRoot = webMetaData.getContextRoot();
- if (jbwebContextRoot != null)
- contextRoot = jbwebContextRoot;
-
- Map<String, String> servletMappings = webMetaData.getServletMappings();
- urlPattern = (String)servletMappings.get(linkName);
- if (urlPattern == null)
- throw new WSException("Cannot obtain url pattern for servlet name: " + linkName);
+ Endpoint endpoint = dep.getService().getEndpointByName(linkName);
+ urlPattern = endpoint.getURLPattern();
}
- if (udi.metaData instanceof UnifiedApplicationMetaData)
- {
- UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData)udi.metaData;
- UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)applMetaData.getBeanByEjbName(linkName);
- if (beanMetaData == null)
- throw new WSException("Cannot obtain meta data for ejb link: " + linkName);
-
- String wsContextRoot = applMetaData.getWebServiceContextRoot();
- if (wsContextRoot != null)
- contextRoot = wsContextRoot;
-
- String ejbClass = beanMetaData.getEjbClass();
- String ejbClassName = WSDLUtils.getJustClassName(ejbClass);
-
- UnifiedEjbPortComponentMetaData ejbpcMetaData = beanMetaData.getPortComponent();
- if (ejbpcMetaData != null && ejbpcMetaData.getPortComponentURI() != null)
- {
- String pcUrlPattern = ejbpcMetaData.getPortComponentURI();
- if (pcUrlPattern != null)
- {
- urlPattern = pcUrlPattern;
- StringTokenizer st = new StringTokenizer(urlPattern, "/");
- if (contextRoot == null && st.countTokens() > 1)
- {
- contextRoot = st.nextToken();
- urlPattern = st.nextToken();
- while (st.hasMoreTokens())
- urlPattern += "/" + st.nextToken();
- }
- }
- }
-
- if (contextRoot == null)
- contextRoot = ejbClassName + "Service";
- if (urlPattern == null)
- urlPattern = ejbClassName;
- }
-
// If not, derive the context root from the deployment
if (contextRoot == null)
{
- contextRoot = "/";
+ String simpleName = udi.simpleName;
+ contextRoot = simpleName.substring(0, simpleName.indexOf('.'));
if (udi.parent != null)
{
- String shortName = udi.parent.simpleName;
- shortName = shortName.substring(0, shortName.indexOf('.'));
- contextRoot += shortName + "-";
+ simpleName = udi.parent.simpleName;
+ simpleName = simpleName.substring(0, simpleName.indexOf('.'));
+ contextRoot = simpleName + "-" + contextRoot;
}
- String shortName = udi.simpleName;
- shortName = shortName.substring(0, shortName.indexOf('.'));
- contextRoot += shortName;
}
+ // Default to "/*"
+ if (urlPattern == null)
+ urlPattern = "/*";
+
if (contextRoot.startsWith("/") == false)
contextRoot = "/" + contextRoot;
if (urlPattern.startsWith("/") == false)
@@ -413,7 +369,7 @@
Iterator itServices = services.values().iterator();
while (itServices.hasNext())
{
- Service wsdlOneOneService = (Service)itServices.next();
+ javax.wsdl.Service wsdlOneOneService = (javax.wsdl.Service)itServices.next();
Map wsdlOneOnePorts = wsdlOneOneService.getPorts();
Iterator itPorts = wsdlOneOnePorts.keySet().iterator();
while (itPorts.hasNext())
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -42,6 +42,7 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
@@ -66,7 +67,7 @@
/**
* Build from webservices.xml
*/
- public UnifiedMetaData buildMetaData(JAXRPCDeployment udi)
+ public UnifiedMetaData buildMetaData(Deployment dep, JAXRPCDeployment udi)
{
log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
@@ -139,7 +140,7 @@
initEndpointEncodingStyle(sepMetaData);
- initEndpointAddress(udi, sepMetaData);
+ initEndpointAddress(dep, udi, sepMetaData);
if (udi.metaData instanceof UnifiedApplicationMetaData)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -360,7 +360,7 @@
// Conformance 3.18, the default value must be the same as the method name
if (requestWrapperType == null)
{
- String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) + ".jaxws";
+ String packageName = JavaUtils.getPackageName(method.getDeclaringClass());
requestWrapperType = packageName + "." + JavaUtils.capitalize(method.getName());
}
@@ -393,7 +393,7 @@
if (responseWrapperType == null)
{
- String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) + ".jaxws";
+ String packageName = JavaUtils.getPackageName(method.getDeclaringClass());
responseWrapperType = packageName + "." + JavaUtils.capitalize(method.getName()) + "Response";
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -31,6 +31,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+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;
@@ -51,7 +52,7 @@
/** Build from webservices.xml
*/
- public UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi)
+ public UnifiedMetaData buildMetaData(Deployment dep, UnifiedDeploymentInfo udi)
{
if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
@@ -74,7 +75,7 @@
if (beanClass.isAnnotationPresent(WebService.class) || beanClass.isAnnotationPresent(WebServiceProvider.class))
{
String ejbLink = beanMetaData.getEjbName();
- JAXWSServerMetaDataBuilder.setupProviderOrWebService(wsMetaData, udi, beanClass, ejbLink);
+ JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi, beanClass, ejbLink);
// setup the security domain
if (beanClass.isAnnotationPresent(SecurityDomain.class))
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -27,6 +27,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
@@ -44,7 +45,7 @@
/** Build from annotations
*/
- public UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi)
+ public UnifiedMetaData buildMetaData(Deployment dep, UnifiedDeploymentInfo udi)
{
if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
@@ -65,7 +66,7 @@
try
{
Class beanClass = udi.classLoader.loadClass(servletClassName);
- JAXWSServerMetaDataBuilder.setupProviderOrWebService(wsMetaData, udi, beanClass, servletName);
+ JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi, beanClass, servletName);
}
catch (ClassNotFoundException ex)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -47,6 +47,7 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.utils.JavaUtils;
@@ -59,7 +60,7 @@
*/
public class JAXWSProviderMetaDataBuilder extends JAXWSServerMetaDataBuilder
{
- public ServerEndpointMetaData buildProviderMetaData(UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName) throws IOException
+ public ServerEndpointMetaData buildProviderMetaData(Deployment dep, UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName) throws IOException
{
// 5.3 Conformance (Provider implementation): A Provider based service endpoint implementation MUST
// implement a typed Provider interface.
@@ -137,7 +138,7 @@
processWebContext(udi, sepClass, linkName, sepMetaData);
// Init the endpoint address
- initEndpointAddress(udi, sepMetaData);
+ initEndpointAddress(dep, udi, sepMetaData);
// A provider may not have a WSDL file
if (sepMetaData.getServiceMetaData().getWsdlLocation() != null)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -30,6 +30,7 @@
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
@@ -41,17 +42,17 @@
*/
public abstract class JAXWSServerMetaDataBuilder extends JAXWSMetaDataBuilder
{
- static void setupProviderOrWebService(UnifiedMetaData umd, UnifiedDeploymentInfo udi, Class<?> beanClass, String beanName) throws Exception
+ static void setupProviderOrWebService(Deployment dep, UnifiedMetaData umd, UnifiedDeploymentInfo udi, Class<?> beanClass, String beanName) throws Exception
{
if (beanClass.isAnnotationPresent(WebService.class))
{
JAXWSWebServiceMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
- builder.buildWebServiceMetaData(umd, udi, beanClass, beanName);
+ builder.buildWebServiceMetaData(dep, umd, udi, beanClass, beanName);
}
else if (beanClass.isAnnotationPresent(WebServiceProvider.class))
{
JAXWSProviderMetaDataBuilder builder = new JAXWSProviderMetaDataBuilder();
- builder.buildProviderMetaData(umd, udi, beanClass, beanName);
+ builder.buildProviderMetaData(dep, umd, udi, beanClass, beanName);
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -54,6 +54,7 @@
import org.jboss.ws.tools.wsdl.WSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.jboss.ws.tools.wsdl.WSDLWriterResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
@@ -95,7 +96,7 @@
this.generateWsdl = generateWsdl;
}
- public ServerEndpointMetaData buildWebServiceMetaData(UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName)
+ public ServerEndpointMetaData buildWebServiceMetaData(Deployment dep, UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName)
{
try
{
@@ -169,7 +170,7 @@
processWSDDContribution(sepMetaData);
// Init the endpoint address
- initEndpointAddress(udi, sepMetaData);
+ initEndpointAddress(dep, udi, sepMetaData);
// Process an optional @SOAPMessageHandlers annotation
if (sepClass.isAnnotationPresent(SOAPMessageHandlers.class) || seiClass.isAnnotationPresent(SOAPMessageHandlers.class))
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -34,6 +34,9 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.tools.jaxws.api.WSContractProvider;
import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.wsf.spi.deployment.BasicDeployment;
+import org.jboss.wsf.spi.deployment.BasicEndpoint;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
@@ -112,7 +115,14 @@
messageStream.println("Generating WSDL:");
UnifiedDeploymentInfo udi = createUDI(endpointClass, loader);
- builder.buildWebServiceMetaData(umd, udi, endpointClass, null);
+
+ Deployment dep = new BasicDeployment();
+ dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
+ BasicEndpoint ep = new BasicEndpoint();
+ ep.setTargetBean(endpointClass.getName());
+ dep.getService().addEndpoint(ep);
+
+ builder.buildWebServiceMetaData(dep, umd, udi, endpointClass, null);
try
{
generator.write();
Modified: trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeployer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeployer.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeployer.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -54,22 +54,22 @@
if (udi.type == DeploymentType.JAXRPC_JSE)
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
- umd = builder.buildMetaData((JAXRPCDeployment)udi);
+ umd = builder.buildMetaData(dep, (JAXRPCDeployment)udi);
}
else if (udi.type == DeploymentType.JAXRPC_EJB21)
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
- umd = builder.buildMetaData((JAXRPCDeployment)udi);
+ umd = builder.buildMetaData(dep, (JAXRPCDeployment)udi);
}
else if (udi.type == DeploymentType.JAXWS_JSE)
{
JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
- umd = builder.buildMetaData(udi);
+ umd = builder.buildMetaData(dep, udi);
}
else if (udi.type == DeploymentType.JAXWS_EJB3)
{
JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
- umd = builder.buildMetaData(udi);
+ umd = builder.buildMetaData(dep, udi);
}
else
{
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -66,7 +66,7 @@
QName serviceName = new QName("http://za.co.testws.interfaces", "ProcessClaim");
Service service = factory.createService(wsdlURL, serviceName , mappingURL);
port = (RequestService)service.getPort(RequestService.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/RequestServiceEJBService/RequestServiceEJB");
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-jbws1427/SubmitRequestEJB");
}
}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/DocWrappedServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/DocWrappedServiceImpl.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/DocWrappedServiceImpl.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -33,7 +33,7 @@
* @since 16-Oct-2005
*/
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.soapbinding.DocWrapped", name="DocWrapped")
+@WebService(endpointInterface = "org.jboss.test.ws.tools.jaxws.DocWrapped", name="DocWrapped")
public class DocWrappedServiceImpl implements DocWrapped
{
// Provide logging
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrder.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrder.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrder.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -28,10 +28,10 @@
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PurchaseOrderType", namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", propOrder = { "product" })
+@XmlType(name = "PurchaseOrderType", namespace="http://jaxws.tools.ws.test.jboss.org/", propOrder = { "product" })
public class PurchaseOrder
{
- @XmlElement(namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", required = true)
+ @XmlElement(namespace="http://jaxws.tools.ws.test.jboss.org/", required = true)
private String product;
public PurchaseOrder()
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrderAck.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrderAck.java 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/PurchaseOrderAck.java 2007-05-22 15:39:58 UTC (rev 3186)
@@ -28,10 +28,10 @@
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PurchaseOrderAckType", namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", propOrder = { "product" })
+@XmlType(name = "PurchaseOrderAckType", namespace="http://jaxws.tools.ws.test.jboss.org/", propOrder = { "product" })
public class PurchaseOrderAck
{
- @XmlElement(namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", required = true)
+ @XmlElement(namespace="http://jaxws.tools.ws.test.jboss.org/", required = true)
private String product;
public PurchaseOrderAck()
Modified: trunk/jbossws-core/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-core/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2007-05-22 15:39:58 UTC (rev 3186)
@@ -7,7 +7,7 @@
<service-ref>
<service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-enventry/EnvEntryBeanEJB?wsdl</wsdl-override>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-enventry/TestService?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified: trunk/jbossws-core/src/test/resources/jaxrpc/jbws723/META-INF/jboss.xml
===================================================================
--- trunk/jbossws-core/src/test/resources/jaxrpc/jbws723/META-INF/jboss.xml 2007-05-22 13:40:41 UTC (rev 3185)
+++ trunk/jbossws-core/src/test/resources/jaxrpc/jbws723/META-INF/jboss.xml 2007-05-22 15:39:58 UTC (rev 3186)
@@ -12,7 +12,7 @@
<jndi-name>ejb/RoleSecuredSLSB</jndi-name>
<port-component>
<port-component-name>RoleSecured</port-component-name>
- <port-component-uri>/jaxrpc-jbws723/RoleSecured</port-component-uri>
+ <port-component-uri>/RoleSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
<!-- default secure-wsdl-access (false for jaxrpc) -->
@@ -23,7 +23,7 @@
<jndi-name>ejb/BasicSecuredSLSB</jndi-name>
<port-component>
<port-component-name>BasicSecured</port-component-name>
- <port-component-uri>/jaxrpc-jbws723/BasicSecured</port-component-uri>
+ <port-component-uri>/BasicSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
<secure-wsdl-access>true</secure-wsdl-access>
@@ -34,7 +34,7 @@
<jndi-name>ejb/ConfidentialSLSB</jndi-name>
<port-component>
<port-component-name>ConfidentialSecured</port-component-name>
- <port-component-uri>/jaxrpc-jbws723/ConfidentialSecured</port-component-uri>
+ <port-component-uri>/ConfidentialSecured</port-component-uri>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
<secure-wsdl-access>false</secure-wsdl-access>
</port-component>
18 years, 11 months
JBossWS SVN: r3185 - in trunk: integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50 and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 09:40:41 -0400 (Tue, 22 May 2007)
New Revision: 3185
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/Invocation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointInvocation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/ServiceEndpointInvocation.java
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
Log:
Revert back to EndpointInvocation
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -35,7 +35,6 @@
import org.jboss.ejb.EjbModule;
import org.jboss.ejb.Interceptor;
import org.jboss.ejb.StatelessSessionContainer;
-import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationKey;
import org.jboss.invocation.InvocationType;
import org.jboss.invocation.PayloadKey;
@@ -45,8 +44,8 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.invocation.AbstractInvocationHandler;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -123,9 +122,9 @@
}
- public void invoke(Endpoint ep, Object beanInstance, org.jboss.wsf.spi.invocation.EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation inv) throws Exception
{
- log.debug("Invoke: " + epInv.getJavaMethod().getName());
+ log.debug("Invoke: " + inv.getJavaMethod().getName());
// these are provided by the ServerLoginHandler
Principal principal = SecurityAssociation.getPrincipal();
@@ -135,28 +134,28 @@
try
{
// setup the invocation
- Method method = epInv.getJavaMethod();
- Object[] args = epInv.getArgs();
- Invocation inv = new Invocation(null, method, args, null, principal, credential);
+ Method method = inv.getJavaMethod();
+ Object[] args = inv.getArgs();
+ org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
// EJB2.1 endpoints will only get an JAXRPC context
- MessageContext msgContext = epInv.getInvocationContext().getAttachment(MessageContext.class);
+ MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
if (msgContext == null)
throw new IllegalStateException("Cannot obtain MessageContext");
- HandlerCallback callback = epInv.getInvocationContext().getAttachment(HandlerCallback.class);
+ HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
if (callback == null)
throw new IllegalStateException("Cannot obtain HandlerCallback");
- inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
- inv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
- inv.setType(InvocationType.SERVICE_ENDPOINT);
- inv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
- inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+ jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+ jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+ jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
String[] sig = { org.jboss.invocation.Invocation.class.getName() };
- Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
- epInv.setReturnValue(retObj);
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
+ inv.setReturnValue(retObj);
}
catch (Exception e)
{
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -40,7 +40,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.invocation.AbstractInvocationHandler;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -81,7 +81,7 @@
throw new WebServiceException("Cannot find service endpoint target: " + objectName);
}
- public void invoke(Endpoint ep, Object beanInstance, EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation epInv) throws Exception
{
try
{
@@ -113,7 +113,7 @@
private javax.xml.ws.handler.MessageContext jaxwsMessageContext;
private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
- public CallbackImpl(EndpointInvocation epInv)
+ public CallbackImpl(Invocation epInv)
{
jaxrpcMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
jaxwsMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.ws.handler.MessageContext.class);
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -60,8 +60,8 @@
}
// Get the endpoint invocation
- org.jboss.wsf.spi.invocation.EndpointInvocation epInv = (org.jboss.wsf.spi.invocation.EndpointInvocation)mi
- .getValue(org.jboss.wsf.spi.invocation.EndpointInvocation.class.getName());
+ org.jboss.wsf.spi.invocation.Invocation epInv = (org.jboss.wsf.spi.invocation.Invocation)mi
+ .getValue(org.jboss.wsf.spi.invocation.Invocation.class.getName());
// Get the handler callback
HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -35,7 +35,6 @@
import org.jboss.ejb.EjbModule;
import org.jboss.ejb.Interceptor;
import org.jboss.ejb.StatelessSessionContainer;
-import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationKey;
import org.jboss.invocation.InvocationType;
import org.jboss.invocation.PayloadKey;
@@ -45,8 +44,8 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.invocation.AbstractInvocationHandler;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -123,9 +122,9 @@
}
- public void invoke(Endpoint ep, Object beanInstance, EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation inv) throws Exception
{
- log.debug("Invoke: " + epInv.getJavaMethod().getName());
+ log.debug("Invoke: " + inv.getJavaMethod().getName());
// these are provided by the ServerLoginHandler
Principal principal = SecurityAssociation.getPrincipal();
@@ -135,28 +134,28 @@
try
{
// setup the invocation
- Method method = epInv.getJavaMethod();
- Object[] args = epInv.getArgs();
- Invocation inv = new Invocation(null, method, args, null, principal, credential);
+ Method method = inv.getJavaMethod();
+ Object[] args = inv.getArgs();
+ org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
// EJB2.1 endpoints will only get an JAXRPC context
- MessageContext msgContext = epInv.getInvocationContext().getAttachment(MessageContext.class);
+ MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
if (msgContext == null)
throw new IllegalStateException("Cannot obtain MessageContext");
- HandlerCallback callback = epInv.getInvocationContext().getAttachment(HandlerCallback.class);
+ HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
if (callback == null)
throw new IllegalStateException("Cannot obtain HandlerCallback");
- inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
- inv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
- inv.setType(InvocationType.SERVICE_ENDPOINT);
- inv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
- inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+ jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+ jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+ jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
String[] sig = { org.jboss.invocation.Invocation.class.getName() };
- Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
- epInv.setReturnValue(retObj);
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
+ inv.setReturnValue(retObj);
}
catch (Exception e)
{
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -40,7 +40,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.invocation.AbstractInvocationHandler;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -79,7 +79,7 @@
throw new WebServiceException("Cannot find service endpoint target: " + objectName);
}
- public void invoke(Endpoint ep, Object beanInstance, EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation epInv) throws Exception
{
try
{
@@ -111,7 +111,7 @@
private javax.xml.ws.handler.MessageContext jaxwsMessageContext;
private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
- public CallbackImpl(EndpointInvocation epInv)
+ public CallbackImpl(Invocation epInv)
{
jaxrpcMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
jaxwsMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.ws.handler.MessageContext.class);
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -60,8 +60,8 @@
}
// Get the endpoint invocation
- org.jboss.wsf.spi.invocation.EndpointInvocation epInv = (org.jboss.wsf.spi.invocation.EndpointInvocation)mi
- .getValue(org.jboss.wsf.spi.invocation.EndpointInvocation.class.getName());
+ org.jboss.wsf.spi.invocation.Invocation epInv = (org.jboss.wsf.spi.invocation.Invocation)mi
+ .getValue(org.jboss.wsf.spi.invocation.Invocation.class.getName());
// Get the handler callback
HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -31,7 +31,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public class BasicEndpointInvocation implements EndpointInvocation
+public class BasicEndpointInvocation implements Invocation
{
private InvocationContext invocationContext;
private Method javaMethod;
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -33,7 +33,7 @@
*/
public abstract class BasicInvocationHandler implements InvocationHandler
{
- public EndpointInvocation createInvocation()
+ public Invocation createInvocation()
{
return new BasicEndpointInvocation();
}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointInvocation.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointInvocation.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointInvocation.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -1,51 +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.spi.invocation;
-
-import java.lang.reflect.Method;
-
-//$Id$
-
-/**
- * A general endpoint invocation.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public interface EndpointInvocation
-{
- InvocationContext getInvocationContext();
-
- void setInvocationContext(InvocationContext context);
-
- Method getJavaMethod();
-
- void setJavaMethod(Method method);
-
- Object[] getArgs();
-
- void setArgs(Object[] args);
-
- Object getReturnValue();
-
- void setReturnValue(Object ret);
-}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/Invocation.java (from rev 3182, trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointInvocation.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/Invocation.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/Invocation.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -0,0 +1,51 @@
+/*
+ * 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.invocation;
+
+import java.lang.reflect.Method;
+
+//$Id$
+
+/**
+ * A general endpoint invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Invocation
+{
+ InvocationContext getInvocationContext();
+
+ void setInvocationContext(InvocationContext context);
+
+ Method getJavaMethod();
+
+ void setJavaMethod(Method method);
+
+ Object[] getArgs();
+
+ void setArgs(Object[] args);
+
+ Object getReturnValue();
+
+ void setReturnValue(Object ret);
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -34,7 +34,7 @@
public interface InvocationHandler
{
/** Create the default invokation object */
- EndpointInvocation createInvocation();
+ Invocation createInvocation();
/** Create the invocation handler */
void create(Endpoint ep);
@@ -43,7 +43,7 @@
void start(Endpoint ep);
/** Invoke the the service endpoint */
- void invoke(Endpoint ep, Object beanInstance, EndpointInvocation inv) throws Exception;
+ void invoke(Endpoint ep, Object beanInstance, Invocation inv) throws Exception;
/** Stop the invocation handler */
void stop(Endpoint ep);
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -44,7 +44,7 @@
return targetBean;
}
- public void invoke(Endpoint ep, Object beanInstance, EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation epInv) throws Exception
{
try
{
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -31,7 +31,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import com.sun.istack.NotNull;
@@ -81,7 +81,7 @@
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
- EndpointInvocation inv = invHandler.createInvocation();
+ Invocation inv = invHandler.createInvocation();
inv.setJavaMethod(m);
inv.setArgs(args);
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -31,7 +31,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import com.sun.istack.NotNull;
@@ -84,7 +84,7 @@
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
- EndpointInvocation inv = invHandler.createInvocation();
+ Invocation inv = invHandler.createInvocation();
inv.setJavaMethod(m);
inv.setArgs(args);
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -31,7 +31,7 @@
import org.codehaus.xfire.service.invoker.Invoker;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
/**
@@ -47,7 +47,7 @@
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
- EndpointInvocation inv = invHandler.createInvocation();
+ Invocation inv = invHandler.createInvocation();
inv.getInvocationContext().addAttachment(MessageContext.class, context);
inv.setJavaMethod(m);
inv.setArgs(params);
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -31,7 +31,7 @@
import org.codehaus.xfire.service.invoker.Invoker;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
/**
@@ -47,7 +47,7 @@
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
- EndpointInvocation inv = invHandler.createInvocation();
+ Invocation inv = invHandler.createInvocation();
inv.getInvocationContext().addAttachment(MessageContext.class, context);
inv.setJavaMethod(m);
inv.setArgs(params);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -40,16 +40,16 @@
public interface CommonBinding
{
/** On the client side, generate the Object from IN parameters. */
- MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException;
+ MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException;
/** On the server side, extract the IN parameters from the Object and populate an Invocation object */
- ServiceEndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException;
+ EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException;
/** On the server side, generate the Object from OUT parameters in the Invocation object. */
- MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv) throws BindingException;
+ MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException;
/** On the client side, extract the OUT parameters from the Object and return them to the client. */
- void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException;
+ void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException;
/** bind an exception to a fault message */
MessageAbstraction bindFaultMessage(Exception ex);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -81,7 +81,7 @@
// The current operation name
protected QName operationName;
// Output parameters
- protected ServiceEndpointInvocation epInv;
+ protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
// A Map<QName,UnboundHeader> of header entries
@@ -264,7 +264,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new ServiceEndpointInvocation(opMetaData);
+ epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
// Set the required outbound properties
@@ -479,7 +479,7 @@
/** Synchronize the operation paramters with the call output parameters.
*/
- private Object syncOutputParams(Object[] inParams, ServiceEndpointInvocation epInv) throws SOAPException
+ private Object syncOutputParams(Object[] inParams, EndpointInvocation epInv) throws SOAPException
{
Object retValue = null;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -134,7 +134,7 @@
protected abstract MessageAbstraction createMessage(OperationMetaData opMetaData) throws SOAPException;
/** On the client side, generate the payload from IN parameters. */
- public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
if (log.isDebugEnabled())
@@ -255,7 +255,7 @@
public abstract void setSOAPActionHeader(OperationMetaData opMetaData, SOAPMessage reqMessage);
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
- public ServiceEndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction payload) throws BindingException
+ public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction payload) throws BindingException
{
if (log.isDebugEnabled())
log.debug("unbindRequestMessage: " + opMetaData.getQName());
@@ -272,7 +272,7 @@
verifySOAPVersion(opMetaData, soapEnvelope);
// Construct the endpoint invocation object
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext == null)
@@ -368,7 +368,7 @@
}
/** On the server side, generate the payload from OUT parameters. */
- public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv) throws BindingException
+ public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
if (log.isDebugEnabled())
log.debug("bindResponseMessage: " + opMetaData.getQName());
@@ -497,7 +497,7 @@
}
/** On the client side, extract the OUT parameters from the payload and return them to the client. */
- public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction payload, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction payload, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
if (log.isDebugEnabled())
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java (from rev 3182, trunk/jbossws-core/src/main/java/org/jboss/ws/core/ServiceEndpointInvocation.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -0,0 +1,397 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.MimeUtils;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.metadata.umdm.WrappedParameter;
+import org.jboss.wsf.spi.utils.JavaUtils;
+import org.w3c.dom.Element;
+
+/** A web service invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-Oct-2004
+ */
+public class EndpointInvocation
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(EndpointInvocation.class);
+
+ // The operation meta data for this invocation
+ private OperationMetaData opMetaData;
+ // Map the named endpoint parameters
+ private Map<QName, Object> reqPayload = new LinkedHashMap<QName, Object>();
+ // Map the named endpoint parameters
+ private Map<QName, Object> resPayload = new LinkedHashMap<QName, Object>();
+ // The return value
+ private Object returnValue;
+ // Map of output parameters, key being the parameter index in the method signature
+ private Map<Integer, Object> outParameters = new HashMap<Integer, Object>();
+
+ public EndpointInvocation(OperationMetaData opMetaData)
+ {
+ this.opMetaData = opMetaData;
+ }
+
+ public OperationMetaData getOperationMetaData()
+ {
+ return opMetaData;
+ }
+
+ public Method getJavaMethod()
+ {
+ return opMetaData.getJavaMethod();
+ }
+
+ public Map<Integer, Object> getOutParameters()
+ {
+ return outParameters;
+ }
+
+ public List<QName> getRequestParamNames()
+ {
+ List<QName> xmlNames = new ArrayList<QName>();
+ xmlNames.addAll(reqPayload.keySet());
+ return xmlNames;
+ }
+
+ public void setRequestParamValue(QName xmlName, Object value)
+ {
+ if (log.isDebugEnabled())
+ log.debug("setRequestParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
+ reqPayload.put(xmlName, value);
+ }
+
+ public Object getRequestParamValue(QName xmlName)
+ {
+ if (log.isDebugEnabled())
+ log.debug("getRequestParamValue: " + xmlName);
+ Object paramValue = reqPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ try
+ {
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ }
+ catch (SOAPException ex)
+ {
+ throw new WSException(ex);
+ }
+ return paramValue;
+ }
+
+ /** Returns the payload that can be passed on to the endpoint implementation
+ */
+ public Object[] getRequestPayload()
+ {
+ log.debug("getRequestPayload");
+ List<QName> xmlNames = getRequestParamNames();
+
+ Object[] payload = new Object[opMetaData.getJavaMethod().getParameterTypes().length];
+ for (int i = 0; i < xmlNames.size(); i++)
+ {
+ QName xmlName = xmlNames.get(i);
+ Object paramValue = getRequestParamValue(xmlName);
+
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ syncEndpointInputParam(paramMetaData, paramValue, payload);
+ }
+
+ return payload;
+ }
+
+ public List<QName> getResponseParamNames()
+ {
+ List<QName> xmlNames = new ArrayList<QName>();
+ xmlNames.addAll(resPayload.keySet());
+ return xmlNames;
+ }
+
+ public void setResponseParamValue(QName xmlName, Object value)
+ {
+ if (log.isDebugEnabled())
+ log.debug("setResponseParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
+ resPayload.put(xmlName, value);
+ }
+
+ public Object getResponseParamValue(QName xmlName) throws SOAPException
+ {
+ if (log.isDebugEnabled())
+ log.debug("getResponseParamValue: " + xmlName);
+ Object paramValue = resPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ if (paramValue != null)
+ {
+ Class valueType = paramValue.getClass();
+ if (HolderUtils.isHolderType(valueType))
+ {
+ paramValue = HolderUtils.getHolderValue(paramValue);
+ }
+ }
+ return paramValue;
+ }
+
+ public void setReturnValue(Object value)
+ {
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (value != null && retMetaData == null)
+ throw new WSException("Operation does not have a return value: " + opMetaData.getQName());
+
+ if (log.isDebugEnabled())
+ log.debug("setReturnValue: " + getTypeName(value));
+ this.returnValue = value;
+ }
+
+ public Object getReturnValue()
+ {
+ if (log.isDebugEnabled())
+ log.debug("getReturnValue");
+ Object paramValue = returnValue;
+ ParameterMetaData paramMetaData = opMetaData.getReturnParameter();
+ if (paramMetaData != null)
+ {
+ try
+ {
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ }
+ catch (SOAPException ex)
+ {
+ throw new WSException(ex);
+ }
+ }
+ return paramValue;
+ }
+
+ private Object transformPayloadValue(ParameterMetaData paramMetaData, final Object paramValue) throws SOAPException
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ QName xmlType = paramMetaData.getXmlType();
+ Class<?> javaType = paramMetaData.getJavaType();
+ String javaName = paramMetaData.getJavaTypeName();
+
+ if (xmlType == null)
+ throw new IllegalStateException("Cannot obtain xml type for: [xmlName=" + xmlName + ",javaName=" + javaName + "]");
+
+ Object retValue = paramValue;
+
+ // Handle attachment part
+ if (paramValue instanceof AttachmentPart)
+ {
+ AttachmentPart part = (AttachmentPart)paramValue;
+
+ Set mimeTypes = paramMetaData.getMimeTypes();
+ if (DataHandler.class.isAssignableFrom(javaType) && !javaType.equals(Object.class))
+ {
+ DataHandler handler = part.getDataHandler();
+ String mimeType = MimeUtils.getBaseMimeType(handler.getContentType());
+
+ // JAX-WS 2.0, 2.6.3.1 MIME Content
+ // Conformance (MIME type mismatch): On receipt of a message where the MIME type of a part does not
+ // match that described in the WSDL an implementation SHOULD throw a WebServiceException.
+ if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
+ log.warn("Mime type " + mimeType + " not allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
+
+ retValue = part.getDataHandler();
+ }
+ else
+ {
+ retValue = part.getContent();
+ String mimeType = MimeUtils.getBaseMimeType(part.getContentType());
+
+ if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
+ throw new SOAPException("Mime type " + mimeType + " not allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
+
+ if (retValue != null)
+ {
+ Class valueType = retValue.getClass();
+ if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
+ throw new SOAPException("javaType [" + javaType.getName() + "] is not assignable from attachment content: " + valueType.getName());
+ }
+ }
+ }
+ else if (paramValue instanceof SOAPContentElement)
+ {
+ // If this is bound to a SOAPElement, or Element, then we can return
+ // the content element as is.
+ // Note, that it is possible for a Java type to be bound to an any
+ // type, so checking the xml type is not sufficient.
+ if (!Element.class.isAssignableFrom(javaType))
+ {
+ SOAPContentElement soapElement = (SOAPContentElement)paramValue;
+ retValue = soapElement.getObjectValue();
+ }
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("transformPayloadValue: " + getTypeName(paramValue) + " -> " + getTypeName(retValue));
+ return retValue;
+ }
+
+ /** Synchronize the operation IN, INOUT paramters with the call input parameters.
+ * Essetially it unwrapps holders and converts primitives to wrapper types.
+ */
+ public void initInputParams(Object[] inputParams)
+ {
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ int index = paramMetaData.getIndex();
+
+ // doc/lit wrapped return headers are OUT, so skip
+ if (index < 0)
+ continue;
+
+ QName xmlName = paramMetaData.getXmlName();
+ Class javaType = paramMetaData.getJavaType();
+
+ Object value;
+ if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA())
+ {
+ value = ParameterWrapping.wrapRequestParameters(paramMetaData, inputParams);
+ }
+ else
+ {
+ value = inputParams[index];
+ if (value != null)
+ {
+ Class inputType = value.getClass();
+
+ if (HolderUtils.isHolderType(inputType))
+ {
+ // At runtime we lose the generic info for JAX-WS types,
+ // So we use the actual instance type
+ value = HolderUtils.getHolderValue(value);
+ inputType = (value == null) ? null : value.getClass();
+ }
+
+ // Verify that the java type matches a registered xmlType
+ // Attachments are skipped because they don't use type mapping
+ if (value != null && !paramMetaData.isSwA() && !paramMetaData.isXOP())
+ {
+ if (JavaUtils.isAssignableFrom(javaType, inputType) == false)
+ throw new WSException("Parameter '" + javaType + "' not assignable from: " + inputType);
+ }
+ }
+ }
+
+ setRequestParamValue(xmlName, value);
+ }
+ }
+
+ /**
+ * Synchronize the operation paramters with the endpoint method parameters
+ */
+ private void syncEndpointInputParam(ParameterMetaData paramMetaData, final Object paramValue, Object[] payload)
+ {
+ Object retValue = paramValue;
+ Method method = opMetaData.getJavaMethod();
+ Class[] targetParameterTypes = method.getParameterTypes();
+
+ if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA() && !paramMetaData.isMessageType())
+ {
+ outParameters = ParameterWrapping.unwrapRequestParameters(paramMetaData, paramValue, payload);
+ syncOutWrappedParameters(targetParameterTypes, payload);
+ }
+ else
+ {
+ // Replace INOUT and OUT parameters by their respective holder values
+ int index = paramMetaData.getIndex();
+ Class targetParameterType = targetParameterTypes[index];
+
+ if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode() == ParameterMode.OUT)
+ {
+ retValue = HolderUtils.createHolderInstance(paramValue, targetParameterType);
+
+ QName xmlName = paramMetaData.getXmlName();
+ setResponseParamValue(xmlName, retValue);
+ }
+
+ if (retValue != null)
+ {
+ Class valueType = retValue.getClass();
+ if (JavaUtils.isAssignableFrom(targetParameterType, valueType) == false)
+ throw new WSException("Parameter " + targetParameterType.getName() + " is not assignable from: " + getTypeName(retValue));
+
+ if (valueType.isArray())
+ retValue = JavaUtils.syncArray(retValue, targetParameterType);
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + " -> " + getTypeName(retValue) + "(" + index + ")");
+ payload[index] = retValue;
+ }
+ }
+
+ private void syncOutWrappedParameters(Class[] targetParameterTypes, Object[] payload)
+ {
+ ParameterMetaData returnMetaData = opMetaData.getReturnParameter();
+ if (returnMetaData != null)
+ {
+ for (WrappedParameter param : returnMetaData.getWrappedParameters())
+ {
+ try
+ {
+ // only OUT parameters need to be initialized
+ if (param.getIndex() >= 0 && !outParameters.containsKey(param.getIndex()))
+ {
+ Object holder = targetParameterTypes[param.getIndex()].newInstance();
+ payload[param.getIndex()] = holder;
+ outParameters.put(param.getIndex(), holder);
+ }
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Could not add output param: " + param.getName(), e);
+
+ }
+ }
+ }
+ }
+
+ private String getTypeName(Object value)
+ {
+ String valueType = (value != null ? value.getClass().getName() : null);
+ return valueType;
+ }
+}
\ No newline at end of file
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/ServiceEndpointInvocation.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/ServiceEndpointInvocation.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/ServiceEndpointInvocation.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -1,397 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core;
-
-// $Id$
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.soap.SOAPContentElement;
-import org.jboss.ws.core.utils.HolderUtils;
-import org.jboss.ws.core.utils.MimeUtils;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.WrappedParameter;
-import org.jboss.wsf.spi.utils.JavaUtils;
-import org.w3c.dom.Element;
-
-/** A web service invocation.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-Oct-2004
- */
-public class ServiceEndpointInvocation
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceEndpointInvocation.class);
-
- // The operation meta data for this invocation
- private OperationMetaData opMetaData;
- // Map the named endpoint parameters
- private Map<QName, Object> reqPayload = new LinkedHashMap<QName, Object>();
- // Map the named endpoint parameters
- private Map<QName, Object> resPayload = new LinkedHashMap<QName, Object>();
- // The return value
- private Object returnValue;
- // Map of output parameters, key being the parameter index in the method signature
- private Map<Integer, Object> outParameters = new HashMap<Integer, Object>();
-
- public ServiceEndpointInvocation(OperationMetaData opMetaData)
- {
- this.opMetaData = opMetaData;
- }
-
- public OperationMetaData getOperationMetaData()
- {
- return opMetaData;
- }
-
- public Method getJavaMethod()
- {
- return opMetaData.getJavaMethod();
- }
-
- public Map<Integer, Object> getOutParameters()
- {
- return outParameters;
- }
-
- public List<QName> getRequestParamNames()
- {
- List<QName> xmlNames = new ArrayList<QName>();
- xmlNames.addAll(reqPayload.keySet());
- return xmlNames;
- }
-
- public void setRequestParamValue(QName xmlName, Object value)
- {
- if (log.isDebugEnabled())
- log.debug("setRequestParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
- reqPayload.put(xmlName, value);
- }
-
- public Object getRequestParamValue(QName xmlName)
- {
- if (log.isDebugEnabled())
- log.debug("getRequestParamValue: " + xmlName);
- Object paramValue = reqPayload.get(xmlName);
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- try
- {
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- }
- catch (SOAPException ex)
- {
- throw new WSException(ex);
- }
- return paramValue;
- }
-
- /** Returns the payload that can be passed on to the endpoint implementation
- */
- public Object[] getRequestPayload()
- {
- log.debug("getRequestPayload");
- List<QName> xmlNames = getRequestParamNames();
-
- Object[] payload = new Object[opMetaData.getJavaMethod().getParameterTypes().length];
- for (int i = 0; i < xmlNames.size(); i++)
- {
- QName xmlName = xmlNames.get(i);
- Object paramValue = getRequestParamValue(xmlName);
-
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- syncEndpointInputParam(paramMetaData, paramValue, payload);
- }
-
- return payload;
- }
-
- public List<QName> getResponseParamNames()
- {
- List<QName> xmlNames = new ArrayList<QName>();
- xmlNames.addAll(resPayload.keySet());
- return xmlNames;
- }
-
- public void setResponseParamValue(QName xmlName, Object value)
- {
- if (log.isDebugEnabled())
- log.debug("setResponseParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
- resPayload.put(xmlName, value);
- }
-
- public Object getResponseParamValue(QName xmlName) throws SOAPException
- {
- if (log.isDebugEnabled())
- log.debug("getResponseParamValue: " + xmlName);
- Object paramValue = resPayload.get(xmlName);
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- if (paramValue != null)
- {
- Class valueType = paramValue.getClass();
- if (HolderUtils.isHolderType(valueType))
- {
- paramValue = HolderUtils.getHolderValue(paramValue);
- }
- }
- return paramValue;
- }
-
- public void setReturnValue(Object value)
- {
- ParameterMetaData retMetaData = opMetaData.getReturnParameter();
- if (value != null && retMetaData == null)
- throw new WSException("Operation does not have a return value: " + opMetaData.getQName());
-
- if (log.isDebugEnabled())
- log.debug("setReturnValue: " + getTypeName(value));
- this.returnValue = value;
- }
-
- public Object getReturnValue()
- {
- if (log.isDebugEnabled())
- log.debug("getReturnValue");
- Object paramValue = returnValue;
- ParameterMetaData paramMetaData = opMetaData.getReturnParameter();
- if (paramMetaData != null)
- {
- try
- {
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- }
- catch (SOAPException ex)
- {
- throw new WSException(ex);
- }
- }
- return paramValue;
- }
-
- private Object transformPayloadValue(ParameterMetaData paramMetaData, final Object paramValue) throws SOAPException
- {
- QName xmlName = paramMetaData.getXmlName();
- QName xmlType = paramMetaData.getXmlType();
- Class<?> javaType = paramMetaData.getJavaType();
- String javaName = paramMetaData.getJavaTypeName();
-
- if (xmlType == null)
- throw new IllegalStateException("Cannot obtain xml type for: [xmlName=" + xmlName + ",javaName=" + javaName + "]");
-
- Object retValue = paramValue;
-
- // Handle attachment part
- if (paramValue instanceof AttachmentPart)
- {
- AttachmentPart part = (AttachmentPart)paramValue;
-
- Set mimeTypes = paramMetaData.getMimeTypes();
- if (DataHandler.class.isAssignableFrom(javaType) && !javaType.equals(Object.class))
- {
- DataHandler handler = part.getDataHandler();
- String mimeType = MimeUtils.getBaseMimeType(handler.getContentType());
-
- // JAX-WS 2.0, 2.6.3.1 MIME Content
- // Conformance (MIME type mismatch): On receipt of a message where the MIME type of a part does not
- // match that described in the WSDL an implementation SHOULD throw a WebServiceException.
- if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
- log.warn("Mime type " + mimeType + " not allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
-
- retValue = part.getDataHandler();
- }
- else
- {
- retValue = part.getContent();
- String mimeType = MimeUtils.getBaseMimeType(part.getContentType());
-
- if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
- throw new SOAPException("Mime type " + mimeType + " not allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
-
- if (retValue != null)
- {
- Class valueType = retValue.getClass();
- if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
- throw new SOAPException("javaType [" + javaType.getName() + "] is not assignable from attachment content: " + valueType.getName());
- }
- }
- }
- else if (paramValue instanceof SOAPContentElement)
- {
- // If this is bound to a SOAPElement, or Element, then we can return
- // the content element as is.
- // Note, that it is possible for a Java type to be bound to an any
- // type, so checking the xml type is not sufficient.
- if (!Element.class.isAssignableFrom(javaType))
- {
- SOAPContentElement soapElement = (SOAPContentElement)paramValue;
- retValue = soapElement.getObjectValue();
- }
- }
-
- if (log.isDebugEnabled())
- log.debug("transformPayloadValue: " + getTypeName(paramValue) + " -> " + getTypeName(retValue));
- return retValue;
- }
-
- /** Synchronize the operation IN, INOUT paramters with the call input parameters.
- * Essetially it unwrapps holders and converts primitives to wrapper types.
- */
- public void initInputParams(Object[] inputParams)
- {
- for (ParameterMetaData paramMetaData : opMetaData.getParameters())
- {
- int index = paramMetaData.getIndex();
-
- // doc/lit wrapped return headers are OUT, so skip
- if (index < 0)
- continue;
-
- QName xmlName = paramMetaData.getXmlName();
- Class javaType = paramMetaData.getJavaType();
-
- Object value;
- if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA())
- {
- value = ParameterWrapping.wrapRequestParameters(paramMetaData, inputParams);
- }
- else
- {
- value = inputParams[index];
- if (value != null)
- {
- Class inputType = value.getClass();
-
- if (HolderUtils.isHolderType(inputType))
- {
- // At runtime we lose the generic info for JAX-WS types,
- // So we use the actual instance type
- value = HolderUtils.getHolderValue(value);
- inputType = (value == null) ? null : value.getClass();
- }
-
- // Verify that the java type matches a registered xmlType
- // Attachments are skipped because they don't use type mapping
- if (value != null && !paramMetaData.isSwA() && !paramMetaData.isXOP())
- {
- if (JavaUtils.isAssignableFrom(javaType, inputType) == false)
- throw new WSException("Parameter '" + javaType + "' not assignable from: " + inputType);
- }
- }
- }
-
- setRequestParamValue(xmlName, value);
- }
- }
-
- /**
- * Synchronize the operation paramters with the endpoint method parameters
- */
- private void syncEndpointInputParam(ParameterMetaData paramMetaData, final Object paramValue, Object[] payload)
- {
- Object retValue = paramValue;
- Method method = opMetaData.getJavaMethod();
- Class[] targetParameterTypes = method.getParameterTypes();
-
- if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA() && !paramMetaData.isMessageType())
- {
- outParameters = ParameterWrapping.unwrapRequestParameters(paramMetaData, paramValue, payload);
- syncOutWrappedParameters(targetParameterTypes, payload);
- }
- else
- {
- // Replace INOUT and OUT parameters by their respective holder values
- int index = paramMetaData.getIndex();
- Class targetParameterType = targetParameterTypes[index];
-
- if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode() == ParameterMode.OUT)
- {
- retValue = HolderUtils.createHolderInstance(paramValue, targetParameterType);
-
- QName xmlName = paramMetaData.getXmlName();
- setResponseParamValue(xmlName, retValue);
- }
-
- if (retValue != null)
- {
- Class valueType = retValue.getClass();
- if (JavaUtils.isAssignableFrom(targetParameterType, valueType) == false)
- throw new WSException("Parameter " + targetParameterType.getName() + " is not assignable from: " + getTypeName(retValue));
-
- if (valueType.isArray())
- retValue = JavaUtils.syncArray(retValue, targetParameterType);
- }
-
- if (log.isDebugEnabled())
- log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + " -> " + getTypeName(retValue) + "(" + index + ")");
- payload[index] = retValue;
- }
- }
-
- private void syncOutWrappedParameters(Class[] targetParameterTypes, Object[] payload)
- {
- ParameterMetaData returnMetaData = opMetaData.getReturnParameter();
- if (returnMetaData != null)
- {
- for (WrappedParameter param : returnMetaData.getWrappedParameters())
- {
- try
- {
- // only OUT parameters need to be initialized
- if (param.getIndex() >= 0 && !outParameters.containsKey(param.getIndex()))
- {
- Object holder = targetParameterTypes[param.getIndex()].newInstance();
- payload[param.getIndex()] = holder;
- outParameters.put(param.getIndex(), holder);
- }
- }
- catch (Exception e)
- {
- throw new WSException("Could not add output param: " + param.getName(), e);
-
- }
- }
- }
- }
-
- private String getTypeName(Object value)
- {
- String valueType = (value != null ? value.getClass().getName() : null);
- return valueType;
- }
-}
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -36,7 +36,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.HTTPMessageImpl;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
@@ -60,19 +60,19 @@
private BindingImpl delegate = new BindingImpl();
- public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
throw new NotImplementedException();
}
- public ServiceEndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException
+ public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException
{
log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
// Construct the endpoint invocation object
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext == null)
@@ -95,7 +95,7 @@
}
}
- public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv) throws BindingException
+ public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
log.debug("bindResponseMessage: " + opMetaData.getQName());
try
@@ -118,7 +118,7 @@
}
}
- public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
throw new NotImplementedException();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -34,7 +34,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
@@ -61,19 +61,19 @@
private BindingImpl delegate = new BindingImpl();
/** On the client side, generate the payload from IN parameters. */
- public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException
+ public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException
{
throw new NotImplementedException();
}
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
- public ServiceEndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException
+ public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException
{
log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
// Construct the endpoint invocation object
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
if (msgContext == null)
@@ -93,7 +93,7 @@
}
/** On the server side, generate the payload from OUT parameters. */
- public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv) throws BindingException
+ public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
log.debug("bindResponseMessage: " + opMetaData.getQName());
try
@@ -116,7 +116,7 @@
}
/** On the client side, extract the OUT parameters from the payload and return them to the client. */
- public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
throw new NotImplementedException();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -37,7 +37,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
@@ -69,20 +69,20 @@
private BindingImpl delegate = new BindingImpl();
/** On the client side, generate the payload from IN parameters. */
- public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
throw new NotImplementedException();
}
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
- public ServiceEndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction payload) throws BindingException
+ public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction payload) throws BindingException
{
log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
// Construct the endpoint invocation object
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext == null)
@@ -111,7 +111,7 @@
}
/** On the server side, generate the payload from OUT parameters. */
- public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, ServiceEndpointInvocation epInv) throws BindingException
+ public MessageAbstraction bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
log.debug("bindResponseMessage: " + opMetaData.getQName());
@@ -146,7 +146,7 @@
}
/** On the client side, extract the OUT parameters from the payload and return them to the client. */
- public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, ServiceEndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction resMessage, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
throw new NotImplementedException();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -50,7 +50,7 @@
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.DirectionHolder;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.DirectionHolder.Direction;
import org.jboss.ws.core.jaxrpc.ServletEndpointContextImpl;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
@@ -69,7 +69,7 @@
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.BasicEndpointInvocation;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.WebServiceContextJSE;
@@ -151,7 +151,7 @@
try
{
boolean oneway = false;
- ServiceEndpointInvocation sepInv = null;
+ EndpointInvocation sepInv = null;
OperationMetaData opMetaData = null;
CommonBinding binding = bindingProvider.getCommonBinding();
binding.setHeaderSource(delegate);
@@ -202,7 +202,7 @@
}
// Invoke an instance of the SEI implementation bean
- EndpointInvocation inv = setupInvocation(endpoint, sepInv, invContext);
+ Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
invHandler.invoke(endpoint, null, inv);
}
@@ -277,7 +277,7 @@
}
}
- protected EndpointInvocation setupInvocation(Endpoint ep, ServiceEndpointInvocation sepInv, InvocationContext invContext) throws Exception
+ protected Invocation setupInvocation(Endpoint ep, EndpointInvocation sepInv, InvocationContext invContext) throws Exception
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext instanceof SOAPMessageContextJAXWS)
@@ -295,14 +295,14 @@
invContext.addAttachment(ServletEndpointContext.class, servletEndpointContext);
}
- EndpointInvocation inv = new DelegatingInvocation(sepInv);
+ Invocation inv = new DelegatingInvocation(sepInv);
inv.setInvocationContext(invContext);
inv.setJavaMethod(getImplMethod(endpoint, sepInv));
return inv;
}
- protected Method getImplMethod(Endpoint endpoint, ServiceEndpointInvocation sepInv) throws ClassNotFoundException, NoSuchMethodException
+ protected Method getImplMethod(Endpoint endpoint, EndpointInvocation sepInv) throws ClassNotFoundException, NoSuchMethodException
{
Class implClass = endpoint.getTargetBeanClass();
Method seiMethod = sepInv.getJavaMethod();
@@ -426,9 +426,9 @@
class DelegatingInvocation extends BasicEndpointInvocation
{
- private ServiceEndpointInvocation sepInv;
+ private EndpointInvocation sepInv;
- public DelegatingInvocation(ServiceEndpointInvocation sepInv)
+ public DelegatingInvocation(EndpointInvocation sepInv)
{
this.sepInv = sepInv;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -23,10 +23,10 @@
// $Id$
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.HandlerCallback;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -40,9 +40,9 @@
public class ServiceEndpointInvokerEJB21 extends ServiceEndpointInvoker
{
@Override
- protected EndpointInvocation setupInvocation(Endpoint ep, ServiceEndpointInvocation epInv, InvocationContext invContext) throws Exception
+ protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception
{
- EndpointInvocation inv = super.setupInvocation(ep, epInv, invContext);
+ Invocation inv = super.setupInvocation(ep, epInv, invContext);
// Attach the handler callback
ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
Modified: trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -27,7 +27,7 @@
import javax.xml.rpc.server.ServletEndpointContext;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandlerJSE;
@@ -39,7 +39,7 @@
*/
public class ServiceLifecycleInvocationHandler extends InvocationHandlerJSE
{
- public void invoke(Endpoint ep, Object beanInstance, EndpointInvocation epInv) throws Exception
+ public void invoke(Endpoint ep, Object beanInstance, Invocation epInv) throws Exception
{
try
{
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -40,7 +40,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.client.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -176,7 +176,7 @@
CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(new Object[]{"Hello World!"});
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);
@@ -202,7 +202,7 @@
paramMetaData.setInHeader(true);
paramMetaData.setIndex(1);
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(new Object[]{"Hello World!", "IN header message"});
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);
@@ -229,7 +229,7 @@
Map headers = new HashMap();
headers.put(xmlName, header);
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(new Object[]{"Hello World!"});
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, headers);
@@ -256,7 +256,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(reqMessage);
- ServiceEndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+ EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
Object[] args = epInv.getRequestPayload();
@@ -285,7 +285,7 @@
CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
- ServiceEndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+ EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
Object[] args = epInv.getRequestPayload();
@@ -308,7 +308,7 @@
CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
- ServiceEndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+ EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
Object[] args = epInv.getRequestPayload();
@@ -323,7 +323,7 @@
CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
epInv.setReturnValue("Hello World!");
SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
@@ -350,7 +350,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(resMessage);
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
binding.unbindResponseMessage(opMetaData, resMessage, epInv, null);
assertEquals("Hello World!", epInv.getReturnValue());
}
@@ -378,7 +378,7 @@
paramMetaData.setIndex(1);
opMetaData.addParameter(paramMetaData);
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
binding.unbindResponseMessage(opMetaData, resMessage, epInv, null);
assertEquals("Hello World!", epInv.getReturnValue());
@@ -407,7 +407,7 @@
Map headers = new HashMap();
headers.put(xmlName, header);
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
binding.unbindResponseMessage(opMetaData, resMessage, epInv, headers);
assertEquals("Hello World!", epInv.getReturnValue());
@@ -431,7 +431,7 @@
try
{
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
binding.unbindResponseMessage(opMetaData, resMessage, epInv, null);
fail("SOAPFaultException expected");
}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2007-05-22 13:25:27 UTC (rev 3184)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2007-05-22 13:40:41 UTC (rev 3185)
@@ -44,7 +44,7 @@
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.ServiceEndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.client.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -150,7 +150,7 @@
CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP11HTTP_BINDING, Type.JAXRPC);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
- ServiceEndpointInvocation epInv = new ServiceEndpointInvocation(opMetaData);
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(new Object[]{"Hello World!", "hi"});
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);
18 years, 11 months
JBossWS SVN: r3184 - in trunk: integration/jbws/src/test/resources and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 09:25:27 -0400 (Tue, 22 May 2007)
New Revision: 3184
Removed:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointNoInjectEJB.java
Modified:
trunk/integration/jbws/ant-import/build-testsuite.xml
trunk/integration/jbws/src/test/resources/excludes-jboss42.txt
trunk/testsuite/ant-import/build-jars-jaxws.xml
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java
Log:
Fix native jboss42
Modified: trunk/integration/jbws/ant-import/build-testsuite.xml
===================================================================
--- trunk/integration/jbws/ant-import/build-testsuite.xml 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/integration/jbws/ant-import/build-testsuite.xml 2007-05-22 13:25:27 UTC (rev 3184)
@@ -69,9 +69,12 @@
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
<pathelement location="${jboss.client}/jboss-common-client.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3x.jar"/>
+ <pathelement location="${jboss.client}/jboss-j2ee.jar"/>
+ <pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.client}/jbosssx-client.jar"/>
</path>
<path id="tests.client.classpath">
+ <pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
<pathelement location="${jboss.client}/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
@@ -79,6 +82,9 @@
<pathelement location="${jboss.client}/wsdl4j.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <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>
Modified: trunk/integration/jbws/src/test/resources/excludes-jboss42.txt
===================================================================
--- trunk/integration/jbws/src/test/resources/excludes-jboss42.txt 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/integration/jbws/src/test/resources/excludes-jboss42.txt 2007-05-22 13:25:27 UTC (rev 3184)
@@ -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/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-22 13:25:27 UTC (rev 3184)
@@ -42,11 +42,6 @@
<include name="org/jboss/test/ws/jaxws/samples/context/EndpointEJB.class"/>
</fileset>
</jar>
- <jar jarfile="${tests.output.dir}/libs/jaxws-samples-context-jboss4x.jar">
- <fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/samples/context/EndpointNoInjectEJB.class"/>
- </fileset>
- </jar>
<!-- 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">
Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointNoInjectEJB.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointNoInjectEJB.java 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointNoInjectEJB.java 2007-05-22 13:25:27 UTC (rev 3184)
@@ -1,85 +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.context;
-
-// $Id$
-
-import javax.annotation.Resource;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.EJBContext;
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
-
-@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/context")
-@SOAPBinding(style = Style.RPC)
-@Stateless
-
-@WebContext(contextRoot = "/jaxws-samples-context", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
-@SecurityDomain("JBossWS")
-@RolesAllowed("friend")
-public class EndpointNoInjectEJB
-{
- // @Resource
- WebServiceContext wsCtx;
-
- @Resource
- EJBContext ejbCtx;
-
- @WebMethod
- public String testGetMessageContext()
- {
- // @Resource WebServiceContext for jbossas-4.x
- // http://jira.jboss.org/jira/browse/JBWS-1468
- if (wsCtx == null)
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- wsCtx = new WebServiceContextEJB((SOAPMessageContextJAXWS)msgContext, ejbCtx);
- }
-
- SOAPMessageContext jaxwsContext = (SOAPMessageContext)wsCtx.getMessageContext();
- return jaxwsContext != null ? "pass" : "fail";
- }
-
- @WebMethod
- public String testGetUserPrincipal()
- {
- return wsCtx.getUserPrincipal().getName();
- }
-
- @WebMethod
- public boolean testIsUserInRole(String role)
- {
- return wsCtx.isUserInRole(role);
- }
-}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2007-05-22 13:25:27 UTC (rev 3184)
@@ -33,7 +33,6 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestHelper;
import org.jboss.test.ws.JBossWSTestSetup;
/**
@@ -45,11 +44,10 @@
public class WebServiceContextEJBTestCase extends JBossWSTest
{
private static TestEndpoint port;
-
+
public static Test suite()
{
- String endpointJar = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-samples-context.jar" : "jaxws-samples-context-jboss4x.jar");
- return JBossWSTestSetup.newTestSetup(WebServiceContextEJBTestCase.class, endpointJar);
+ return JBossWSTestSetup.newTestSetup(WebServiceContextEJBTestCase.class, "jaxws-samples-context.jar");
}
public void setUp() throws Exception
@@ -59,12 +57,12 @@
URL wsdlURL = new File("resources/jaxws/samples/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
Service service = Service.create(wsdlURL, qname);
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- }
+ }
}
public void testGetWebContext() throws Exception
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java 2007-05-22 13:25:27 UTC (rev 3184)
@@ -27,7 +27,6 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.wsf.spi.annotation.WebContext;
/**
@@ -40,7 +39,6 @@
@WebContext(contextRoot="/jaxws-samples-webservice01-ejb3", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Remote(EJB3RemoteInterface.class)
-@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless
public class EJB3Bean01 implements EJB3RemoteInterface
{
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java 2007-05-22 13:25:27 UTC (rev 3184)
@@ -29,7 +29,6 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.wsf.spi.annotation.WebContext;
/**
@@ -44,7 +43,6 @@
@WebContext(contextRoot="/jaxws-samples-webservice02-ejb3", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Remote(EJB3RemoteInterface.class)
-@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless
public class EJB3Bean02 implements EJB3RemoteInterface
{
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java 2007-05-22 13:06:13 UTC (rev 3183)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java 2007-05-22 13:25:27 UTC (rev 3184)
@@ -25,7 +25,6 @@
import javax.ejb.Stateless;
import javax.jws.WebService;
-import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.wsf.spi.annotation.WebContext;
/**
@@ -37,7 +36,6 @@
@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.webservice.EndpointInterface03", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
@WebContext(contextRoot="/jaxws-samples-webservice03-ejb3", urlPattern="/*")
@Remote(EJB3RemoteInterface.class)
-@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless
public class EJB3Bean03 implements EJB3RemoteInterface
{
18 years, 11 months
JBossWS SVN: r3183 - in trunk: integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42 and 37 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)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(a)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(a)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(a)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(a)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(a)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(a)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(a)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(a)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(a)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(a)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(a)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
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.OrderMgmt", name="OrderMgmt", serviceName = "OrderMgmtService")
-@WebContext(contextRoot="/jaxws-samples-retail")
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.OrderMgmt", name = "OrderMgmt", serviceName = "OrderMgmtService")
+@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(a)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
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name="CCVerification")
-@WebContext(contextRoot="/jaxws-samples-retail")
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name = "CCVerification")
+@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
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name="ProfileMgmt", serviceName = "ProfileMgmtService")
-@WebContext(contextRoot="/jaxws-samples-retail")
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name = "ProfileMgmt", serviceName = "ProfileMgmtService")
+@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(a)jboss.org
- * @author <a href="mailto:jason.greene@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(a)jboss.org
+ * @author <a href="mailto:jason.greene@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(a)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(a)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(a)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(a)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(a)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(a)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@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(a)jboss.org
- * @author <a href="jason.greene(a)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(a)jboss.org
- * @author <a href="jason.greene(a)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@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(a)jboss.org
+ * @author <a href="jason.greene(a)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(a)jboss.org
+ * @author <a href="jason.greene(a)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>
18 years, 11 months
JBossWS SVN: r3182 - trunk/build/hudson/hudson-home.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 04:56:41 -0400 (Tue, 22 May 2007)
New Revision: 3182
Modified:
trunk/build/hudson/hudson-home/config.xml
Log:
Hudson setup
Modified: trunk/build/hudson/hudson-home/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/config.xml 2007-05-22 08:50:29 UTC (rev 3181)
+++ trunk/build/hudson/hudson-home/config.xml 2007-05-22 08:56:41 UTC (rev 3182)
@@ -25,15 +25,15 @@
<quietPeriod>5</quietPeriod>
<views>
- <!-- JBossAS Testsuite -->
+ <!-- AS Tests -->
<view>
<owner reference="../../.."/>
<jobNames class="tree-set">
<no-comparator/>
- <string>JBAS-Tests-AS-4.2</string>
- <string>JBAS-Tests-AS-5.0</string>
+ <string>AS-Tests-AS-4.2</string>
+ <string>AS-Tests-AS-5.0</string>
</jobNames>
- <name>JBossAS Testsuite</name>
+ <name>AS Tests</name>
<description>
<![CDATA[
Run the JBossAS webservice testsuite.
@@ -43,76 +43,44 @@
</description>
</view>
- <!-- Native Integration -->
+ <!-- Core Tests -->
<view>
<owner reference="../../.."/>
<jobNames class="tree-set">
<no-comparator/>
- <string>JBWS-Native-Integration-AS-5.0</string>
- <string>JBWS-Native-Integration-AS-4.2</string>
+ <string>Core-Tests-AS-4.2</string>
+ <string>Core-Tests-AS-5.0</string>
</jobNames>
- <name>Native Integration</name>
+ <name>Core Tests</name>
<description>
<![CDATA[
- Run the integration testsuite against JBossWS/Native.
+ Run the JBossWS testsuite.
<p/>
Make sure you have sucessfuly build the <a href="/hudson/view/Target%20Container">Target Container</a>
]]>
</description>
</view>
- <!-- SunRI Integration -->
+ <!-- Integration Tests-->
<view>
<owner reference="../../.."/>
<jobNames class="tree-set">
<no-comparator/>
- <string>JBWS-SunRI-Integration-AS-5.0</string>
+ <string>Integration-Native-AS-5.0</string>
+ <string>Integration-Native-AS-4.2</string>
+ <string>Integration-SunRI-AS-5.0</string>
+ <string>Integration-XFire-AS-5.0</string>
</jobNames>
- <name>SunRI Integration</name>
+ <name>Integration Tests</name>
<description>
<![CDATA[
- Run the integration testsuite against JBossWS/SunRI.
+ Run the integration testsuite.
<p/>
Make sure you have sucessfuly build the <a href="/hudson/view/Target%20Container">Target Container</a>
]]>
</description>
</view>
- <!-- XFire Integration -->
- <view>
- <owner reference="../../.."/>
- <jobNames class="tree-set">
- <no-comparator/>
- <string>JBWS-XFire-Integration-AS-5.0</string>
- </jobNames>
- <name>XFire Integration</name>
- <description>
-<![CDATA[
- Run the integration testsuite against JBossWS/XFire.
- <p/>
- Make sure you have sucessfuly build the <a href="/hudson/view/Target%20Container">Target Container</a>
-]]>
- </description>
- </view>
-
- <!-- Core Testsuite -->
- <view>
- <owner reference="../../.."/>
- <jobNames class="tree-set">
- <no-comparator/>
- <string>JBWS-Core-Tests-AS-4.2</string>
- <string>JBWS-Core-Tests-AS-5.0</string>
- </jobNames>
- <name>Core Testsuite</name>
- <description>
-<![CDATA[
- Run the JBossWS testsuite.
- <p/>
- Make sure you have sucessfuly build the <a href="/hudson/view/Target%20Container">Target Container</a>
-]]>
- </description>
- </view>
-
<!-- Release QA -->
<view>
<owner reference="../../.."/>
18 years, 11 months
JBossWS SVN: r3181 - trunk/build/hudson/hudson-home/jobs/Release-Matrix-Step2.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 04:50:29 -0400 (Tue, 22 May 2007)
New Revision: 3181
Modified:
trunk/build/hudson/hudson-home/jobs/Release-Matrix-Step2/config.xml
Log:
Hudson setup
Modified: trunk/build/hudson/hudson-home/jobs/Release-Matrix-Step2/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/Release-Matrix-Step2/config.xml 2007-05-22 08:47:56 UTC (rev 3180)
+++ trunk/build/hudson/hudson-home/jobs/Release-Matrix-Step2/config.xml 2007-05-22 08:50:29 UTC (rev 3181)
@@ -3,7 +3,7 @@
<builders class="vector"/>
<publishers class="vector">
<hudson.tasks.BuildTrigger>
- <childProjects>JBAS-Tests-AS-5.0, JBAS-Tests-AS-4.2, JBWS-CoreTests-AS-5.0, JBWS-CoreTests-AS-4.2, JBWS-Native-Integration-AS-5.0, JBWS-Native-Integration-AS-4.2, JBWS-SunRI-Integration-AS-5.0, JBWS-XFire-Integration-AS-5.0 </childProjects>
+ <childProjects>AS-Tests-AS-5.0, AS-Tests-AS-4.2, Core-Tests-AS-5.0, Core-Tests-AS-4.2, Integration-Native-AS-5.0, Integration-Native-AS-4.2, Integration-SunRI-AS-5.0, Integration-XFire-AS-5.0</childProjects>
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers class="vector"/>
18 years, 11 months
JBossWS SVN: r3180 - trunk/build/hudson/hudson-home/jobs.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 04:47:56 -0400 (Tue, 22 May 2007)
New Revision: 3180
Added:
trunk/build/hudson/hudson-home/jobs/AS-Tests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/AS-Tests-AS-5.0/
trunk/build/hudson/hudson-home/jobs/Core-Tests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/Core-Tests-AS-5.0/
trunk/build/hudson/hudson-home/jobs/Integration-Native-AS-4.2/
trunk/build/hudson/hudson-home/jobs/Integration-Native-AS-5.0/
trunk/build/hudson/hudson-home/jobs/Integration-SunRI-AS-5.0/
trunk/build/hudson/hudson-home/jobs/Integration-XFire-AS-5.0/
Removed:
trunk/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0/
trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-5.0/
trunk/build/hudson/hudson-home/jobs/JBWS-Native-Integration-AS-4.2/
trunk/build/hudson/hudson-home/jobs/JBWS-Native-Integration-AS-5.0/
trunk/build/hudson/hudson-home/jobs/JBWS-SunRI-Integration-AS-5.0/
trunk/build/hudson/hudson-home/jobs/JBWS-XFire-Integration-AS-5.0/
Log:
Hudson setup
Copied: trunk/build/hudson/hudson-home/jobs/AS-Tests-AS-4.2 (from rev 3176, trunk/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2)
Copied: trunk/build/hudson/hudson-home/jobs/AS-Tests-AS-5.0 (from rev 3176, trunk/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0)
Copied: trunk/build/hudson/hudson-home/jobs/Core-Tests-AS-4.2 (from rev 3179, trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-4.2)
Copied: trunk/build/hudson/hudson-home/jobs/Core-Tests-AS-5.0 (from rev 3179, trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-5.0)
Copied: trunk/build/hudson/hudson-home/jobs/Integration-Native-AS-4.2 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-Native-Integration-AS-4.2)
Copied: trunk/build/hudson/hudson-home/jobs/Integration-Native-AS-5.0 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-Native-Integration-AS-5.0)
Copied: trunk/build/hudson/hudson-home/jobs/Integration-SunRI-AS-5.0 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-SunRI-Integration-AS-5.0)
Copied: trunk/build/hudson/hudson-home/jobs/Integration-XFire-AS-5.0 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-XFire-Integration-AS-5.0)
18 years, 11 months
JBossWS SVN: r3179 - trunk/build/hudson/hudson-home/jobs.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 04:34:58 -0400 (Tue, 22 May 2007)
New Revision: 3179
Added:
trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-5.0/
Removed:
trunk/build/hudson/hudson-home/jobs/JBWS-CoreTests-AS-4.2/
trunk/build/hudson/hudson-home/jobs/JBWS-CoreTests-AS-5.0/
Log:
Hudson setup
Copied: trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-4.2 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-CoreTests-AS-4.2)
Copied: trunk/build/hudson/hudson-home/jobs/JBWS-Core-Tests-AS-5.0 (from rev 3177, trunk/build/hudson/hudson-home/jobs/JBWS-CoreTests-AS-5.0)
18 years, 11 months
JBossWS SVN: r3178 - in branches/JBWS-856: jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: palin
Date: 2007-05-22 04:34:52 -0400 (Tue, 22 May 2007)
New Revision: 3178
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl
Removed:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
branches/JBWS-856/jbossws-tests/build.xml
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
Log:
Removed annotation @PolicyWsdlFragment; changed wssecuritypolicy sample to deal with policies in a user provided wsdl
Deleted: branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
===================================================================
--- branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java 2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,47 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Defines a policy attachment.
- *
- * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
- * @since 25-Apr-2007
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE, ElementType.METHOD})
-public @interface PolicyWsdlFragment {
-
- /**
- * The location of a pre-defined policy expression.
- * The policyLocation is a URL (relative or absolute) that refers to a file containing
- * WSLD fragment in which one or more policy expression(s) are provided and attached.
- *
- */
- String wsdlFragmentLocation();
-
-}
Modified: branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-22 08:34:52 UTC (rev 3178)
@@ -23,7 +23,10 @@
// $Id$
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.Writer;
import java.net.URL;
import javax.jws.HandlerChain;
@@ -34,26 +37,30 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.PolicyWsdlFragment;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
import org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder;
import org.jboss.ws.metadata.builder.MetaDataBuilder;
-import org.jboss.ws.metadata.umdm.*;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.ws.metadata.webservices.WebservicesMetaData;
-import org.jboss.ws.metadata.webservices.WebservicesFactory;
-import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
@@ -141,7 +148,7 @@
// The server must always generate WSDL
if (generateWsdl || !toolMode)
- processOrGenerateWSDL(seiClass, serviceMetaData, result.wsdlLocation, sepMetaData, result.policyLocation);
+ processOrGenerateWSDL(seiClass, serviceMetaData, result.wsdlLocation, sepMetaData);
// No need to process endpoint items if we are in tool mode
if (toolMode)
@@ -339,29 +346,10 @@
result.serviceMetaData.addEndpoint(result.sepMetaData);
wsMetaData.addService(result.serviceMetaData);
- //Check for policy attachment file
- PolicyWsdlFragment anPolicy = sepClass.getAnnotation(PolicyWsdlFragment.class);
- if (anPolicy!=null)
- {
- String policyLocation = anPolicy.wsdlFragmentLocation();
- if (policyLocation==null || policyLocation.length()==0)
- throw new WSException("Missing wsdlFragmentLocation for @Policy on " + sepClass.getName());
-
- if (toolMode)
- {
- result.policyLocation = Thread.currentThread().getContextClassLoader().getResource(policyLocation);
- }
- else
- {
- result.policyLocation = udi.getMetaDataFileURL(policyLocation);
- }
- log.debug("Policy Location: " + result.policyLocation);
- }
-
return result;
}
- private void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, URL wsdlLocation, EndpointMetaData epMetaData, URL policyLocation)
+ private void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, URL wsdlLocation, EndpointMetaData epMetaData)
{
PolicyMetaDataBuilder policyBuilder = PolicyMetaDataBuilder.getServerSidePolicyMetaDataBuilder(toolMode);
try
@@ -374,12 +362,6 @@
//need to look for policies and eventually choose the supported policy alternatives
WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation);
policyBuilder.processPolicyExtensions(epMetaData, wsdlDefinitions);
- if (policyLocation != null)
- {
- //process wsdl fragment with additional policies
- WSDLDefinitions policyDefinitions = factory.parse(policyLocation);
- policyBuilder.processPolicyExtensions(epMetaData, policyDefinitions);
- }
//now we have the UMDM containing policy data; anyway we can't write a new wsdl file with
//the supported alternatives and so on, since we need to publish the file the user provided
serviceMetaData.setWsdlLocation(wsdlLocation);
@@ -387,20 +369,7 @@
else
{
WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
- //we write the generated wsdl right now only if we have no additional policies
- //otherwise we first parse them since they may change the actual wsdl to be written
- if (policyLocation == null)
- {
- writeWsdl(serviceMetaData,wsdlDefinitions,epMetaData);
- }
- else
- {
- WSDLDefinitions policyDefinitions = factory.parse(policyLocation);
- policyBuilder.processPolicyExtensions(epMetaData, policyDefinitions);
- //generate the wsdl4j model again for the actual UMDM containing policy data
- WSDLDefinitions actualWsdlDefinitions = generator.generate(serviceMetaData);
- writeWsdl(serviceMetaData,actualWsdlDefinitions,epMetaData);
- }
+ writeWsdl(serviceMetaData,wsdlDefinitions,epMetaData);
}
}
catch (RuntimeException rte)
Modified: branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-22 08:34:52 UTC (rev 3178)
@@ -468,9 +468,9 @@
<include name="wsse.keystore"/>
<include name="wsse.truststore"/>
</webinf>
- <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF">
- <include name="PolicyAttachmentFragment.wsdl"/>
- </webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF">
+ <include name="wsdl/**"/>
+ </webinf>
</war>
<!-- jaxws-samples-wssecurityAnnotatedpolicy-encrypt -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml">
Modified: branches/JBWS-856/jbossws-tests/build.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/build.xml 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/build.xml 2007-05-22 08:34:52 UTC (rev 3178)
@@ -261,7 +261,7 @@
<wsconsume wsdl="${tests.resources.dir}/jaxws/complex/META-INF/wsdl/RegistrationService.wsdl" package="org.jboss.test.ws.jaxws.complex" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl" package="org.jboss.test.ws.jaxws.holder" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecurity" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
- <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
+ <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
</target>
@@ -359,7 +359,6 @@
</taskdef>
<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
- <wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecuritypolicy" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecuritypolicy.HelloJavaBean"/>
<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurityAnnotatedpolicy" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy.HelloJavaBean"/>
</target>
Modified: branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
===================================================================
--- branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-22 08:34:52 UTC (rev 3178)
@@ -28,10 +28,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.annotation.PolicyWsdlFragment;
-@WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/samples/wssecuritypolicy")
-@PolicyWsdlFragment(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
+@WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/samples/wssecuritypolicy", wsdlLocation="WEB-INF/wsdl/HelloService.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class HelloJavaBean
{
Modified: branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
===================================================================
--- branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java 2007-05-22 08:34:52 UTC (rev 3178)
@@ -68,7 +68,7 @@
private Hello getPort() throws Exception
{
- URL wsdlURL = new File("wsprovide/resources/jaxws/samples/wssecuritypolicy/HelloService.wsdl").toURL();
+ URL wsdlURL = new File("resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl").toURL();
QName serviceName = new QName("http://org.jboss.ws/samples/wssecuritypolicy", "HelloService");
Service service = Service.create(wsdlURL, serviceName);
Deleted: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl 2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='HelloService' targetNamespace='http://org.jboss.ws/samples/wssecurity' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecurity' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <xs:schema targetNamespace='http://org.jboss.ws/samples/wssecurity' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:complexType name='UserType'>
- <xs:sequence>
- <xs:element minOccurs='0' name='msg' type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- </types>
- <message name='Hello_echoUserType'>
- <part name='user' type='tns:UserType'/>
- </message>
- <message name='Hello_echoUserTypeResponse'>
- <part name='return' type='tns:UserType'/>
- </message>
- <portType name='Hello'>
- <operation name='echoUserType' parameterOrder='user'>
- <input message='tns:Hello_echoUserType'/>
- <output message='tns:Hello_echoUserTypeResponse'/>
- </operation>
- </portType>
- <binding name='HelloBinding' type='tns:Hello'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoUserType'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='HelloService'>
- <port binding='tns:HelloBinding' name='HelloPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Deleted: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl 2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl 2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="TestService" targetNamespace="http://org.jboss.ws/samples/wssecuritypolicy"
- xmlns:tns="http://org.jboss.ws/samples/wssecuritypolicy"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
- <wsp:Policy wsu:Id="X509EndpointPolicy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:jboss-ws-security xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
- <sp:key-store-password>jbossws</sp:key-store-password>
- <sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>
- <sp:trust-store-password>jbossws</sp:trust-store-password>
- <sp:config>
- <sp:encrypt type="x509v3" alias="wsse"/>
- <sp:requires>
- <sp:encryption/>
- </sp:requires>
- </sp:config>
- </sp:jboss-ws-security>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- <binding name='HelloBinding' type='tns:Hello'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <wsp:PolicyReference URI="#X509EndpointPolicy" wsdl:required="true" />
- </binding>
- <service name='HelloService'>
- <port binding='tns:HelloBinding' name='HelloPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
Added: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl (rev 0)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl 2007-05-22 08:34:52 UTC (rev 3178)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='HelloService' targetNamespace='http://org.jboss.ws/samples/wssecuritypolicy' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://org.jboss.ws/samples/wssecurity' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecuritypolicy' xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/09/policy' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://org.jboss.ws/samples/wssecurity' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name='UserType'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='msg' type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <wsp:Policy wsu:Id='X509EndpointPolicy' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...'>
+ <wsp:All>
+ <sp:jboss-ws-security xmlns:sp='http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+ <sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
+ <sp:key-store-password>jbossws</sp:key-store-password>
+ <sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>
+ <sp:trust-store-password>jbossws</sp:trust-store-password>
+ <sp:config>
+ <sp:encrypt alias='wsse' type='x509v3'/>
+ <sp:requires>
+ <sp:encryption/>
+ </sp:requires>
+ </sp:config>
+ </sp:jboss-ws-security>
+ </wsp:All>
+ </wsp:Policy>
+ <message name='Hello_echoUserType'>
+ <part name='user' type='ns1:UserType'/>
+ </message>
+ <message name='Hello_echoUserTypeResponse'>
+ <part name='return' type='ns1:UserType'/>
+ </message>
+ <portType name='Hello'>
+ <operation name='echoUserType' parameterOrder='user'>
+ <input message='tns:Hello_echoUserType'/>
+ <output message='tns:Hello_echoUserTypeResponse'/>
+ </operation>
+ </portType>
+ <binding name='HelloBinding' type='tns:Hello'>
+ <wsp:PolicyReference URI='#X509EndpointPolicy'/>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoUserType'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/wssecuritypolicy' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/wssecuritypolicy' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='HelloService'>
+ <port binding='tns:HelloBinding' name='HelloPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
18 years, 11 months