Author: heiko.braun(a)jboss.com
Date: 2007-12-20 08:59:15 -0500 (Thu, 20 Dec 2007)
New Revision: 5371
Added:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
Modified:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
Log:
Added RM test case
Added: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
(rev 0)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java 2007-12-20
13:59:15 UTC (rev 5371)
@@ -0,0 +1,12 @@
+package org.jboss.test.ws.wsit.rm;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://calculator.me.org/", portName =
"CalculatorWS")
+public interface CalcIF
+{
+ @WebMethod(operationName = "add")
+ public int add(@WebParam(name = "i") int i, @WebParam(name = "j")
int j);
+}
Property changes on:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
===================================================================
---
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-20
13:17:47 UTC (rev 5370)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-20
13:59:15 UTC (rev 5371)
@@ -39,7 +39,8 @@
* @author User
*/
@WebService(targetNamespace = "http://calculator.me.org/")
-public class CalculatorWS {
+public class CalculatorWS implements CalcIF
+{
/**
* Web service operation
Added:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
(rev 0)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java 2007-12-20
13:59:15 UTC (rev 5371)
@@ -0,0 +1,35 @@
+package org.jboss.test.ws.wsit.rm;
+
+import junit.framework.Test;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+import java.net.URL;
+
+
+public class RMTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(RMTestCase.class, "wsit-rm.war");
+ }
+
+ public void testRMExchange() throws Exception
+ {
+ Service service = Service.create(
+ new URL("http://"+getServerHost()+":8080/wsit-rm?wsdl"),
+ new
QName("http://calculator.me.org/","CalculatorWSService")
+ );
+
+ CalcIF port = service.getPort(new
QName("http://calculator.me.org/","CalculatorWSPort"), CalcIF.class);
+
+ int i = 10;
+ int j = 20;
+
+ int result = port.add(i, j);
+ assertTrue(result == 30);
+ }
+}
+
Property changes on:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF