[jboss-cvs] JBossAS SVN: r65877 - branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 5 05:47:53 EDT 2007
Author: wolfc
Date: 2007-10-05 05:47:53 -0400 (Fri, 05 Oct 2007)
New Revision: 65877
Modified:
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java
Log:
EJBTHREE-757: testing WebServiceContext via JAX-RPC
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-10-05 09:44:58 UTC (rev 65876)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java 2007-10-05 09:47:53 UTC (rev 65877)
@@ -103,6 +103,30 @@
}
}
+ public void testClientAccessWSThroughRPC() 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 URL("http://localhost:8080/jaxws-context/testService?wsdl");
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestService");
+ ServiceFactory factory = ServiceFactory.newInstance();
+ javax.xml.rpc.Service service = factory.createService(wsdlURL, qname);
+ EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
+
+ String helloWorld = "Hello world!";
+ try
+ {
+ Object retObj = port.echoWS(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ catch(RemoteException e)
+ {
+ assertNotNull(e.getCause());
+ assertTrue(e.getCause() instanceof javax.xml.rpc.soap.SOAPFaultException);
+ assertEquals("java.lang.IllegalStateException: No message context found", e.getCause().getMessage());
+ showKnownIssue("EJBTHREE-757");
+ }
+ }
+
public void testRemoteInterface() throws Exception
{
RemoteInterface bean = (RemoteInterface) getInitialContext().lookup("EndpointEJB/remote");
More information about the jboss-cvs-commits
mailing list