JBossWS SVN: r1854 - tags
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-07 06:26:13 -0500 (Sun, 07 Jan 2007)
New Revision: 1854
Removed:
tags/jbossws-1.2.CR2/
Log:
Delete jbossws-1.2.CR2
17 years, 11 months
JBossWS SVN: r1853 - tags/jbossws-1.2.0.CR2
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-07 06:24:43 -0500 (Sun, 07 Jan 2007)
New Revision: 1853
Added:
tags/jbossws-1.2.0.CR2/trunk/
Log:
Release jbossws-1.2.0.CR2
Copied: tags/jbossws-1.2.0.CR2/trunk (from rev 1851, trunk)
17 years, 11 months
JBossWS SVN: r1852 - tags
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-07 06:24:29 -0500 (Sun, 07 Jan 2007)
New Revision: 1852
Added:
tags/jbossws-1.2.CR2/
Log:
Release jbossws-1.2.0.CR2
Copied: tags/jbossws-1.2.CR2 (from rev 1851, trunk)
17 years, 11 months
JBossWS SVN: r1851 - in trunk/build: . ant-import
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-07 06:22:51 -0500 (Sun, 07 Jan 2007)
New Revision: 1851
Modified:
trunk/build/ant-import/build-thirdparty.xml
trunk/build/version.properties
Log:
Add missing jboss-security-spi
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-01-06 15:29:30 UTC (rev 1850)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-01-07 11:22:51 UTC (rev 1851)
@@ -41,15 +41,16 @@
<get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/ejb3/${jboss-ejb3}/bin/ejb3.deployer" dest="${thirdparty.dir}/ejb3.deployer.zip" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs.jar" dest="${thirdparty.dir}/jboss-vfs.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar" dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro-rt.jar" dest="${thirdparty.dir}/jbossretro-rt.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" 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/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar" dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro-rt.jar" dest="${thirdparty.dir}/jbossretro-rt.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs.jar" dest="${thirdparty.dir}/jboss-vfs.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/security-spi/${jboss-security-spi}/lib/jboss-security-spi.jar" dest="${thirdparty.dir}/jboss-security-spi.jar" 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" />
<get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-01-06 15:29:30 UTC (rev 1850)
+++ trunk/build/version.properties 2007-01-07 11:22:51 UTC (rev 1851)
@@ -35,6 +35,7 @@
jboss-common-logging-spi=2.0.2.GA
jboss-ejb3=1.0.0.CR9-jboss4.0.5
jboss-jbossretro=1.0.4.GA
+jboss-security-spi=2.0.0.Beta
jboss-vfs=2.0.0.snapshot
jbossas-core-libs=4.0.5.GA
jbpm-bpel=1.1.Beta2
17 years, 11 months
JBossWS SVN: r1850 - tags
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 10:29:30 -0500 (Sat, 06 Jan 2007)
New Revision: 1850
Added:
tags/jbossws-1.2.0.CR2/
Log:
Release jbossws-1.2.0.CR2
Copied: tags/jbossws-1.2.0.CR2 (from rev 1849, trunk)
17 years, 12 months
JBossWS SVN: r1849 - in trunk: build/ant-import integration-jboss40 jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 10:22:26 -0500 (Sat, 06 Jan 2007)
New Revision: 1849
Modified:
trunk/build/ant-import/build-release.xml
trunk/integration-jboss40/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
Log:
Fix jboss40-retro
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-01-06 14:58:51 UTC (rev 1848)
+++ trunk/build/ant-import/build-release.xml 2007-01-06 15:22:26 UTC (rev 1849)
@@ -68,7 +68,7 @@
</filterset>
</copy>
- <!-- jbossws14 -->
+ <!-- jbossws14 - ->
<property name="jbossws14.repository.dir" value="${jboss.local.repository}/jboss/jbossws14/${repository.id}"/>
<mkdir dir="${jbossws14.repository.dir}/lib"/>
<copy todir="${jbossws14.repository.dir}/lib" overwrite="true">
@@ -82,11 +82,12 @@
<include name="jboss-jaxws14.jar"/>
</fileset>
</copy>
- <copy tofile="${jbossws.repository.dir}/component-info.xml" file="${etc.dir}/jbossws-component-info.xml" filtering="true" overwrite="true">
+ <copy tofile="${jbossws14.repository.dir}/component-info.xml" file="${etc.dir}/jbossws-component-info.xml" filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
+ -->
</target>
Modified: trunk/integration-jboss40/build.xml
===================================================================
--- trunk/integration-jboss40/build.xml 2007-01-06 14:58:51 UTC (rev 1848)
+++ trunk/integration-jboss40/build.xml 2007-01-06 15:22:26 UTC (rev 1849)
@@ -87,10 +87,11 @@
<classpath>
<pathelement location="${core.dir}/output/lib/jboss-jaxrpc.jar"/>
<pathelement location="${core.dir}/output/lib/jboss-saaj.jar"/>
+ <pathelement location="${thirdparty.dir}/ant.jar"/>
<pathelement location="${thirdparty.dir}/javassist.jar"/>
<pathelement location="${thirdparty.dir}/jbossretro.jar"/>
<pathelement location="${thirdparty.dir}/jboss-backport-concurrent.jar"/>
- <pathelement location="${thirdparty.dir}/ant.jar"/>
+ <pathelement location="${thirdparty.dir}/xercesImpl.jar"/>
<pathelement path="${jboss42.output.classes.dir}"/>
<pathelement path="${core.dir}/output/classes"/>
</classpath>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 14:58:51 UTC (rev 1848)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 15:22:26 UTC (rev 1849)
@@ -65,6 +65,9 @@
public void testVirtualFile() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
17 years, 12 months
JBossWS SVN: r1848 - in trunk: build/ant-import integration-jboss42 integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42 integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 jbossws-core jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc jbossws-core/src/main/java/org/jboss/ws/core/server jbossws-core/src/main/java/org/jboss/ws/core/utils jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmappi
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 09:58:51 -0500 (Sat, 06 Jan 2007)
New Revision: 1848
Modified:
trunk/build/ant-import/build-thirdparty.xml
trunk/integration-jboss42/.classpath
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/jbossws-core/.classpath
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
Log:
Abstract jboss-vfs to integration layer
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-01-06 14:58:51 UTC (rev 1848)
@@ -100,7 +100,6 @@
<pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
<pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
<pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-vfs.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
<pathelement location="${thirdparty.dir}/wstx-lgpl-2.0.6.jar"/>
@@ -111,6 +110,7 @@
<path refid="core.classpath"/>
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3.jar"/>
<pathelement location="${thirdparty.dir}/jboss-deployers.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-vfs.jar"/>
<pathelement location="${jboss50.lib}/jboss-j2se.jar"/>
<pathelement location="${jboss50.server.lib}/jboss.jar"/>
<pathelement location="${jboss50.server.deployers}/jboss-aop-jboss5.deployer/jboss-aop-jdk50.jar"/>
Modified: trunk/integration-jboss42/.classpath
===================================================================
--- trunk/integration-jboss42/.classpath 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/integration-jboss42/.classpath 2007-01-06 14:58:51 UTC (rev 1848)
@@ -33,6 +33,5 @@
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xercesImpl.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/ejb3.deployer/jboss-ejb3.jar"/>
- <classpathentry kind="lib" path="/build/thirdparty/jboss-vfs.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -30,7 +30,6 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
-import org.jboss.virtual.VFS;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
@@ -52,7 +51,7 @@
udi.name = di.getCanonicalName();
udi.simpleName = di.shortName;
udi.url = getDeploymentURL(di);
- udi.vfRoot = VFS.getRoot(udi.url);
+ udi.vfRoot = null;
udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -35,7 +35,6 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.naming.Util;
import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.integration.jboss50;
+import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -29,7 +30,9 @@
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
import org.jboss.metadata.WebMetaData;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo.UnifiedVirtualFile;
// $Id$
@@ -54,10 +57,11 @@
udi.parent = new UnifiedDeploymentInfo(null);
buildDeploymentInfo(udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
}
+
+ udi.vfRoot = new VirtualFileAdaptor(unit.getDeploymentContext().getRoot());
udi.name = unit.getName();
udi.simpleName = unit.getSimpleName();
- udi.vfRoot = unit.getDeploymentContext().getRoot();
udi.url = udi.vfRoot.toURL();
buildMetaData(udi, unit);
@@ -77,7 +81,6 @@
private static void buildMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
- Object metaData = null;
if (unit.getAttachment(Ejb3Deployment.class) != null)
{
udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit);
@@ -87,8 +90,36 @@
if (unit.getAllMetaData(WebMetaData.class).size() > 0)
{
udi.metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(unit);
- udi.webappURL = unit.getDeploymentContext().getRoot().toURL();
+ udi.webappURL = udi.vfRoot.toURL();
}
}
}
+
+ public static class VirtualFileAdaptor implements UnifiedVirtualFile
+ {
+ private VirtualFile root;
+
+ public VirtualFileAdaptor(VirtualFile root)
+ {
+ this.root = root;
+ }
+
+ public UnifiedVirtualFile findChild(String child) throws IOException
+ {
+ VirtualFile vf = root.findChild(child);
+ return new VirtualFileAdaptor(vf);
+ }
+
+ public URL toURL()
+ {
+ try
+ {
+ return root.toURL();
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+ }
}
Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/.classpath 2007-01-06 14:58:51 UTC (rev 1848)
@@ -30,6 +30,5 @@
<classpathentry kind="lib" path="/build/thirdparty/wstx-lgpl-2.0.6.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xercesImpl.jar"/>
- <classpathentry kind="lib" path="/build/thirdparty/jboss-vfs.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
+import java.net.URL;
import javax.naming.BinaryRefAddr;
import javax.naming.NamingException;
@@ -36,7 +37,6 @@
import javax.naming.StringRefAddr;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
@@ -161,7 +161,7 @@
try
{
ObjectOutputStream oos = new ObjectOutputStream(baos);
- VirtualFile vfConfig = getSecurityConfig();
+ URL vfConfig = getSecurityConfig();
WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(vfConfig);
oos.writeObject(securityConfig);
oos.close();
@@ -173,13 +173,13 @@
return baos.toByteArray();
}
- private VirtualFile getSecurityConfig()
+ private URL getSecurityConfig()
{
String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ? "WEB-INF" : "META-INF";
descriptorPath = descriptorPath + "/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
try
{
- VirtualFile vfConfig = udi.getMetaDataFile(descriptorPath);
+ URL vfConfig = udi.getMetaDataFileURL(descriptorPath);
InputStream inputStream = vfConfig.openStream();
inputStream.close();
return vfConfig;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -25,15 +25,12 @@
import java.io.IOException;
import java.net.MalformedURLException;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import javax.management.ObjectName;
-import org.jboss.virtual.VirtualFile;
-
/**
* The container independent deployment info.
*
@@ -61,7 +58,7 @@
/** The URL for this deployment */
public URL url;
/** The virtual file for the deployment root */
- public VirtualFile vfRoot;
+ public UnifiedVirtualFile vfRoot;
/** The string identifing this deployment **/
public String name;
/** The URL to the expanded webapp **/
@@ -102,26 +99,16 @@
// ignore
}
- if (resourceURL == null)
+ if (resourceURL == null && vfRoot != null)
{
- try
- {
- VirtualFile vfResource = vfRoot.findChild(resourcePath);
- resourceURL = vfResource.toURL();
- }
- catch (URISyntaxException e)
- {
- // ignore
- }
+ UnifiedVirtualFile vfResource = vfRoot.findChild(resourcePath);
+ resourceURL = vfResource.toURL();
}
if (resourceURL == null)
{
String deploymentPath = url.toExternalForm();
- if (deploymentPath.startsWith("vfsfile:") && deploymentPath.endsWith("!/") == false)
- deploymentPath += "!/";
-
if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
deploymentPath += "!/";
@@ -135,17 +122,14 @@
return resourceURL;
}
- public VirtualFile getMetaDataFile(String resourcePath) throws IOException
+ /**
+ * An adaptor a VirtualFile from jboss-vfs.jar
+ * jboss-vfs cannot be used in jboss-4.x because of its dependeny on jboss-common-core.jar
+ */
+ public interface UnifiedVirtualFile
{
- VirtualFile vfResource = null;
- if (resourcePath != null && resourcePath.length() > 0)
- {
- if (resourcePath.startsWith("/"))
- resourcePath = resourcePath.substring(1);
-
- vfResource = vfRoot.findChild(resourcePath);
- }
- return vfResource;
+ UnifiedVirtualFile findChild(String child) throws IOException;
+ URL toURL();
}
public String toString()
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -40,7 +40,6 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.utils.DOMUtils;
@@ -216,8 +215,8 @@
resourcePath = resourcePath + "/";
resourcePath = expLocation + resourcePath + schemaLocation;
- VirtualFile vfResource = udi.getMetaDataFile(resourcePath);
- InputStream is = vfResource.openStream();
+ URL resourceURL = udi.getMetaDataFileURL(resourcePath);
+ InputStream is = new ResourceURL(resourceURL).openStream();
if (is == null)
throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -40,7 +40,6 @@
import javax.activation.DataHandler;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
@@ -118,20 +117,4 @@
tmpdir.mkdirs();
return tmpdir;
}
-
- public static URL toURL(VirtualFile file)
- {
- try
- {
- return file.toURL();
- }
- catch (MalformedURLException e)
- {
- return null;
- }
- catch (URISyntaxException e)
- {
- return null;
- }
- }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -30,7 +30,6 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -30,7 +30,6 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
@@ -76,22 +75,6 @@
// setup the XML binding Unmarshaller
InputStream is = new ResourceURL(mappingURL).openStream();
- return parse(is, mappingURL);
- }
-
- public JavaWsdlMapping parse(VirtualFile vfMapping) throws IOException
- {
- if (vfMapping == null)
- throw new IllegalArgumentException("JAXRPC mapping file cannot be null");
-
- // setup the XML binding Unmarshaller
- InputStream is = vfMapping.openStream();
- URL mappingURL = IOUtils.toURL(vfMapping);
- return parse(is, mappingURL);
- }
-
- private JavaWsdlMapping parse(InputStream is, URL mappingURL) throws IOException
- {
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -27,8 +27,6 @@
import java.util.HashMap;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
@@ -86,21 +84,6 @@
throw new IllegalArgumentException("Security config URL cannot be null");
InputStream is = new ResourceURL(configURL).openStream();
- return parse(is, configURL);
- }
-
- public WSSecurityConfiguration parse(VirtualFile vfConfig) throws IOException
- {
- if (vfConfig == null)
- throw new IllegalArgumentException("Security config file cannot be null");
-
- InputStream is = vfConfig.openStream();
- URL configURL = IOUtils.toURL(vfConfig);
- return parse(is, configURL);
- }
-
- private WSSecurityConfiguration parse(InputStream is, URL configURL) throws IOException
- {
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-06 12:59:38 UTC (rev 1847)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-06 14:58:51 UTC (rev 1848)
@@ -26,9 +26,13 @@
import java.net.URL;
import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
*
@@ -37,7 +41,11 @@
*/
public class JBossWSTestHelper
{
+ // provide logging
+ private static Logger log = Logger.getLogger(JBossWSTestHelper.class);
+
private static MBeanServerConnection server;
+ private static String integrationTarget;
/** Deploy the given archive
*/
@@ -127,8 +135,42 @@
private static String getIntegrationTarget()
{
- String target = System.getProperty("jbossws.integration.target", "jboss50");
- return target;
+ if (integrationTarget == null)
+ {
+ integrationTarget = System.getProperty("jbossws.integration.target");
+
+ // Read the JBoss SpecificationVersion
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ String jbossVersion = (String)getServer().getAttribute(oname, "SpecificationVersion");
+ if (jbossVersion.startsWith("5.0"))
+ jbossVersion = "jboss50";
+ else if (jbossVersion.startsWith("4.2"))
+ jbossVersion = "jboss42";
+ else if (jbossVersion.startsWith("4.0"))
+ jbossVersion = "jboss40";
+ else
+ throw new RuntimeException("Unsupported jboss version: " + jbossVersion);
+
+ if (jbossVersion.equals(integrationTarget) == false)
+ {
+ log.warn("Integration target mismatch, using: " + jbossVersion);
+ integrationTarget = jbossVersion;
+ }
+ }
+ catch (Exception ex)
+ {
+ // ignore, we are not running on jboss-4.2 or greater
+ }
+
+ if (integrationTarget == null)
+ {
+ log.warn("Cannot obtain jbossws.integration.target, using default: tomcat");
+ integrationTarget = "tomcat";
+ }
+ }
+ return integrationTarget;
}
/** Try to discover the URL for the deployment archive */
17 years, 12 months
JBossWS SVN: r1847 - trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 07:59:38 -0500 (Sat, 06 Jan 2007)
New Revision: 1847
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
Log:
Reenable ear test case
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 12:57:21 UTC (rev 1846)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 12:59:38 UTC (rev 1847)
@@ -21,16 +21,16 @@
*/
package org.jboss.test.ws.jaxws.eardeployment;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.net.URL;
import javax.xml.namespace.QName;
+import junit.framework.Test;
+
import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestHelper;
+import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.DOMUtils;
@@ -45,15 +45,13 @@
*/
public class EarTestCase extends JBossWSTest
{
- /*
public static Test suite()
{
String earName = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-eardeployment.ear" : "jaxws-eardeployment42.ear");
return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
}
- */
- public void _testResourceURL() throws Exception
+ public void testResourceURL() throws Exception
{
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
@@ -93,20 +91,9 @@
// Test URL access
root = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(root);
-
- // Test URL serialization
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(wsdlURL);
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
- wsdlURL = (URL)ois.readObject();
-
- // Test URL access
- root = DOMUtils.parse(wsdlURL.openStream());
- assertNotNull(root);
}
- public void _testEJB3Endpoint() throws Exception
+ public void testEJB3Endpoint() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earejb3/EJB3Bean?wsdl");
QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
@@ -118,7 +105,7 @@
assertEquals(helloWorld, retObj);
}
- public void _testJSEEndpoint() throws Exception
+ public void testJSEEndpoint() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earjse/JSEBean?wsdl");
QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
17 years, 12 months
JBossWS SVN: r1846 - in trunk: build/ant-import integration-jboss42 integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42 integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 integration-jboss50/src/main/resources/jbossws.deployer/META-INF jbossws-core jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc jbossws-core/src/main/java/org/jboss/ws/core/server jbossws-core/src/main/java/org/jboss/ws/core/utils jbossws-core/src/main/java/org/jboss/ws/metadata/builder/ja
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 07:57:21 -0500 (Sat, 06 Jan 2007)
New Revision: 1846
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
Modified:
trunk/build/ant-import/build-thirdparty.xml
trunk/integration-jboss42/.classpath
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/jbossws-core/.classpath
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.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/JAXWSProviderMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
Log:
Add support for vfsfile
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-01-06 12:57:21 UTC (rev 1846)
@@ -100,6 +100,7 @@
<pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
<pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
<pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-vfs.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
<pathelement location="${thirdparty.dir}/wstx-lgpl-2.0.6.jar"/>
@@ -110,7 +111,6 @@
<path refid="core.classpath"/>
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3.jar"/>
<pathelement location="${thirdparty.dir}/jboss-deployers.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-vfs.jar"/>
<pathelement location="${jboss50.lib}/jboss-j2se.jar"/>
<pathelement location="${jboss50.server.lib}/jboss.jar"/>
<pathelement location="${jboss50.server.deployers}/jboss-aop-jboss5.deployer/jboss-aop-jdk50.jar"/>
Modified: trunk/integration-jboss42/.classpath
===================================================================
--- trunk/integration-jboss42/.classpath 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss42/.classpath 2007-01-06 12:57:21 UTC (rev 1846)
@@ -33,5 +33,6 @@
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xercesImpl.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/ejb3.deployer/jboss-ejb3.jar"/>
+ <classpathentry kind="lib" path="/build/thirdparty/jboss-vfs.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -30,6 +30,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
+import org.jboss.virtual.VFS;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
@@ -51,6 +52,7 @@
udi.name = di.getCanonicalName();
udi.simpleName = di.shortName;
udi.url = getDeploymentURL(di);
+ udi.vfRoot = VFS.getRoot(udi.url);
udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -23,6 +23,7 @@
// $Id$
+import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@@ -32,6 +33,7 @@
import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
@@ -45,13 +47,13 @@
*/
public class ServiceRefMetaDataAdaptor
{
- public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(ServiceRefMetaData srmd)
+ public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
{
UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
usrmd.setServiceRefName(srmd.getServiceRefName());
usrmd.setServiceInterface(srmd.getServiceInterface());
usrmd.setWsdlLocation(srmd.getWsdlURL());
- usrmd.setMappingLocation(srmd.getJavaWsdlMappingURL());
+ usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getJaxrpcMappingFile()));
usrmd.setServiceQName(srmd.getServiceQName());
LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
Modified: trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
===================================================================
--- trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -35,6 +35,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.naming.Util;
import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
@@ -71,7 +72,11 @@
ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
String serviceRefName = serviceRef.getServiceRefName();
- UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(serviceRef);
+ // Build the container independent deployment info
+ UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+
+ UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
@@ -79,10 +84,6 @@
Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
wsServiceRef.setWsdlDefinition(wsdlDefinition);
- // build the container independent deployment info
- UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
-
ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
Util.bind(envCtx, serviceRefName, ref);
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.integration.jboss50;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -59,7 +57,8 @@
udi.name = unit.getName();
udi.simpleName = unit.getSimpleName();
- udi.url = unit.getDeploymentContext().getRoot().toURL();
+ udi.vfRoot = unit.getDeploymentContext().getRoot();
+ udi.url = udi.vfRoot.toURL();
buildMetaData(udi, unit);
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -0,0 +1,68 @@
+/*
+ * 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.integration.jboss50;
+
+//$Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-Jan-2007
+ */
+public class JAXRPCDeployerEJB21 extends AbstractDeployerEJB
+{
+ @Override
+ protected DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_EJB21;
+ }
+
+ @Override
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit) throws DeploymentException
+ {
+ UnifiedDeploymentInfo udi = new JAXRPCDeployment(getDeploymentType(), null);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ boolean isWebServiceDeployment = false;
+
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ isWebServiceDeployment = unit.getMetaDataFile("META-INF/webservices.xml") != null;
+ }
+
+ return isWebServiceDeployment;
+ }
+}
\ No newline at end of file
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -36,6 +36,7 @@
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.naming.Util;
+import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
@@ -84,17 +85,7 @@
UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
- // Convert wsdlFile to URL
- String wsdlFile = serviceRef.getWsdlFile();
- if (wsdlFile != null)
- serviceRef.setWsdlFile(udi.getMetaDataFile(wsdlFile).toExternalForm());
-
- // Convert mappingFile to URL
- String mappingFile = serviceRef.getMappingFile();
- if (mappingFile != null)
- serviceRef.setMappingFile(udi.getMetaDataFile(mappingFile).toExternalForm());
-
- UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(serviceRef);
+ UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
@@ -122,7 +113,6 @@
{
try
{
- // setup the XML binding Unmarshaller
JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
javaWsdlMapping = mappingFactory.parse(mappingURL);
}
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -23,21 +23,17 @@
// $Id$
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import javax.xml.namespace.QName;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
@@ -51,13 +47,13 @@
*/
public class ServiceRefMetaDataAdaptor
{
- public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(ServiceRefMetaData srmd) throws Exception
+ public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws Exception
{
UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
usrmd.setServiceRefName(srmd.getServiceRefName());
usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlLocation(getWsdlLocation(srmd));
- usrmd.setMappingLocation(getMetaDataURL(srmd.getMappingFile()));
+ usrmd.setWsdlLocation(getWsdlLocation(udi, srmd));
+ usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getMappingFile()));
usrmd.setServiceQName(srmd.getServiceQName());
LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
@@ -104,17 +100,13 @@
return usrmd;
}
- private static URL getWsdlLocation(ServiceRefMetaData srmd) throws MalformedURLException
+ private static URL getWsdlLocation(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws Exception
{
URL wsdlLocation = srmd.getWsdlOverride();
- if (wsdlLocation == null)
- wsdlLocation = getMetaDataURL(srmd.getWsdlFile());
-
+ if (wsdlLocation == null && srmd.getWsdlFile() != null)
+ {
+ wsdlLocation = udi.getMetaDataFileURL(srmd.getWsdlFile());
+ }
return wsdlLocation;
}
-
- private static URL getMetaDataURL(String resourcePath) throws MalformedURLException
- {
- return (resourcePath != null ? new URL(resourcePath) : null);
- }
}
Modified: trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-06 12:57:21 UTC (rev 1846)
@@ -20,8 +20,8 @@
<property name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
<property name="serviceEndpointInvokerEJB3">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerEJB3</property>
+ <property name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerEJB21</property>
<!-- Not implemented
- <property name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerEJB21</property>
<property name="serviceEndpointInvokerMDB">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerMDB</property>
-->
</bean>
@@ -95,6 +95,21 @@
<depends>ServiceEndpointManager</depends>
</bean>
+ <bean name="JAXRPCDeployerEJB21" class="org.jboss.ws.integration.jboss50.JAXRPCDeployerEJB21">
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>JBossWebAppParsingDeployer</depends>
+ <depends>ServiceEndpointManager</depends>
+ </bean>
+
<bean name="ServiceEndpointLifecycleDeployer" class="org.jboss.ws.integration.jboss50.ServiceEndpointLifecycleDeployer">
<install bean="MainDeployer" method="addDeployer">
<parameter>
Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/.classpath 2007-01-06 12:57:21 UTC (rev 1846)
@@ -30,5 +30,6 @@
<classpathentry kind="lib" path="/build/thirdparty/wstx-lgpl-2.0.6.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xercesImpl.jar"/>
+ <classpathentry kind="lib" path="/build/thirdparty/jboss-vfs.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -35,12 +35,8 @@
import java.net.URL;
import java.net.URLEncoder;
import java.rmi.Remote;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
-import java.util.Set;
import javax.naming.Context;
import javax.naming.Name;
@@ -51,9 +47,9 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Service;
-import javax.xml.rpc.handler.HandlerInfo;
import org.jboss.logging.Logger;
+import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServiceEndpoint;
@@ -63,11 +59,7 @@
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
/**
@@ -109,7 +101,7 @@
try
{
Reference ref = (Reference)obj;
-
+
// Unmarshall the ServiceRefMetaData
UnifiedServiceRefMetaData serviceRefMetaData = null;
RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
@@ -120,9 +112,11 @@
serviceRefMetaData = (UnifiedServiceRefMetaData)ois.readObject();
ois.close();
}
- catch (IOException e)
+ catch (IOException ex)
{
- throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
+ NamingException ne = new NamingException("Cannot unmarshall service ref meta data");
+ ne.setRootCause(ex);
+ throw ne;
}
// Unmarshall the WSSecurityConfiguration
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -28,7 +28,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
-import java.net.URL;
import javax.naming.BinaryRefAddr;
import javax.naming.NamingException;
@@ -37,10 +36,10 @@
import javax.naming.StringRefAddr;
import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
@@ -102,7 +101,7 @@
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
// FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
- if (getSecurityConfigURL() != null)
+ if (getSecurityConfig() != null)
myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
// Add references to port component links
@@ -162,8 +161,8 @@
try
{
ObjectOutputStream oos = new ObjectOutputStream(baos);
- URL securityURL = getSecurityConfigURL();
- WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(securityURL);
+ VirtualFile vfConfig = getSecurityConfig();
+ WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(vfConfig);
oos.writeObject(securityConfig);
oos.close();
}
@@ -174,16 +173,16 @@
return baos.toByteArray();
}
- private URL getSecurityConfigURL()
+ private VirtualFile getSecurityConfig()
{
String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ? "WEB-INF" : "META-INF";
descriptorPath = descriptorPath + "/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
try
{
- URL securityURL = udi.getMetaDataFile(descriptorPath);
- InputStream inputStream = new ResourceURL(securityURL).openStream();
+ VirtualFile vfConfig = udi.getMetaDataFile(descriptorPath);
+ InputStream inputStream = vfConfig.openStream();
inputStream.close();
- return securityURL;
+ return vfConfig;
}
catch (IOException ex)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -25,12 +25,15 @@
import java.io.IOException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import javax.management.ObjectName;
+import org.jboss.virtual.VirtualFile;
+
/**
* The container independent deployment info.
*
@@ -57,6 +60,8 @@
public String simpleName;
/** The URL for this deployment */
public URL url;
+ /** The virtual file for the deployment root */
+ public VirtualFile vfRoot;
/** The string identifing this deployment **/
public String name;
/** The URL to the expanded webapp **/
@@ -69,7 +74,7 @@
public Map<String, Object> context = new HashMap<String, Object>();
/** An optional ObjectName of the deployed object */
public ObjectName deployedObject;
-
+
/** The sortName concatenated with the canonical names of all parents. */
public String getCanonicalName()
{
@@ -78,15 +83,15 @@
name = parent.getCanonicalName() + "/" + name;
return name;
}
-
- public URL getMetaDataFile(String resourcePath) throws IOException
+
+ public URL getMetaDataFileURL(String resourcePath) throws IOException
{
URL resourceURL = null;
if (resourcePath != null && resourcePath.length() > 0)
{
if (resourcePath.startsWith("/"))
resourcePath = resourcePath.substring(1);
-
+
try
{
// assign an absolute URL
@@ -94,18 +99,35 @@
}
catch (MalformedURLException ex)
{
+ // ignore
+ }
+
+ if (resourceURL == null)
+ {
+ try
+ {
+ VirtualFile vfResource = vfRoot.findChild(resourcePath);
+ resourceURL = vfResource.toURL();
+ }
+ catch (URISyntaxException e)
+ {
+ // ignore
+ }
+ }
+
+ if (resourceURL == null)
+ {
String deploymentPath = url.toExternalForm();
-
- // FIXME: remove this hack
- if (deploymentPath.startsWith("vfsfile:"))
- deploymentPath = "jar:" + deploymentPath.substring(3);
-
+
+ if (deploymentPath.startsWith("vfsfile:") && deploymentPath.endsWith("!/") == false)
+ deploymentPath += "!/";
+
if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
deploymentPath += "!/";
-
- if(deploymentPath.endsWith("/") == false)
+
+ if (deploymentPath.endsWith("/") == false)
deploymentPath += "/";
-
+
// assign a relative URL
resourceURL = new URL(deploymentPath + resourcePath);
}
@@ -113,6 +135,19 @@
return resourceURL;
}
+ public VirtualFile getMetaDataFile(String resourcePath) throws IOException
+ {
+ VirtualFile vfResource = null;
+ if (resourcePath != null && resourcePath.length() > 0)
+ {
+ if (resourcePath.startsWith("/"))
+ resourcePath = resourcePath.substring(1);
+
+ vfResource = vfRoot.findChild(resourcePath);
+ }
+ return vfResource;
+ }
+
public String toString()
{
StringBuilder builder = new StringBuilder();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -40,6 +40,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.utils.DOMUtils;
@@ -215,8 +216,8 @@
resourcePath = resourcePath + "/";
resourcePath = expLocation + resourcePath + schemaLocation;
- URL resourceURL = udi.getMetaDataFile(resourcePath);
- InputStream is = new ResourceURL(resourceURL).openStream();
+ VirtualFile vfResource = udi.getMetaDataFile(resourcePath);
+ InputStream is = vfResource.openStream();
if (is == null)
throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
@@ -310,7 +311,7 @@
wsdlLocation = wsdlLocation.substring(expLocation.length());
wsdlFile = new File(locationFile + "/" + wsdlLocation);
}
- else if (wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:"))
+ else if (wsdlLocation.startsWith("vfsfile:") || wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:"))
{
wsdlLocation = wsdlLocation.substring(wsdlLocation.lastIndexOf("/") + 1);
wsdlFile = new File(locationFile + "/" + wsdlLocation);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -33,10 +33,14 @@
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
import javax.activation.DataHandler;
import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
@@ -114,4 +118,20 @@
tmpdir.mkdirs();
return tmpdir;
}
+
+ public static URL toURL(VirtualFile file)
+ {
+ try
+ {
+ return file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ return null;
+ }
+ catch (URISyntaxException e)
+ {
+ return null;
+ }
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -30,10 +30,11 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.metadata.config.jaxrpc.ClientConfigJAXRPC;
-import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
@@ -112,10 +113,13 @@
serviceMetaData.setWsdlLocation(wsdlURL);
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
- URL mappingURL = null;
if (javaWsdlMapping != null)
{
- mappingURL = new URL(Constants.NS_JBOSSWS_URI + "/dummy-mapping-url");
+ URL mappingURL = new URL(Constants.NS_JBOSSWS_URI + "/dummy-mapping-file");
+ if (serviceRefMetaData != null && serviceRefMetaData.getMappingLocation() != null)
+ {
+ mappingURL = serviceRefMetaData.getMappingLocation();
+ }
wsMetaData.addMappingDefinition(mappingURL.toExternalForm(), javaWsdlMapping);
serviceMetaData.setMappingLocation(mappingURL);
}
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-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -80,7 +80,7 @@
// Set wsdl location
String wsdlFile = wsdMetaData.getWsdlFile();
- URL wsdlLocation = udi.getMetaDataFile(wsdlFile);
+ URL wsdlLocation = udi.getMetaDataFileURL(wsdlFile);
// Unmarshall the WSDL
serviceMetaData.setWsdlLocation(wsdlLocation);
@@ -88,7 +88,7 @@
// Unmarshall the jaxrpc-mapping.xml
String mappingFile = wsdMetaData.getJaxrpcMappingFile();
- serviceMetaData.setMappingLocation(udi.getMetaDataFile(mappingFile));
+ serviceMetaData.setMappingLocation(udi.getMetaDataFileURL(mappingFile));
JavaWsdlMapping javaWsdlMapping = serviceMetaData.getJavaWsdlMapping();
if (javaWsdlMapping == null)
throw new WSException("jaxrpc-mapping-file not configured from webservices.xml");
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-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -130,7 +130,7 @@
String wsdlLocation = anWebServiceProvider.wsdlLocation();
if (wsdlLocation.length() > 0)
{
- URL wsdlURL = udi.getMetaDataFile(wsdlLocation);
+ URL wsdlURL = udi.getMetaDataFileURL(wsdlLocation);
serviceMetaData.setWsdlLocation(wsdlURL);
}
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-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -102,9 +102,9 @@
{
private static class EndpointResult
{
- private Class<?> klass;
- private ServerEndpointMetaData semd;
- private ServiceMetaData smd;
+ private Class<?> epClass;
+ private ServerEndpointMetaData sepMetaData;
+ private ServiceMetaData serviceMetaData;
private URL wsdlLocation;
}
@@ -688,12 +688,12 @@
QName portTypeQName = new QName(interfaceNS, name);
EndpointResult result = new EndpointResult();
- result.smd = new ServiceMetaData(wsMetaData, new QName(serviceNS, serviceName));
- result.semd = new ServerEndpointMetaData(result.smd, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
- result.klass = (seiClass != null ? seiClass : sepClass);
- result.wsdlLocation = udi.getMetaDataFile(wsdlLocation);
- result.smd.addEndpoint(result.semd);
- wsMetaData.addService(result.smd);
+ result.serviceMetaData = new ServiceMetaData(wsMetaData, new QName(serviceNS, serviceName));
+ result.sepMetaData = new ServerEndpointMetaData(result.serviceMetaData, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
+ result.epClass = (seiClass != null ? seiClass : sepClass);
+ result.wsdlLocation = udi.getMetaDataFileURL(wsdlLocation);
+ result.serviceMetaData.addEndpoint(result.sepMetaData);
+ wsMetaData.addService(result.serviceMetaData);
return result;
}
@@ -964,9 +964,9 @@
// Clear the java types, etc.
resetMetaDataBuilder(udi.classLoader);
- ServerEndpointMetaData sepMetaData = result.semd;
- ServiceMetaData serviceMetaData = result.smd;
- Class<?> seiClass = result.klass;
+ ServerEndpointMetaData sepMetaData = result.sepMetaData;
+ ServiceMetaData serviceMetaData = result.serviceMetaData;
+ Class<?> seiClass = result.epClass;
sepMetaData.setLinkName(linkName);
sepMetaData.setServiceEndpointImplName(sepClass.getName());
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -30,6 +30,8 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
@@ -65,24 +67,40 @@
/**
* Factory method for JavaWsdlMapping
*/
- public JavaWsdlMapping parse(URL mappingLocation) throws IOException
+ public JavaWsdlMapping parse(URL mappingURL) throws IOException
{
- if (mappingLocation == null)
+ if (mappingURL == null)
{
- throw new IllegalArgumentException("URL cannot be null");
+ throw new IllegalArgumentException("JAXRPC mapping URL cannot be null");
}
// setup the XML binding Unmarshaller
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- InputStream is = new ResourceURL(mappingLocation).openStream();
+ InputStream is = new ResourceURL(mappingURL).openStream();
+ return parse(is, mappingURL);
+ }
+
+ public JavaWsdlMapping parse(VirtualFile vfMapping) throws IOException
+ {
+ if (vfMapping == null)
+ throw new IllegalArgumentException("JAXRPC mapping file cannot be null");
+
+ // setup the XML binding Unmarshaller
+ InputStream is = vfMapping.openStream();
+ URL mappingURL = IOUtils.toURL(vfMapping);
+ return parse(is, mappingURL);
+ }
+
+ private JavaWsdlMapping parse(InputStream is, URL mappingURL) throws IOException
+ {
try
{
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)unmarshaller.unmarshal(is, this, null);
return javaWsdlMapping;
}
catch (JBossXBException e)
{
- IOException ioex = new IOException("Cannot parse: " + mappingLocation);
+ IOException ioex = new IOException("Cannot parse: " + mappingURL);
Throwable cause = e.getCause();
if (cause != null)
ioex.initCause(cause);
@@ -94,6 +112,7 @@
}
}
+
/**
* This method is called on the factory by the object model builder when the parsing starts.
*/
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -27,6 +27,8 @@
import java.util.HashMap;
import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
@@ -78,15 +80,27 @@
return new WSSecurityOMFactory();
}
- /**
- * Factory method for JavaWsdlMapping
- */
public WSSecurityConfiguration parse(URL configURL) throws IOException
{
if (configURL == null)
- throw new IllegalArgumentException("URL cannot be null");
+ throw new IllegalArgumentException("Security config URL cannot be null");
InputStream is = new ResourceURL(configURL).openStream();
+ return parse(is, configURL);
+ }
+
+ public WSSecurityConfiguration parse(VirtualFile vfConfig) throws IOException
+ {
+ if (vfConfig == null)
+ throw new IllegalArgumentException("Security config file cannot be null");
+
+ InputStream is = vfConfig.openStream();
+ URL configURL = IOUtils.toURL(vfConfig);
+ return parse(is, configURL);
+ }
+
+ private WSSecurityConfiguration parse(InputStream is, URL configURL) throws IOException
+ {
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -436,7 +436,7 @@
if (locationURL == null)
{
String parentProtocol = parentURL.getProtocol();
- if (parentProtocol.equals("file") && !location.startsWith("/"))
+ if (parentProtocol.indexOf("file") >= 0 && !location.startsWith("/"))
{
String path = parentURL.toExternalForm();
path = path.substring(0, path.lastIndexOf("/"));
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-tests/build.xml 2007-01-06 12:57:21 UTC (rev 1846)
@@ -169,6 +169,7 @@
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
<pathelement location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
+ <pathelement location="${jboss.server.lib}/jbosssx.jar"/> <!-- JBossSecurityContext -->
<pathelement location="${basedir}/../integration-${jbossws.integration.target}/output/lib/jbossws-${jbossws.integration.target}-integration.jar"/>
<pathelement location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-integration.jar"/>
<path refid="javac.classpath"/>
@@ -363,24 +364,25 @@
<mkdir dir="${tests.output.dir}/reports"/>
<junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}">
<jvmarg value="-Djava.security.manager"/>
+ <sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
+ <sysproperty key="client.scenario" value="${client.scenario}"/>
+ <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>
+ <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
<sysproperty key="java.security.policy" value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
- <sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="jbosstest.host.name" value="${node0}"/>
- <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
- <sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
- <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
+ <sysproperty key="tomcat.home" value="${tomcat.home}"/>
+ <sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
<sysproperty key="tomcat.manager.username" value="${tomcat.manager.username}"/>
- <sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
<sysproperty key="org.jboss.ws.wsse.keyStore" value="${tests.resources.dir}/jaxrpc/wsse/wsse.keystore"/>
<sysproperty key="org.jboss.ws.wsse.trustStore" value="${tests.resources.dir}/jaxrpc/wsse/wsse.truststore"/>
<sysproperty key="org.jboss.ws.wsse.keyStorePassword" value="jbossws"/>
<sysproperty key="org.jboss.ws.wsse.trustStorePassword" value="jbossws"/>
<sysproperty key="org.jboss.ws.wsse.keyStoreType" value="jks"/>
<sysproperty key="org.jboss.ws.wsse.trustStoreType" value="jks"/>
- <sysproperty key="client.scenario" value="${client.scenario}"/>
<classpath>
<path refid="test.client.classpath"/>
<pathelement location="${tests.output.dir}/classes"/>
@@ -402,18 +404,19 @@
<junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}">
<jvmarg line="${remote.debug.line}"/>
<jvmarg value="-Djava.security.manager"/>
+ <sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
+ <sysproperty key="client.scenario" value="${client.scenario}"/>
+ <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>
+ <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
<sysproperty key="java.security.policy" value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
- <sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="jbosstest.host.name" value="${node0}"/>
- <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
- <sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
- <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
+ <sysproperty key="tomcat.home" value="${tomcat.home}"/>
+ <sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
<sysproperty key="tomcat.manager.username" value="${tomcat.manager.username}"/>
- <sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
- <sysproperty key="client.scenario" value="${client.scenario}"/>
<!--
http://jira.jboss.com/jira/browse/JBWS-917
<sysproperty key="javax.net.ssl.keyStore" value="${tests.resources.dir}/jaxrpc/wsse/wsse.keystore"/>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -127,7 +127,8 @@
private static String getIntegrationTarget()
{
- return System.getProperty("jbossws.integration.target");
+ String target = System.getProperty("jbossws.integration.target", "jboss50");
+ return target;
}
/** Try to discover the URL for the deployment archive */
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -37,7 +37,7 @@
*/
public class RpcEJBTestCase extends JBossWSTest
{
- private static JaxRpcTestService endpoint;
+ private static JaxRpcTestService port;
public static Test suite()
{
@@ -48,11 +48,11 @@
{
super.setUp();
- if (endpoint == null)
+ if (port == null && isTargetJBoss50() == false)
{
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
- endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
@@ -67,7 +67,7 @@
return;
}
- Object retObj = endpoint.echoString(hello, world);
+ Object retObj = port.echoString(hello, world);
assertEquals(hello + world, retObj);
}
@@ -82,7 +82,7 @@
return;
}
- Object retObj = endpoint.echoSimpleUserType(hello, userType);
+ Object retObj = port.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
}
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -52,7 +52,7 @@
{
super.setUp();
- if (port == null)
+ if (port == null && isTargetJBoss50() == false)
{
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
@@ -74,7 +74,7 @@
{
if (isTargetJBoss50())
{
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
return;
}
@@ -88,7 +88,7 @@
{
if (isTargetJBoss50())
{
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
return;
}
@@ -102,7 +102,7 @@
{
if (isTargetJBoss50())
{
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
return;
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 07:32:14 UTC (rev 1845)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-06 12:57:21 UTC (rev 1846)
@@ -21,16 +21,16 @@
*/
package org.jboss.test.ws.jaxws.eardeployment;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.net.URL;
import javax.xml.namespace.QName;
-import junit.framework.Test;
-
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestHelper;
-import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.DOMUtils;
@@ -45,13 +45,15 @@
*/
public class EarTestCase extends JBossWSTest
{
- public static Test suite()
- {
- String earName = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-eardeployment.ear" : "jaxws-eardeployment42.ear");
- return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
- }
+ /*
+ public static Test suite()
+ {
+ String earName = (JBossWSTestHelper.isTargetJBoss50() ? "jaxws-eardeployment.ear" : "jaxws-eardeployment42.ear");
+ return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
+ }
+ */
- public void testResourceURL() throws Exception
+ public void _testResourceURL() throws Exception
{
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
@@ -65,25 +67,46 @@
public void testVirtualFile() throws Exception
{
- if (isTargetJBoss50() == false)
- return;
-
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
URL earURL = earFile.toURL();
- VFS fsEar = VFS.getVFS(earURL);
- VirtualFile vfWar = fsEar.findChild("jaxws-eardeployment.war");
+ VirtualFile vfEar = VFS.getRoot(earURL);
+
+ VirtualFile vfWar = vfEar.findChild("jaxws-eardeployment.war");
assertNotNull(earURL + "!/jaxws-eardeployment.war", vfWar);
VirtualFile vfWsdl = vfWar.findChild("WEB-INF/wsdl/TestEndpoint.wsdl");
assertNotNull(earURL + "!/jaxws-eardeployment.war!/WEB-INF/wsdl/TestEndpoint.wsdl", vfWsdl);
+ // Test VFS access
Element root = DOMUtils.parse(vfWsdl.openStream());
assertNotNull(root);
+
+ URL wsdlURL = vfWsdl.toURL();
+ assertEquals("Expected protocol: vfsfile", "vfsfile", wsdlURL.getProtocol());
+
+ String wsdlStr = wsdlURL.toExternalForm();
+ String expectedPath = "libs/jaxws-eardeployment.ear/jaxws-eardeployment.war/WEB-INF/wsdl/TestEndpoint.wsdl";
+ assertTrue("Unexpected path: " + wsdlStr, wsdlStr.endsWith(expectedPath));
+
+ // Test URL access
+ root = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(root);
+
+ // Test URL serialization
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(wsdlURL);
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
+ wsdlURL = (URL)ois.readObject();
+
+ // Test URL access
+ root = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(root);
}
- public void testEJB3Endpoint() throws Exception
+ public void _testEJB3Endpoint() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earejb3/EJB3Bean?wsdl");
QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
@@ -95,7 +118,7 @@
assertEquals(helloWorld, retObj);
}
- public void testJSEEndpoint() throws Exception
+ public void _testJSEEndpoint() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earjse/JSEBean?wsdl");
QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
17 years, 12 months
JBossWS SVN: r1845 - trunk/build/ant-import
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-06 02:32:14 -0500 (Sat, 06 Jan 2007)
New Revision: 1845
Modified:
trunk/build/ant-import/build-thirdparty.xml
Log:
Update eclipse project classpaths
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-01-06 07:32:08 UTC (rev 1844)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-01-06 07:32:14 UTC (rev 1845)
@@ -88,7 +88,6 @@
<pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
<pathelement location="${thirdparty.dir}/log4j.jar"/>
<pathelement location="${thirdparty.dir}/mailapi.jar"/>
- <pathelement location="${thirdparty.dir}/mail.jar"/>
<pathelement location="${thirdparty.dir}/wsdl4j.jar"/>
<pathelement location="${thirdparty.dir}/xmlsec.jar"/>
</path>
@@ -99,7 +98,6 @@
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3x.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-container.jar"/>
<pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
<pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
17 years, 12 months