Author: thomas.diesler(a)jboss.com
Date: 2007-02-01 11:22:09 -0500 (Thu, 01 Feb 2007)
New Revision: 2241
Added:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployer.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerJBoss.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerTomcat.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/XOPTestSupport.java
Removed:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestDeployer.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTestSupport.java
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTypeDefTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/doclit/XOPBase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/rpclit/XOPBase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/META-INF/jboss-client.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/handlerconfig/META-INF/jboss-client.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/META-INF/jboss-client.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/handlerconfig/META-INF/jboss-client.xml
Log:
Include XOP in jaxrpc samples
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -1,55 +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;
-
-import java.net.URL;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-/**
- * A JBossWS test helper that deals with test deployment/undeployment, etc.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Oct-2004
- */
-public class JBossTestDeployer implements JBossWSTestDeployer
-{
- private static final String MAIN_DEPLOYER =
"jboss.system:service=MainDeployer";
-
- private MBeanServerConnection server;
-
- public JBossTestDeployer(MBeanServerConnection server)
- {
- this.server = server;
- }
-
- public void deploy(URL url) throws Exception
- {
- server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url
}, new String[] { "java.net.URL" });
- }
-
- public void undeploy(URL url) throws Exception
- {
- server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] {
url }, new String[] { "java.net.URL" });
- }
-}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestDeployer.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestDeployer.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestDeployer.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -1,41 +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;
-
-import java.net.URL;
-
-/**
- * WS test deployer
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-May-2006
- */
-public interface JBossWSTestDeployer
-{
- /** Deploy the given archive
- */
- void deploy(URL archive) throws Exception;
-
- /** Undeploy the given archive
- */
- void undeploy(URL archive) throws Exception;
-}
\ No newline at end of file
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -125,17 +125,17 @@
return server;
}
- private JBossWSTestDeployer getDeployer()
+ private TestDeployer getDeployer()
{
if (isTargetJBoss())
{
- return new JBossTestDeployer(getServer());
+ return new TestDeployerJBoss(getServer());
}
else if (isTargetTomcat())
{
String username = System.getProperty("tomcat.manager.username");
String password = System.getProperty("tomcat.manager.password");
- return new TomcatTestDeployer(username, password);
+ return new TestDeployerTomcat(username, password);
}
else
{
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployer.java
(from rev 2239,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestDeployer.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployer.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployer.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -0,0 +1,41 @@
+/*
+ * 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;
+
+import java.net.URL;
+
+/**
+ * WS test deployer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-May-2006
+ */
+public interface TestDeployer
+{
+ /** Deploy the given archive
+ */
+ void deploy(URL archive) throws Exception;
+
+ /** Undeploy the given archive
+ */
+ void undeploy(URL archive) throws Exception;
+}
\ No newline at end of file
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerJBoss.java
(from rev 2239,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerJBoss.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerJBoss.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class TestDeployerJBoss implements TestDeployer
+{
+ private static final String MAIN_DEPLOYER =
"jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+
+ public TestDeployerJBoss(MBeanServerConnection server)
+ {
+ this.server = server;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url
}, new String[] { "java.net.URL" });
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] {
url }, new String[] { "java.net.URL" });
+ }
+}
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerTomcat.java
(from rev 2239,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerTomcat.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TestDeployerTomcat.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -0,0 +1,129 @@
+/*
+ * 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;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.ProtocolException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.util.Base64;
+
+/**
+ * A deployer that deploys to Tomcat
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-May-2006
+ */
+public class TestDeployerTomcat implements TestDeployer
+{
+ private String username, password;
+
+ // Map<String,String> of URL to context path
+ private static Map pathMap = new HashMap();
+
+ public TestDeployerTomcat(String username, String password)
+ {
+ this.username = username;
+ this.password = password;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ File destDir = new File(new File(url.getFile()).getParent() +
"/wspublish");
+ destDir.mkdirs();
+
+ // Use reflection to invoke wspublish.process() from the tomcat integration layer
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class wspublishClass =
loader.loadClass("org.jboss.ws.integration.tomcat.wspublish");
+ Method process = wspublishClass.getMethod("process", new
Class[]{URL.class, File.class, String.class});
+ URL warURL = (URL)process.invoke(wspublishClass.newInstance(), new Object[]{url,
destDir, null});
+
+ String path = warURL.toExternalForm();
+ path = path.substring(path.lastIndexOf("/"));
+ if (path.endsWith(".war"))
+ path = path.substring(0, path.length() - 4);
+
+ URL managerURL = new URL(getManagerPath() + "/deploy?path=" + path +
"&war=" + warURL.toExternalForm());
+ HttpURLConnection con = getURLConnection(managerURL);
+
+ con.connect();
+
+ BufferedReader br = new BufferedReader(new
InputStreamReader(con.getInputStream()));
+ String status = br.readLine();
+
+ if (status == null)
+ throw new IllegalStateException("Cannot obtain deploy status");
+
+ if (status.startsWith("OK") == false)
+ throw new IllegalStateException("Cannot deploy application: " +
status);
+
+ path = status.substring(status.indexOf("/"));
+ pathMap.put(url.toExternalForm(), path);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ String path = (String) pathMap.get(url.toExternalForm());
+ if (path != null)
+ {
+ URL managerURL = new URL(getManagerPath() + "/undeploy?path=" +
path);
+ HttpURLConnection con = getURLConnection(managerURL);
+
+ con.connect();
+
+ BufferedReader br = new BufferedReader(new
InputStreamReader(con.getInputStream()));
+ String status = br.readLine();
+
+ if (status == null)
+ throw new IllegalStateException("Cannot obtain undeploy status");
+
+ if (status.startsWith("OK") == false)
+ throw new IllegalStateException("Cannot undeploy application: " +
status);
+ }
+ }
+
+ private String getManagerPath() throws MalformedURLException
+ {
+ String hostName = System.getProperty("jbosstest.server.host",
"localhost");
+ return "http://" + hostName + ":8080/manager";
+ }
+
+ private HttpURLConnection getURLConnection(URL managerURL) throws IOException,
ProtocolException
+ {
+ HttpURLConnection con = (HttpURLConnection)managerURL.openConnection();
+ con.setRequestMethod("GET");
+ con.setDoInput(true);
+
+ String authorization = username + ":" + password;
+ authorization = Base64.encodeBytes(authorization.getBytes());
+ con.setRequestProperty("Authorization", "Basic " +
authorization);
+ return con;
+ }
+}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -1,129 +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;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.reflect.Method;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.ProtocolException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.util.Base64;
-
-/**
- * A deployer that deploys to Tomcat
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-May-2006
- */
-public class TomcatTestDeployer implements JBossWSTestDeployer
-{
- private String username, password;
-
- // Map<String,String> of URL to context path
- private static Map pathMap = new HashMap();
-
- public TomcatTestDeployer(String username, String password)
- {
- this.username = username;
- this.password = password;
- }
-
- public void deploy(URL url) throws Exception
- {
- File destDir = new File(new File(url.getFile()).getParent() +
"/wspublish");
- destDir.mkdirs();
-
- // Use reflection to invoke wspublish.process() from the tomcat integration layer
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class wspublishClass =
loader.loadClass("org.jboss.ws.integration.tomcat.wspublish");
- Method process = wspublishClass.getMethod("process", new
Class[]{URL.class, File.class, String.class});
- URL warURL = (URL)process.invoke(wspublishClass.newInstance(), new Object[]{url,
destDir, null});
-
- String path = warURL.toExternalForm();
- path = path.substring(path.lastIndexOf("/"));
- if (path.endsWith(".war"))
- path = path.substring(0, path.length() - 4);
-
- URL managerURL = new URL(getManagerPath() + "/deploy?path=" + path +
"&war=" + warURL.toExternalForm());
- HttpURLConnection con = getURLConnection(managerURL);
-
- con.connect();
-
- BufferedReader br = new BufferedReader(new
InputStreamReader(con.getInputStream()));
- String status = br.readLine();
-
- if (status == null)
- throw new IllegalStateException("Cannot obtain deploy status");
-
- if (status.startsWith("OK") == false)
- throw new IllegalStateException("Cannot deploy application: " +
status);
-
- path = status.substring(status.indexOf("/"));
- pathMap.put(url.toExternalForm(), path);
- }
-
- public void undeploy(URL url) throws Exception
- {
- String path = (String) pathMap.get(url.toExternalForm());
- if (path != null)
- {
- URL managerURL = new URL(getManagerPath() + "/undeploy?path=" +
path);
- HttpURLConnection con = getURLConnection(managerURL);
-
- con.connect();
-
- BufferedReader br = new BufferedReader(new
InputStreamReader(con.getInputStream()));
- String status = br.readLine();
-
- if (status == null)
- throw new IllegalStateException("Cannot obtain undeploy status");
-
- if (status.startsWith("OK") == false)
- throw new IllegalStateException("Cannot undeploy application: " +
status);
- }
- }
-
- private String getManagerPath() throws MalformedURLException
- {
- String hostName = System.getProperty("jbosstest.server.host",
"localhost");
- return "http://" + hostName + ":8080/manager";
- }
-
- private HttpURLConnection getURLConnection(URL managerURL) throws IOException,
ProtocolException
- {
- HttpURLConnection con = (HttpURLConnection)managerURL.openConnection();
- con.setRequestMethod("GET");
- con.setDoInput(true);
-
- String authorization = username + ":" + password;
- authorization = Base64.encodeBytes(authorization.getBytes());
- con.setRequestProperty("Authorization", "Basic " +
authorization);
- return con;
- }
-}
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/XOPTestSupport.java
(from rev 2240,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTestSupport.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/XOPTestSupport.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/XOPTestSupport.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -0,0 +1,106 @@
+/*
+ * 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;
+
+// $Id$
+
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @since 22-Sep-2006
+ */
+public class XOPTestSupport
+{
+
+ public static byte[] getBytesFromFile(File file) throws IOException
+ {
+ InputStream is = new FileInputStream(file);
+
+ long length = file.length();
+ byte[] bytes = new byte[(int)length];
+
+ int offset = 0;
+ int numRead = 0;
+ while (offset < bytes.length && (numRead = is.read(bytes, offset,
bytes.length - offset)) >= 0)
+ {
+ offset += numRead;
+ }
+
+ is.close();
+ return bytes;
+ }
+
+ public static Image createTestImage(File imgFile)
+ {
+ Image image = null;
+ try
+ {
+ URL url = imgFile.toURL();
+
+ image = null;
+ try
+ {
+ image = Toolkit.getDefaultToolkit().createImage(url);
+ }
+ catch (Throwable th)
+ {
+ //log.warn("Cannot create Image: " + th);
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ return image;
+ }
+
+ public static StreamSource createTestSource()
+ {
+ return new StreamSource(new
ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
+ }
+
+ public static DataHandler createDataHandler(File imgFile)
+ {
+ try
+ {
+ URL url = imgFile.toURL();
+ return new DataHandler(url);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTestSupport.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTestSupport.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTestSupport.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -1,106 +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.jaxrpc.samples.xop;
-
-// $Id$
-
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @since 22-Sep-2006
- */
-public class XOPTestSupport
-{
-
- public static byte[] getBytesFromFile(File file) throws IOException
- {
- InputStream is = new FileInputStream(file);
-
- long length = file.length();
- byte[] bytes = new byte[(int)length];
-
- int offset = 0;
- int numRead = 0;
- while (offset < bytes.length && (numRead = is.read(bytes, offset,
bytes.length - offset)) >= 0)
- {
- offset += numRead;
- }
-
- is.close();
- return bytes;
- }
-
- public static Image createTestImage(File imgFile)
- {
- Image image = null;
- try
- {
- URL url = imgFile.toURL();
-
- image = null;
- try
- {
- image = Toolkit.getDefaultToolkit().createImage(url);
- }
- catch (Throwable th)
- {
- //log.warn("Cannot create Image: " + th);
- }
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
-
- return image;
- }
-
- public static StreamSource createTestSource()
- {
- return new StreamSource(new
ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
- }
-
- public static DataHandler createDataHandler(File imgFile)
- {
- try
- {
- URL url = imgFile.toURL();
- return new DataHandler(url);
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
- }
-}
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTypeDefTestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTypeDefTestCase.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/XOPTypeDefTestCase.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -32,7 +32,7 @@
public void testCircularReferences() throws Exception
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = new File("resources/jaxrpc/xop/circular.xsd");
+ File f = new File("resources/jaxrpc/samples/xop/circular.xsd");
assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
XSModel xsModel = utils.parseSchema(f.toURL());
@@ -57,7 +57,7 @@
public void testXOPElementScan() throws Exception
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = new File("resources/jaxrpc/xop/schema.xsd");
+ File f = new File("resources/jaxrpc/samples/xop/schema.xsd");
assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
XSModel xsModel = utils.parseSchema(f.toURL());
@@ -96,7 +96,7 @@
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = new File("resources/jaxrpc/xop/schema.xsd");
+ File f = new File("resources/jaxrpc/samples/xop/schema.xsd");
assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
XSModel xsModel = utils.parseSchema(f.toURL());
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/doclit/XOPBase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/doclit/XOPBase.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/doclit/XOPBase.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -29,7 +29,7 @@
import javax.xml.transform.Source;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.samples.xop.XOPTestSupport;
+import org.jboss.test.ws.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingDataHandler;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingDataHandlerResponse;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingImage;
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/rpclit/XOPBase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/rpclit/XOPBase.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/xop/rpclit/XOPBase.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -30,7 +30,7 @@
import javax.xml.transform.Source;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.samples.xop.XOPTestSupport;
+import org.jboss.test.ws.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingDataHandler;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingDataHandlerResponse;
import org.jboss.test.ws.jaxrpc.samples.xop.shared.PingImage;
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2007-02-01
16:22:09 UTC (rev 2241)
@@ -31,7 +31,7 @@
import javax.xml.ws.soap.SOAPBinding;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.samples.xop.XOPTestSupport;
+import org.jboss.test.ws.XOPTestSupport;
/**
* User: hbraun
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/META-INF/jboss-client.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/META-INF/jboss-client.xml 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/META-INF/jboss-client.xml 2007-02-01
16:22:09 UTC (rev 2241)
@@ -9,7 +9,7 @@
<service-ref>
<service-ref-name>service/XOPTestCase</service-ref-name>
-
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-xop-doclit?wsdl</wsdl-override>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-samples-xop-doclit?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/handlerconfig/META-INF/jboss-client.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/handlerconfig/META-INF/jboss-client.xml 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/doclit/handlerconfig/META-INF/jboss-client.xml 2007-02-01
16:22:09 UTC (rev 2241)
@@ -9,7 +9,7 @@
<service-ref>
<service-ref-name>service/XOPHandlerTestCase</service-ref-name>
-
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-xop-doclit_handler?wsdl</wsdl-override>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-samples-xop-doclit_handler?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/META-INF/jboss-client.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/META-INF/jboss-client.xml 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/META-INF/jboss-client.xml 2007-02-01
16:22:09 UTC (rev 2241)
@@ -9,7 +9,7 @@
<service-ref>
<service-ref-name>service/XOPTestCaseRPC</service-ref-name>
-
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-xop-rpclit?wsdl</wsdl-override>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-samples-xop-rpclit?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/handlerconfig/META-INF/jboss-client.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/handlerconfig/META-INF/jboss-client.xml 2007-02-01
16:06:53 UTC (rev 2240)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/samples/xop/rpclit/handlerconfig/META-INF/jboss-client.xml 2007-02-01
16:22:09 UTC (rev 2241)
@@ -9,7 +9,7 @@
<service-ref>
<service-ref-name>service/XOPHandlerTestCaseRPC</service-ref-name>
-
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-xop-rpclit_handler?wsdl</wsdl-override>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-samples-xop-rpclit_handler?wsdl</wsdl-override>
</service-ref>
</jboss-client>