[jboss-cvs] JBossAS SVN: r61030 - in branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws: unit and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 1 08:26:19 EST 2007
Author: wolfc
Date: 2007-03-01 08:26:18 -0500 (Thu, 01 Mar 2007)
New Revision: 61030
Modified:
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointEJB.java
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointInterface.java
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java
Log:
EJBTHREE-757: modified unit test
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointEJB.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointEJB.java 2007-03-01 13:00:21 UTC (rev 61029)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointEJB.java 2007-03-01 13:26:18 UTC (rev 61030)
@@ -46,11 +46,11 @@
@Resource
SessionContext ejbCtx;
- public String echo(String input)
+ public String echoWS(String input)
{
try
{
- String retValue = getValueJAXWS() + "/" + getValueJAXRPC();
+ String retValue = getValueJAXWS();
return retValue;
}
catch (SOAPException ex)
@@ -59,6 +59,19 @@
}
}
+ public String echoRPC(String input)
+ {
+ try
+ {
+ String retValue = getValueJAXRPC();
+ return retValue;
+ }
+ catch (SOAPException ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
private String getValueJAXWS() throws SOAPException
{
if(wsCtx == null)
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointInterface.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointInterface.java 2007-03-01 13:00:21 UTC (rev 61029)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/EndpointInterface.java 2007-03-01 13:26:18 UTC (rev 61030)
@@ -31,5 +31,6 @@
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface extends Remote
{
- String echo(String input) throws RemoteException;
+ String echoWS(String input) throws RemoteException;
+ String echoRPC(String input) throws RemoteException;
}
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java 2007-03-01 13:00:21 UTC (rev 61029)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java 2007-03-01 13:26:18 UTC (rev 61030)
@@ -53,7 +53,7 @@
return getDeploySetup(ContextEJBTestCase.class, "jaxws-context.jar");
}
- public void testClientAccess() throws Exception
+ public void testClientAccessWS() throws Exception
{
log.info("In case of connection exception, there is a host name defined in the wsdl, which used to be '@jbosstest.host.name@'");
URL wsdlURL = new File("../src/resources/test/jaxws/TestService.wsdl").toURL();
@@ -64,8 +64,8 @@
String helloWorld = "Hello world!";
try
{
- Object retObj = port.echo(helloWorld);
- assertEquals(helloWorld + "/" + helloWorld, retObj);
+ Object retObj = port.echoWS(helloWorld);
+ assertEquals(helloWorld, retObj);
}
catch(SOAPFaultException e)
{
@@ -73,4 +73,25 @@
System.err.println("EJBTHREE-900");
}
}
+
+ public void testClientAccessRPC() throws Exception
+ {
+ log.info("In case of connection exception, there is a host name defined in the wsdl, which used to be '@jbosstest.host.name@'");
+ URL wsdlURL = new File("../src/resources/test/jaxws/TestService.wsdl").toURL();
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestService");
+ Service service = Service.create(wsdlURL, qname);
+ EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
+
+ String helloWorld = "Hello world!";
+ try
+ {
+ Object retObj = port.echoRPC(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ catch(SOAPFaultException e)
+ {
+ assertEquals("java.lang.IllegalStateException: No message context found", e.getMessage());
+ System.err.println("EJBTHREE-757");
+ }
+ }
}
More information about the jboss-cvs-commits
mailing list