[jboss-cvs] JBossAS SVN: r82342 - in projects/ejb3/trunk/testsuite/src/test: java/org/jboss/ejb3/test/jaxws/unit and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 17 09:01:53 EST 2008


Author: wolfc
Date: 2008-12-17 09:01:53 -0500 (Wed, 17 Dec 2008)
New Revision: 82342

Modified:
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/EndpointEJB.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java
   projects/ejb3/trunk/testsuite/src/test/resources/test/jaxws/TestService.wsdl
Log:
EJBTHREE-1241: removed the usage of JaxRPC

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/EndpointEJB.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/EndpointEJB.java	2008-12-17 12:10:42 UTC (rev 82341)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/EndpointEJB.java	2008-12-17 14:01:53 UTC (rev 82342)
@@ -24,7 +24,6 @@
 // $Id: EndpointEJB.java 1874 2007-01-09 14:28:41Z thomas.diesler at jboss.com $
 
 import javax.annotation.Resource;
-import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
 import javax.jws.WebService;
 import javax.xml.soap.SOAPElement;
@@ -40,14 +39,11 @@
    @Resource
    WebServiceContext wsCtx;
 
-   @Resource
-   SessionContext ejbCtx;
-
    public String echo(String input)
    {
       try
       {
-         String retValue = getValueJAXWS() + "/" + getValueJAXRPC();
+         String retValue = getValueJAXWS();
          return retValue;
       }
       catch (SOAPException ex)
@@ -64,13 +60,4 @@
       soapElement = (SOAPElement)soapElement.getChildElements().next();
       return soapElement.getValue();
    }
-
-   private String getValueJAXRPC() throws SOAPException
-   {
-      javax.xml.rpc.handler.soap.SOAPMessageContext jaxrpcContext = (javax.xml.rpc.handler.soap.SOAPMessageContext)ejbCtx.getMessageContext();
-      SOAPMessage soapMessage = jaxrpcContext.getMessage();
-      SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
-      soapElement = (SOAPElement)soapElement.getChildElements().next();
-      return soapElement.getValue();
-   }
 }

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java	2008-12-17 12:10:42 UTC (rev 82341)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jaxws/unit/ContextEJBTestCase.java	2008-12-17 14:01:53 UTC (rev 82342)
@@ -23,15 +23,17 @@
 
 // $Id: ContextEJBTestCase.java 1874 2007-01-09 14:28:41Z thomas.diesler at jboss.com $
 
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
 import junit.framework.Test;
+
 import org.jboss.ejb3.test.jaxws.EndpointInterface;
 import org.jboss.test.JBossTestCase;
 
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.File;
-import java.net.URL;
-
 /**
  * Test JAXWS WebServiceContext
  *
@@ -54,13 +56,13 @@
    public void testClientAccess() 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();
+      URL wsdlURL = new File("../src/test/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!";
       Object retObj = port.echo(helloWorld);
-      assertEquals(helloWorld + "/" + helloWorld, retObj);
+      assertEquals(helloWorld, retObj);
    }
 }

Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/jaxws/TestService.wsdl
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/jaxws/TestService.wsdl	2008-12-17 12:10:42 UTC (rev 82341)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/jaxws/TestService.wsdl	2008-12-17 14:01:53 UTC (rev 82342)
@@ -32,7 +32,7 @@
     <!--
       <soap:address location="http://@jbosstest.host.name@:8080/jaxws-context"/>
     -->
-      <soap:address location="http://localhost:8080/jaxws-context"/>
+      <soap:address location="http://localhost:8080/jaxws-context/EndpointEJB"/>
     </port>
   </service>
 </definitions>




More information about the jboss-cvs-commits mailing list