[Jboss-cvs] JBossAS SVN: r55937 - trunk/testsuite/src/main/org/jboss/test/webservice/jbws425

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 15 05:52:23 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-08-15 05:52:21 -0400 (Tue, 15 Aug 2006)
New Revision: 55937

Modified:
   trunk/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java
Log:
[JBWS-983] Configure SOAPAction on the Call object

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java	2006-08-15 09:46:28 UTC (rev 55936)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java	2006-08-15 09:52:21 UTC (rev 55937)
@@ -25,7 +25,10 @@
 import java.net.URL;
 
 import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
 import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.MimeHeaders;
 import javax.xml.soap.SOAPConnection;
@@ -72,12 +75,26 @@
       }
    }
 
-   public void testClientAccess() throws Exception
+   public void testClientActionFromWSDL() throws Exception
    {
       String soapAction = endpoint.hello("Hello Server");
       assertEquals(SOAP_ACTION, soapAction);
    }
 
+   // [JBWS-983] Configure SOAPAction on the Call object
+   public void testCallActionFromProperty() throws Exception
+   {
+	   ServiceFactory factory = ServiceFactory.newInstance();
+      URL wsdlUrl = new URL("http://" + getServerHost() + ":8080/ws4ee-jbws425?wsdl");
+      QName serviceName = new QName("http://org.jboss.test.webservice/jbws425", "HelloService");
+      QName portName = new QName("http://org.jboss.test.webservice/jbws425", "HelloPort");
+      Service service = factory.createService(wsdlUrl, serviceName);
+      Call call = service.createCall(portName, "hello");
+      call.setProperty(Call.SOAPACTION_URI_PROPERTY, "uri:property-action");
+      String soapAction = (String)call.invoke(new Object[] {"Hello Server"});
+      assertEquals("\"uri:property-action\"", soapAction);
+   }
+
    public void testMessageAccess() throws Exception
    {
       String reqEnv =




More information about the jboss-cvs-commits mailing list