Author: thomas.diesler(a)jboss.com
Date: 2007-01-10 17:43:08 -0500 (Wed, 10 Jan 2007)
New Revision: 1912
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.java
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.java
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/web.xml
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/webservices.xml
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/wstools-config.xml
Modified:
branches/tdiesler/trunk/integration-jboss40/.classpath
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/ant/wstools.java
branches/tdiesler/trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
Log:
[JBWS-1410] - NumberFormatException From StubExt.PROPERTY_CLIENT_TIMEOUT
Modified: branches/tdiesler/trunk/integration-jboss40/.classpath
===================================================================
--- branches/tdiesler/trunk/integration-jboss40/.classpath 2007-01-10 21:58:48 UTC (rev
1911)
+++ branches/tdiesler/trunk/integration-jboss40/.classpath 2007-01-10 22:43:08 UTC (rev
1912)
@@ -19,7 +19,6 @@
<classpathentry kind="lib"
path="/build/thirdparty/jboss-remoting.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-security-spi.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-xml-binding.jar"/>
- <classpathentry kind="lib"
path="/build/thirdparty/mailapi.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/wsdl4j.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/xmlsec.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/ejb3.deployer/jboss-annotations-ejb3.jar"/>
@@ -32,5 +31,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/mail.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -580,7 +580,6 @@
}
catch (Exception ex)
{
- ex.printStackTrace();
throw new RemoteException("Call invocation failed", ex);
}
finally
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -127,11 +127,6 @@
if (!ignoreParseError)
throw new IOException("Failed to parse stream: " +
e.getMessage());
}
- catch (SOAPException e)
- {
- e.printStackTrace();
- throw e;
- }
finally
{
try
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -24,6 +24,7 @@
// $Id$
import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -43,6 +44,8 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.marshal.MarshalFactory;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.xop.XOPContext;
@@ -127,6 +130,7 @@
if (closed)
throw new SOAPException("SOAPConnection is already closed");
+ Object timeout = null;
String targetAddress;
Map callProps;
@@ -138,7 +142,7 @@
if (callProps.containsKey(StubExt.PROPERTY_CLIENT_TIMEOUT))
{
- Object timeout = callProps.get(StubExt.PROPERTY_CLIENT_TIMEOUT);
+ timeout = callProps.get(StubExt.PROPERTY_CLIENT_TIMEOUT);
targetAddress = addURLParameter(targetAddress, "timeout",
timeout.toString());
}
}
@@ -178,13 +182,22 @@
}
SOAPMessage resMessage = null;
- if (oneway == true)
+ try
{
- client.invokeOneway(reqMessage, metadata, false);
+ if (oneway == true)
+ {
+ client.invokeOneway(reqMessage, metadata, false);
+ }
+ else
+ {
+ resMessage = (SOAPMessage)client.invoke(reqMessage, metadata);
+ }
}
- else
+ catch (RuntimeException rte)
{
- resMessage = (SOAPMessage)client.invoke(reqMessage, metadata);
+ if (timeout != null && rte.getCause() instanceof
SocketTimeoutException)
+ throw new WSTimeoutException("Timeout after: " + timeout +
"ms", new Long(timeout.toString()));
+ else throw rte;
}
// Disconnect the remoting client
@@ -202,7 +215,6 @@
}
catch (RuntimeException rte)
{
- rte.printStackTrace();
throw rte;
}
catch (Throwable t)
@@ -237,7 +249,7 @@
log.debug("Get locator for: " + endpoint);
targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE,
"SOAPMessage");
InvokerLocator locator = new InvokerLocator(targetAddress);
-
+
/* An HTTPClientInvoker may disconnect from the server and recreated by the
remoting layer.
* In that case the new invoker does not inherit the marshaller/unmarshaller
from the disconnected invoker.
* We therefore explicitly specify the invoker locator datatype and register the
SOAP marshaller/unmarshaller
@@ -253,7 +265,7 @@
client.connect();
client.setMarshaller(marshaller);
-
+
if (oneway == false)
client.setUnMarshaller(unmarshaller);
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -606,7 +606,7 @@
return seiName;
}
- private void createSEI(File loc, WSDLDefinitions wsdl)
+ private void createSEI(File loc, WSDLDefinitions wsdl) throws IOException
{
WSDLInterface[] intarr = wsdl.getInterfaces();
if (intarr == null || intarr.length == 0)
@@ -615,14 +615,7 @@
for (int i = 0; i < len; i++)
{
WSDLInterface intf = intarr[i];
- try
- {
- createSEIFile(intf, loc);
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
+ createSEIFile(intf, loc);
}
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/ant/wstools.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/ant/wstools.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/ant/wstools.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.ws.tools.ant;
import org.apache.tools.ant.BuildException;
@@ -32,92 +32,88 @@
* @since Oct 5, 2005
*/
public class wstools extends MatchingTask
-{
+{
protected Path compileClasspath = null;
private boolean verbose = false;
-
+
private String dest = null;
-
- private String config = null;
-
+
+ private String config = null;
+
/**
* Creates a nested classpath element.
*/
- public Path createClasspath()
+ public Path createClasspath()
{
- if (compileClasspath == null)
+ if (compileClasspath == null)
{
compileClasspath = new Path(project);
}
return compileClasspath.createPath();
}
-
+
/**
* Adds a reference to a CLASSPATH defined elsewhere.
*/
- public void setClasspathRef(Reference r)
+ public void setClasspathRef(Reference r)
{
createClasspath().setRefid(r);
}
-
-
+
public String getConfig()
{
return config;
}
-
+
public void setConfig(String config)
{
this.config = config;
}
-
+
public String getDest()
{
return dest;
}
-
+
public void setDest(String dest)
{
this.dest = dest;
}
-
+
public boolean isVerbose()
{
return verbose;
}
-
+
public void setVerbose(boolean verbose)
{
this.verbose = verbose;
- }
-
-
+ }
+
public void execute() throws BuildException
- {
+ {
ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+ Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
try
{
- String[] args= new String[]{"-dest",dest,"-config",config};
+ String[] args = new String[] { "-dest", dest, "-config",
config };
org.jboss.ws.tools.WSTools tools = new org.jboss.ws.tools.WSTools();
- tools.generate(args);
+ tools.generate(args);
}
catch (Exception ex)
{
if (ex instanceof BuildException)
{
- throw (BuildException) ex;
+ throw (BuildException)ex;
}
else
- {
- ex.printStackTrace();
- throw new BuildException("Error running jbossws: ",
- ex, getLocation());
+ {
+ throw new BuildException("Error running jbossws: ", ex,
getLocation());
}
}
- finally
+ finally
{
Thread.currentThread().setContextClassLoader(prevCL);
}
- }
+ }
}
Modified: branches/tdiesler/trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-10
21:58:48 UTC (rev 1911)
+++ branches/tdiesler/trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-10
22:43:08 UTC (rev 1912)
@@ -55,6 +55,7 @@
<!-- jaxrpc-benchmark -->
<war warfile="${tests.output.dir}/libs/jaxrpc-benchmark-rpclit.war"
webxml="${tests.output.dir}/resources/jaxrpc/benchmark/rpclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_*.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*EJBEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
@@ -68,10 +69,10 @@
</war>
<jar jarfile="${tests.output.dir}/libs/jaxrpc-benchmark-rpclit.jar">
<fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_*.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*JSEEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
- <include name="org/jboss/test/ws/jaxrpc/benchmark/**/*"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxrpc/benchmark/rpclit/META-INF">
<include name="ejb-jar.xml"/>
@@ -83,11 +84,11 @@
</jar>
<jar
jarfile="${tests.output.dir}/libs/jaxrpc-benchmark-rpclit-client.jar">
<fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_*.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*JSEEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*EJBEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
- <include name="org/jboss/test/ws/jaxrpc/benchmark/**/*"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxrpc/benchmark/rpclit/META-INF">
<include name="application-client.xml"/>
@@ -98,6 +99,7 @@
</jar>
<war warfile="${tests.output.dir}/libs/jaxrpc-benchmark-doclit.war"
webxml="${tests.output.dir}/resources/jaxrpc/benchmark/doclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_arr*/**"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*EJBEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
@@ -111,10 +113,10 @@
</war>
<jar jarfile="${tests.output.dir}/libs/jaxrpc-benchmark-doclit.jar">
<fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_arr*/**"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*JSEEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
- <include name="org/jboss/test/ws/jaxrpc/benchmark/**/*"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxrpc/benchmark/doclit/META-INF">
<include name="ejb-jar.xml"/>
@@ -126,11 +128,11 @@
</jar>
<jar
jarfile="${tests.output.dir}/libs/jaxrpc-benchmark-doclit-client.jar">
<fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/benchmark/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/benchmark/*_arr*/**"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*JSEEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*EJBEndpoint.class"/>
<exclude
name="org/jboss/test/ws/jaxrpc/benchmark/*TestCase.class"/>
- <include name="org/jboss/test/ws/jaxrpc/benchmark/**/*"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxrpc/benchmark/doclit/META-INF">
<include name="application-client.xml"/>
@@ -931,6 +933,19 @@
</webinf>
</war>
+ <!-- jaxrpc-jbws1410 -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1410.war"
webxml="${tests.output.dir}/resources/jaxrpc/jbws1410/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxrpc/jbws1410/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+
<!-- jaxrpc-jbws1427 -->
<jar destfile="${tests.output.dir}/libs/jaxrpc-jbws1427.jar">
<fileset dir="${tests.output.dir}/classes">
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,95 @@
+/*
+ * 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.jbws1410;
+
+import java.io.File;
+import java.net.URL;
+import java.rmi.RemoteException;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.Stub;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.WSTimeoutException;
+import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.StubExt;
+
+/**
+ * NumberFormatException From StubExt.PROPERTY_CLIENT_TIMEOUT
+ *
+ *
http://jira.jboss.com/jira/browse/JBWS-1410
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Jan-2007
+ */
+public class JBWS1410TestCase extends JBossWSTest
+{
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1410TestCase.class,
"jaxrpc-jbws1410.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
+ URL wsdlURL = new
File("resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl").toURL();
+ URL mappingURL = new
File("resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName serviceName = new QName("http://org.jboss.test.ws/jbws1410",
"TestService");
+ Service service = factory.createService(wsdlURL, serviceName, mappingURL);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-jbws1410");
+ }
+ }
+
+ public void testNoTimeout() throws Exception
+ {
+ String resStr = port.echoSimple("10");
+ assertEquals("10", resStr);
+ }
+
+ public void testTimeout() throws Exception
+ {
+ ((Stub)port)._setProperty(StubExt.PROPERTY_CLIENT_TIMEOUT, "100");
+ try
+ {
+ port.echoSimple("500");
+ fail("socket timeout expected");
+ }
+ catch (RemoteException ex)
+ {
+ assertTrue ("WSTimeoutException expected", ex.getCause() instanceof
WSTimeoutException);
+ WSTimeoutException toex = (WSTimeoutException)ex.getCause();
+ assertEquals(100, toex.getTimeout());
+ }
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.java
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,31 @@
+/*
+ * 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.jbws1410;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface TestEndpoint extends Remote
+{
+ String echoSimple(String inStr) throws RemoteException;
+
+}
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.java 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.java 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,45 @@
+/*
+ * 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.jbws1410;
+
+import org.jboss.logging.Logger;
+
+public class TestEndpointImpl implements TestEndpoint
+{
+ private Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+ public String echoSimple(String inStr)
+ {
+ log.info("echoSimple: " + inStr);
+
+ try
+ {
+ Thread.currentThread().sleep(new Long(inStr).longValue());
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+
+ return inStr;
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1410</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1410/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.jbws1410.TestService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.ws/jbws1410'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1410.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.ws/jbws1410'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.ws/jbws1410'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoSimple</java-method-name>
+ <wsdl-operation>echoSimple</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1410'>wsdlMsgNS:TestEndpoint_echoSimple</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1410'>wsdlMsgNS:TestEndpoint_echoSimpleResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/web.xml 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/web.xml 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxrpc.jbws1410.TestEndpointImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/webservices.xml 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/webservices.xml 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,15 @@
+<webservices version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:impl='http://org.jboss.test.ws/jbws1410'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port>impl:TestEndpointPort</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1410.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService'
targetNamespace='http://org.jboss.test.ws/jbws1410'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.test.ws/jbws1410'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoSimple'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoSimpleResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoSimple' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoSimple'/>
+ <output message='tns:TestEndpoint_echoSimpleResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoSimple'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1410'
use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1410'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/wstools-config.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/wstools-config.xml 2007-01-10
21:58:48 UTC (rev 1911)
+++
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/wstools-config.xml 2007-01-10
22:43:08 UTC (rev 1912)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../output/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<configuration
xmlns="http://www.jboss.org/jbossws-tools"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService"
endpoint="org.jboss.test.ws.jaxrpc.jbws1410.TestEndpoint"
style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1410"
type-namespace="http://org.jboss.test.ws/jbws1410/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
+
+<!--
+ <handler>
+ <handler-name>ServerHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.jbws1410.ServerHandler</handler-class>
+ </handler>
+-->
\ No newline at end of file
Property changes on:
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1410/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF