[Jboss-cvs] JBossAS SVN: r55921 - branches/Branch_4_0/testsuite/src/main/org/jboss/test/webservice/jbws425

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 14 17:33:50 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-08-14 17:33:48 -0400 (Mon, 14 Aug 2006)
New Revision: 55921

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

Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java	2006-08-14 20:52:54 UTC (rev 55920)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/webservice/jbws425/JBWS425TestCase.java	2006-08-14 21:33:48 UTC (rev 55921)
@@ -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