Author: richard_opalka
Date: 2007-06-27 17:12:33 -0400 (Wed, 27 Jun 2007)
New Revision: 3746
Added:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXService.java
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXServiceImpl.java
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXTestCase.java
Log:
refactoring
Added:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXService.java
===================================================================
---
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXService.java
(rev 0)
+++
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXService.java 2007-06-27
21:12:33 UTC (rev 3746)
@@ -0,0 +1,42 @@
+package org.jboss.test.ws.jaxws.samples.wsrx;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.1
+ *
+ */
+@WebService(name = "RXService", targetNamespace =
"http://www.jboss.org/wsrx/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface RXService {
+
+
+ /**
+ *
+ * @param p0
+ */
+ @WebMethod
+ public void oneWay(
+ @WebParam(name = "p0", partName = "p0")
+ String p0);
+
+ /**
+ *
+ * @param p0
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(name = "response", partName = "response")
+ public String reqResp(
+ @WebParam(name = "p0", partName = "p0")
+ String p0);
+
+}
Property changes on:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXServiceImpl.java
===================================================================
---
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXServiceImpl.java
(rev 0)
+++
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXServiceImpl.java 2007-06-27
21:12:33 UTC (rev 3746)
@@ -0,0 +1,39 @@
+package org.jboss.test.ws.jaxws.samples.wsrx;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Simple WS RX service
+ *
+ * @author opalka_richard(a)gmail.com
+ * @since 26-Jun-2007
+ */
+@WebService(name = "RXService", targetNamespace =
"http://www.jboss.org/wsrx/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class RXServiceImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(RXServiceImpl.class);
+
+ @WebMethod(operationName = "reqResp")
+ @WebResult(targetNamespace = "http://www.jboss.org/wsrx/", partName =
"response")
+ public String reqResp(@WebParam(name = "p0") String p)
+ {
+ log.info("echo: " + p);
+ return p;
+ }
+
+ @Oneway
+ @WebMethod(operationName = "oneWay")
+ public void oneWay(@WebParam(name = "p0") String p)
+ {
+ log.info("ping: " + p);
+ }
+}
Property changes on:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXTestCase.java
===================================================================
---
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXTestCase.java
(rev 0)
+++
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXTestCase.java 2007-06-27
21:12:33 UTC (rev 3746)
@@ -0,0 +1,59 @@
+package org.jboss.test.ws.jaxws.samples.wsrx;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * Test the WS RX in order and exactly once sequence types
+ *
+ * @author opalka_richard(a)gmail.com
+ * @since 26-Jun-2007
+ */
+public class RXTestCase extends JBossWSTest
+{
+ private String targetNS = "http://www.jboss.org/wsrx/";
+
+ private static RXService port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(RXTestCase.class,
"jaxws-samples-wsrx.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "RXService");
+ URL wsdlURL = new
File("resources/jaxws/samples/wsrx/META-INF/wsdl/rxservice.wsdl").toURL();
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(RXService.class);
+
+ ((BindingProvider)port).getRequestContext().put(
+ BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://"+getServerHost()+":8080/" // TODO: it seems
that this URL is incorrect - debug it!
+ );
+ }
+ }
+
+ public void testOneWay() throws Exception {
+ System.out.println("FIXME: write RX one way usecase test");
+ //port.oneWay("Hello world!");
+ }
+
+ public void testReqResp() throws Exception {
+ System.out.println("FIXME: write RX req resp usecase test");
+ //System.out.println(port.reqResp("Hello world!"));
+ }
+
+}
Property changes on:
branches/ropalka/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsrx/RXTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Show replies by date