You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ng...@apache.org on 2006/12/07 06:51:35 UTC

svn commit: r483349 - in /webservices/axis2/trunk/java/modules/jaxws: ./ src/org/apache/axis2/jaxws/ src/org/apache/axis2/jaxws/client/proxy/ src/org/apache/axis2/jaxws/core/controller/ test-resources/wsdl/ test/org/apache/axis2/jaxws/client/ test/org/...

Author: ngallardo
Date: Wed Dec  6 21:51:33 2006
New Revision: 483349

URL: http://svn.apache.org/viewvc?view=rev&rev=483349
Log:
AXIS2-1822

-Fixed the proxy client so that it's reading the SOAPAction from the annotation info.
-Added structure for a dispatch/proxy SOAPAction testcase 

Added:
    webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/SOAPActionTest.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStore.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStoreService.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/SOAPActionTest.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/services.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/maven.xml
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/maven.xml?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/maven.xml Wed Dec  6 21:51:33 2006
@@ -122,7 +122,7 @@
     	    <jvmarg line="${maven.junit.jvmargs}"/>
     	    <classpath refid="maven.dependency.classpath"/>
     	    <classpath location="${compiled.classes.dir}"/>
-    	   	<arg line="-d ${schema.generated.src.dir} -wsdl ${wsdl.source.dir}/async_doclitwr.wsdl"/>
+    	   	<arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/async_doclitwr.wsdl"/>
     	</java>
 
     	<ant:echo>Generating java from FaultyWebService.wsdl</ant:echo>
@@ -212,6 +212,14 @@
     	    <classpath location="${compiled.classes.dir}"/>
     	    <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/shapes.wsdl"/>
     	</java>
+    	
+    	<ant:echo>Generating java from SOAPActionTest.wsdl</ant:echo>
+    	<java classname="com.sun.tools.xjc.Driver" fork="true"> 
+    	    <jvmarg line="${maven.junit.jvmargs}"/>
+    	    <classpath refid="maven.dependency.classpath"/>
+    	    <classpath location="${compiled.classes.dir}"/>
+    	    <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/SOAPActionTest.wsdl"/>
+    	</java>
     	<!-- Compile the generated classes -->
     	<ant:echo>Compiling generated schema</ant:echo>
         <javac destdir="${schema.generated.classes.dir}" srcdir="${schema.generated.src.dir}">
@@ -369,6 +377,15 @@
 				<ant:include name="org/apache/axis2/jaxws/proxy/soap12/**"/>
 			</ant:fileset>
 			<ant:fileset dir="test/org/apache/axis2/jaxws/proxy/soap12/server">
+		        <ant:include name="META-INF/**"/>
+			</ant:fileset>
+		</ant:copy>
+		
+		<ant:copy toDir="target/test-classes/services/BookStoreService/">
+			<ant:fileset dir="target/test-classes">
+				<ant:include name="org/apache/axis2/jaxws/client/soapaction/**"/>
+			</ant:fileset>
+			<ant:fileset dir="test/org/apache/axis2/jaxws/client/soapaction/server">
 		        <ant:include name="META-INF/**"/>
 			</ant:fileset>
 		</ant:copy>

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java Wed Dec  6 21:51:33 2006
@@ -54,8 +54,8 @@
         
         // Setting standard property defaults for the request context
         requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, new Boolean(false));
-        requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean(false));
-       
+        requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean(true));
+        
         // Set the endpoint address
         String endpointAddress = endpointDesc.getEndpointAddress();
         if (endpointAddress != null) {

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java Wed Dec  6 21:51:33 2006
@@ -24,7 +24,6 @@
 import java.util.concurrent.Future;
 
 import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
 import javax.xml.ws.AsyncHandler;
 import javax.xml.ws.Binding;
 import javax.xml.ws.Response;
@@ -41,12 +40,7 @@
 import org.apache.axis2.jaxws.description.OperationDescription;
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.i18n.Messages;
-import org.apache.axis2.jaxws.marshaller.MethodMarshaller;
-import org.apache.axis2.jaxws.marshaller.factory.MethodMarshallerFactory;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
-import org.apache.axis2.jaxws.message.Protocol;
-import org.apache.axis2.jaxws.registry.FactoryRegistry;
 import org.apache.axis2.jaxws.spi.ServiceDelegate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -103,8 +97,7 @@
 	/* (non-Javadoc)
 	 * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
 	 * 
-	 * Invoke method checks to see if BindingProvider method was invoked by client if yes, it uses reflection and invokes the BindingProvider method.
-	 * If SEI method was called then it delegates to InvokeSEIMethod().
+     * Invokes the method that was called on the java.lang.reflect.Proxy instance.
 	 */
 	public Object invoke(Object proxy, Method method, Object[] args)
 			throws Throwable {
@@ -142,38 +135,43 @@
 			if(isMethodExcluded(operationDesc)){
 				throw ExceptionFactory.makeWebServiceException("Invalid Method Call, Method "+method.getName() + " has been excluded using @webMethod annotation");
 			}
-			return InvokeSEIMethod(method, args);
+			return invokeSEIMethod(method, args);
 		}
 	}
 	
-	/**
-	 * InvokeSEIMethod invokes Axis engine using methods on InvocationController. Create request Invocation context, instantiates AxisInvocationController and 
-	 * runs invoke.
-	 * 
+	/*
+     * Performs the invocation of the method defined on the Service Endpoint
+     * Interface.  
 	 */
-	private Object InvokeSEIMethod(Method method, Object[] args)throws Throwable{
+    private Object invokeSEIMethod(Method method, Object[] args)throws Throwable{
 		if (log.isDebugEnabled()) {
             log.debug("Attempting to Invoke SEI Method "+ method.getName());
         }
 		
-		//initialize();
-        
         OperationDescription operationDesc = endpointDesc.getEndpointInterfaceDescription().getOperation(method);
         
+        // Create and configure the request MessageContext
 		InvocationContext requestIC = InvocationContextFactory.createInvocationContext(null);
-		MessageContext requestContext = createRequest(method, args);
-		//Enable MTOM on the Message if the property was
-        //set on the SOAPBinding.
+		MessageContext request = createRequest(method, args);
+        request.setOperationDescription(operationDesc);
+        
+        // Enable MTOM on the Message if the property was set on the SOAPBinding.
         Binding bnd = getBinding();
         if (bnd != null && bnd instanceof SOAPBinding) {
             javax.xml.ws.soap.SOAPBinding soapBnd = (javax.xml.ws.soap.SOAPBinding) bnd;
             if (soapBnd.isMTOMEnabled()) {
-                Message requestMsg = requestContext.getMessage();
+                Message requestMsg = request.getMessage();
                 requestMsg.setMTOMEnabled(true);
             }
         }
-        requestContext.setOperationDescription(operationDesc);
-		requestIC.setRequestMessageContext(requestContext);
+        
+        // Configure the SOAPAction.
+        String action = operationDesc.getAction();
+        if (action != null) {
+            getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, action);
+        }
+        
+		requestIC.setRequestMessageContext(request);
 		InvocationController controller = new AxisInvocationController();
 		requestIC.setServiceClient(serviceDelegate.getServiceClient(endpointDesc.getPortQName()));
 		
@@ -186,7 +184,7 @@
 			controller.invokeOneWay(requestIC);
 			
             //Check to see if we need to maintain session state
-            if (requestContext.isMaintainSession()) {
+            if (request.isMaintainSession()) {
                 //TODO: Need to figure out a cleaner way to make this call. 
                 setupSessionContext(requestIC.getServiceClient().getServiceContext().getProperties());
             }
@@ -215,7 +213,7 @@
 	        Future<?> future = controller.invokeAsync(requestIC, asyncHandler);
 	        
             //Check to see if we need to maintain session state
-            if (requestContext.isMaintainSession()) {
+            if (request.isMaintainSession()) {
                 //TODO: Need to figure out a cleaner way to make this call. 
                 setupSessionContext(requestIC.getServiceClient().getServiceContext().getProperties());
             }
@@ -235,7 +233,7 @@
 			Response response = controller.invokeAsync(requestIC);
 			
             //Check to see if we need to maintain session state
-            if (requestContext.isMaintainSession()) {
+            if (request.isMaintainSession()) {
                 //TODO: Need to figure out a cleaner way to make this call. 
                 setupSessionContext(requestIC.getServiceClient().getServiceContext().getProperties());
             }
@@ -247,7 +245,7 @@
 			InvocationContext responseIC = controller.invoke(requestIC);
 		
             //Check to see if we need to maintain session state
-            if (requestContext.isMaintainSession()) {
+            if (request.isMaintainSession()) {
                 //TODO: Need to figure out a cleaner way to make this call. 
                 setupSessionContext(requestIC.getServiceClient().getServiceContext().getProperties());
             }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java Wed Dec  6 21:51:33 2006
@@ -77,6 +77,7 @@
 public class AxisInvocationController extends InvocationController {
     
     private static Log log = LogFactory.getLog(AxisInvocationController.class);
+    private static boolean debug = log.isDebugEnabled();
     
     /*
      *  (non-Javadoc)
@@ -426,15 +427,18 @@
      * @return
      */
     private String configureSOAPAction(MessageContext ctx) {
-        //TODO: Need to get SOAPAction information from the WSDL config
-        
-        //TODO: Need to determine what the story is with using the SOAPAction
-        // declared in the WSDL.  If the property says not to use it, but it's
-        // listed in the WSDL, do we still include it?  Do we include it if
-        // the property is not even set?
         Boolean useSoapAction = (Boolean) ctx.getProperties().get(BindingProvider.SOAPACTION_USE_PROPERTY);
         if(useSoapAction != null && useSoapAction.booleanValue()){
-            return (String) ctx.getProperties().get(BindingProvider.SOAPACTION_URI_PROPERTY);
+            String action = (String) ctx.getProperties().get(BindingProvider.SOAPACTION_URI_PROPERTY);
+            if (debug) {
+                log.debug("Setting SOAPAction to:" + action);
+            }
+            return action;
+        }
+        else {
+            if (debug) {
+                log.debug("SOAPAction usage was disabled");
+            }
         }
         
         return null;

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java Wed Dec  6 21:51:33 2006
@@ -90,7 +90,6 @@
         // TODO: Place-holder for running the JAX-WS request handler chain
         
         prepareRequest(request);
-        
         response = doInvoke(request);
         prepareResponse(response);
         ic.setResponseMessageContext(response);

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/SOAPActionTest.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/SOAPActionTest.wsdl?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/SOAPActionTest.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/SOAPActionTest.wsdl Wed Dec  6 21:51:33 2006
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="http://jaxws.axis2.apache.org/client/soapaction" 
+      xmlns:tns="http://jaxws.axis2.apache.org/client/soapaction"
+      xmlns="http://schemas.xmlsoap.org/wsdl/" 
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+   <types>
+      <xsd:schema targetNamespace="http://jaxws.axis2.apache.org/client/soapaction"
+         xmlns:tns="http://jaxws.axis2.apache.org/client/soapaction"
+         xmlns="http://www.w3.org/2001/XMLSchema"
+         elementFormDefault="qualified">
+         <complexType name="GetPriceType">
+            <sequence>
+               <element name="item" type="xsd:string"/>
+            </sequence>
+         </complexType>
+         <complexType name="GetPriceResponseType">
+            <sequence>
+               <element name="price" type="xsd:float"/>
+            </sequence>
+         </complexType>
+
+         <element name="getPrice" type="tns:GetPriceType"/>
+         <element name="getPriceResponse" type="tns:GetPriceResponseType"/>
+   
+         <element name="getPriceWithAction" type="tns:GetPriceType"/>
+         <element name="getPriceWithActionResponse" type="tns:GetPriceResponseType"/>
+
+         <element name="item" type="xsd:string"/>
+         <element name="inventory" type="xsd:int"/>
+
+         <element name="itemWithAction" type="xsd:string"/>
+         <element name="inventoryWithAction" type="xsd:int"/>
+      </xsd:schema>
+   </types>
+
+   <message name="getPriceRequest">
+      <part name="parameters" element="tns:getPrice"/>
+   </message>
+
+   <message name="getPriceResponse">
+      <part name="parameters" element="tns:getPriceResponse"/>
+   </message>
+  
+   <message name="getPriceWithActionRequest">
+      <part name="parameters" element="tns:getPriceWithAction"/>
+   </message>
+
+   <message name="getPriceWithActionResponse">
+      <part name="parameters" element="tns:getPriceWithActionResponse"/>
+   </message>
+ 
+   <message name="getInventoryRequest">
+      <part name="item" element="tns:item"/>
+   </message>
+   
+   <message name="getInventoryResponse">
+      <part name="inventory" element="tns:inventory"/>
+   </message>
+
+   <message name="getInventoryWithActionRequest">
+      <part name="item" element="tns:itemWithAction"/>
+   </message>
+
+   <message name="getInventoryWithActionResponse">
+      <part name="inventory" element="tns:inventoryWithAction"/>
+   </message>
+
+   <portType name="BookStore">
+      <operation name="getPrice">
+         <input message="tns:getPriceRequest" />
+         <output message="tns:getPriceResponse" />
+      </operation>
+      <operation name="getPriceWithAction">
+         <input message="tns:getPriceWithActionRequest" />
+         <output message="tns:getPriceWithActionResponse" />
+      </operation>
+      <operation name="getInventory">
+         <input message="tns:getInventoryRequest" />
+         <output message="tns:getInventoryResponse" />
+      </operation>
+      <operation name="getInventoryWithAction">
+         <input message="tns:getInventoryWithActionRequest" />
+         <output message="tns:getInventoryWithActionResponse" />
+      </operation>
+   </portType>
+
+   <binding name="BookStoreBinding" type="tns:BookStore">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="getPrice">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getPriceWithAction">
+         <soap:operation soapAction="http://jaxws.axis2.apache.org/client/soapaction/getPrice"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getInventory">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getInventoryWithAction">
+         <soap:operation soapAction="http://jaxws.axis2.apache.org/client/soapaction/getInventory"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+   </binding>
+
+   <service name="BookStoreService">
+      <port binding="tns:BookStoreBinding" name="BookStorePort">
+         <soap:address location="http://localhost:8080/axis2/services/BookStoreService"/>
+      </port>
+   </service>
+</definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java Wed Dec  6 21:51:33 2006
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *      
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.client;
+
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service.Mode;
+
+import org.apache.axis2.jaxws.BindingProvider;
+import org.apache.axis2.jaxws.client.soapaction.BookStoreService;
+import org.apache.axis2.jaxws.client.soapaction.GetPriceResponseType;
+import org.apache.axis2.jaxws.client.soapaction.GetPriceType;
+import org.apache.axis2.jaxws.client.soapaction.ObjectFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * A suite of SOAPAction related tests for the dispatch client 
+ */
+public class DispatchSoapActionTests extends TestCase {
+    
+    private static final String targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction";
+    private static final String portName = "BookStorePort";
+        
+    /**
+     * Invoke an operation this is defined in the WSDL as having a SOAPAction.
+     * Since this is a Dispatch client, we'll need to specify that SOAPAction
+     * ourselves for the invoke.
+     */
+    public void testSendRequestWithSoapAction() throws Exception {
+        System.out.println("----------------------------------");
+        System.out.println("test: " + getName());
+        
+        BookStoreService service = new BookStoreService();
+        
+        JAXBContext ctx = JAXBContext.newInstance("org.apache.axis2.jaxws.client.soapaction");
+        Dispatch dispatch = service.createDispatch(new QName(targetNamespace, portName), 
+                ctx, Mode.PAYLOAD);
+        
+        Map<String, Object> requestCtx = dispatch.getRequestContext();
+        requestCtx.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
+        requestCtx.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://jaxws.axis2.apache.org/client/soapaction/getPrice");
+        
+        ObjectFactory of = new ObjectFactory();
+        GetPriceType gpt = of.createGetPriceType();
+        gpt.setItem("TEST");
+        
+        // The element that is sent should be <getPriceWithAction>
+        // so it will resolve to the getPriceWithAction operation
+        // defined in the WSDL.
+        JAXBElement<GetPriceType> getPrice = of.createGetPriceWithAction(gpt);
+        JAXBElement<GetPriceResponseType> getPriceResponse = (JAXBElement<GetPriceResponseType>) dispatch.invoke(getPrice);
+        
+        GetPriceResponseType value = getPriceResponse.getValue();
+        assertNotNull("The response was null", value);
+        
+        float price = value.getPrice();
+        System.out.println("return value [" + price + "]");
+        //assertTrue("The return value was invalid", price > 0);
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java Wed Dec  6 21:51:33 2006
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *      
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.client;
+
+import org.apache.axis2.jaxws.client.soapaction.BookStore;
+import org.apache.axis2.jaxws.client.soapaction.BookStoreService;
+
+import junit.framework.TestCase;
+
+/**
+ * A suite of SOAPAction related tests for the dynamic proxy client 
+ */
+public class ProxySoapActionTests extends TestCase {
+    
+    public ProxySoapActionTests(String name) {
+        super(name);
+    }
+    
+    public void testSendRequestWithSoapAction() {
+        System.out.println("----------------------------------");
+        System.out.println("test: " + getName());
+
+        BookStoreService service = new BookStoreService();
+        BookStore bs = service.getBookStorePort();
+        
+        float price = bs.getPriceWithAction("test item");
+        System.out.println("return value [" + price + "]");
+        //assertTrue("The return value was invalid", price > 0);
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStore.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStore.java?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStore.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStore.java Wed Dec  6 21:51:33 2006
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *      
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.client.soapaction;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "BookStore", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction")
+public interface BookStore {
+
+    /**
+     * 
+     * @param item
+     * @return
+     *     returns float
+     */
+    @WebMethod
+    @WebResult(name = "price", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction")
+    @RequestWrapper(localName = "getPrice", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", className = "org.apache.axis2.jaxws.client.soapaction.GetPriceType")
+    @ResponseWrapper(localName = "getPriceResponse", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", className = "org.apache.axis2.jaxws.client.soapaction.GetPriceResponseType")
+    public float getPrice(
+        @WebParam(name = "item", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction")
+        String item);
+
+    /**
+     * 
+     * @param item
+     * @return
+     *     returns float
+     */
+    @WebMethod(action = "http://jaxws.axis2.apache.org/client/soapaction/getPrice")
+    @WebResult(name = "price", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction")
+    @RequestWrapper(localName = "getPriceWithAction", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", className = "org.apache.axis2.jaxws.client.soapaction.GetPriceType")
+    @ResponseWrapper(localName = "getPriceWithActionResponse", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", className = "org.apache.axis2.jaxws.client.soapaction.GetPriceResponseType")
+    public float getPriceWithAction(
+        @WebParam(name = "item", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction")
+        String item);
+
+    /**
+     * 
+     * @param item
+     * @return
+     *     returns int
+     */
+    @WebMethod
+    @WebResult(name = "inventory", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", partName = "inventory")
+    @SOAPBinding(parameterStyle = ParameterStyle.BARE)
+    public int getInventory(
+        @WebParam(name = "item", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", partName = "item")
+        String item);
+
+    /**
+     * 
+     * @param item
+     * @return
+     *     returns int
+     */
+    @WebMethod(action = "http://jaxws.axis2.apache.org/client/soapaction/getInventory")
+    @WebResult(name = "inventoryWithAction", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", partName = "inventory")
+    @SOAPBinding(parameterStyle = ParameterStyle.BARE)
+    public int getInventoryWithAction(
+        @WebParam(name = "itemWithAction", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", partName = "item")
+        String item);
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStoreService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStoreService.java?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStoreService.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/BookStoreService.java Wed Dec  6 21:51:33 2006
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *      
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.client.soapaction;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+@WebServiceClient(name = "BookStoreService", targetNamespace = "http://jaxws.axis2.apache.org/client/soapaction", wsdlLocation = "SOAPActionTest.wsdl")
+public class BookStoreService
+    extends Service
+{
+
+    private final static URL BOOKSTORESERVICE_WSDL_LOCATION;
+
+    static {
+        URL url = null;
+        try {
+            url = new URL("file:./target/test-classes/services/BookStoreService/META-INF/SOAPActionTest.wsdl");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        BOOKSTORESERVICE_WSDL_LOCATION = url;
+    }
+
+    public BookStoreService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public BookStoreService() {
+        super(BOOKSTORESERVICE_WSDL_LOCATION, new QName("http://jaxws.axis2.apache.org/client/soapaction", "BookStoreService"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns BookStore
+     */
+    @WebEndpoint(name = "BookStorePort")
+    public BookStore getBookStorePort() {
+        return (BookStore)super.getPort(new QName("http://jaxws.axis2.apache.org/client/soapaction", "BookStorePort"), BookStore.class);
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/SOAPActionTest.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/SOAPActionTest.wsdl?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/SOAPActionTest.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/SOAPActionTest.wsdl Wed Dec  6 21:51:33 2006
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="http://jaxws.axis2.apache.org/client/soapaction" 
+      xmlns:tns="http://jaxws.axis2.apache.org/client/soapaction"
+      xmlns="http://schemas.xmlsoap.org/wsdl/" 
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+   <types>
+      <xsd:schema targetNamespace="http://jaxws.axis2.apache.org/client/soapaction"
+         xmlns:tns="http://jaxws.axis2.apache.org/client/soapaction"
+         xmlns="http://www.w3.org/2001/XMLSchema"
+         elementFormDefault="qualified">
+         <complexType name="GetPriceType">
+            <sequence>
+               <element name="item" type="xsd:string"/>
+            </sequence>
+         </complexType>
+         <complexType name="GetPriceResponseType">
+            <sequence>
+               <element name="price" type="xsd:float"/>
+            </sequence>
+         </complexType>
+
+         <element name="getPrice" type="tns:GetPriceType"/>
+         <element name="getPriceResponse" type="tns:GetPriceResponseType"/>
+   
+         <element name="getPriceWithAction" type="tns:GetPriceType"/>
+         <element name="getPriceWithActionResponse" type="tns:GetPriceResponseType"/>
+
+         <element name="item" type="xsd:string"/>
+         <element name="inventory" type="xsd:int"/>
+
+         <element name="itemWithAction" type="xsd:string"/>
+         <element name="inventoryWithAction" type="xsd:int"/>
+      </xsd:schema>
+   </types>
+
+   <message name="getPriceRequest">
+      <part name="parameters" element="tns:getPrice"/>
+   </message>
+
+   <message name="getPriceResponse">
+      <part name="parameters" element="tns:getPriceResponse"/>
+   </message>
+  
+   <message name="getPriceWithActionRequest">
+      <part name="parameters" element="tns:getPriceWithAction"/>
+   </message>
+
+   <message name="getPriceWithActionResponse">
+      <part name="parameters" element="tns:getPriceWithActionResponse"/>
+   </message>
+ 
+   <message name="getInventoryRequest">
+      <part name="item" element="tns:item"/>
+   </message>
+   
+   <message name="getInventoryResponse">
+      <part name="inventory" element="tns:inventory"/>
+   </message>
+
+   <message name="getInventoryWithActionRequest">
+      <part name="item" element="tns:itemWithAction"/>
+   </message>
+
+   <message name="getInventoryWithActionResponse">
+      <part name="inventory" element="tns:inventoryWithAction"/>
+   </message>
+
+   <portType name="BookStore">
+      <operation name="getPrice">
+         <input message="tns:getPriceRequest" />
+         <output message="tns:getPriceResponse" />
+      </operation>
+      <operation name="getPriceWithAction">
+         <input message="tns:getPriceWithActionRequest" />
+         <output message="tns:getPriceWithActionResponse" />
+      </operation>
+      <operation name="getInventory">
+         <input message="tns:getInventoryRequest" />
+         <output message="tns:getInventoryResponse" />
+      </operation>
+      <operation name="getInventoryWithAction">
+         <input message="tns:getInventoryWithActionRequest" />
+         <output message="tns:getInventoryWithActionResponse" />
+      </operation>
+   </portType>
+
+   <binding name="BookStoreBinding" type="tns:BookStore">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="getPrice">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getPriceWithAction">
+         <soap:operation soapAction="http://jaxws.axis2.apache.org/client/soapaction/getPrice"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getInventory">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="getInventoryWithAction">
+         <soap:operation soapAction="http://jaxws.axis2.apache.org/client/soapaction/getInventory"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+   </binding>
+
+   <service name="BookStoreService">
+      <port binding="tns:BookStoreBinding" name="BookStorePort">
+         <soap:address location="http://localhost:8080/axis2/services/BookStoreService"/>
+      </port>
+   </service>
+</definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/services.xml?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/META-INF/services.xml Wed Dec  6 21:51:33 2006
@@ -0,0 +1,8 @@
+<serviceGroup>
+ <service name="BookStoreService">
+  <messageReceivers>
+   <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" 
+       class="org.apache.axis2.jaxws.client.soapaction.server.SOAPActionTestsMessageReceiver"/>
+  </messageReceivers>
+ </service>
+</serviceGroup>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java?view=auto&rev=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java Wed Dec  6 21:51:33 2006
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *      
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.client.soapaction.server;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMText;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.engine.AxisEngine;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.util.MessageContextBuilder;
+
+/**
+ * This MessageReceiver is used for a series of tests relating to the
+ * SOAP action.  This is mostly for testing that the correct operation
+ * was resolved based on the SOAP action that was sent by the client.  
+ */
+public class SOAPActionTestsMessageReceiver implements MessageReceiver {
+    
+    public void receive(MessageContext request) throws AxisFault {
+        System.out.println("[server] SOAPActionTestsMessageReceiver: new request received");
+        
+        SOAPEnvelope env = request.getEnvelope();        
+        System.out.println("[server] request message [" + env + "]");
+        
+        // Get the first child element
+        Iterator itr = env.getBody().getChildElements();
+        OMElement child = (OMElement) itr.next();
+
+        // Create the envelope for the response
+        SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
+        SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
+        sf.createSOAPBody(responseEnv);
+        OMElement responseBodyContent = null;
+        
+        // Check to see which operation was invoked and then validate the contents 
+        // of the request (resolved AxisOperation and the soap action) to see if they are correct.
+        String name = child.getLocalName();
+        if (name.equals("getPrice")) {
+            float status = 0;
+            if (checkOperation("getPrice", request) &&
+                checkSOAPAction("", request)) {
+                System.out.println("[server] all checks passed");
+                status = 1;
+            }
+            else {
+                System.out.println("[server] some checks failed");
+            }
+            
+            responseBodyContent = sf.createOMElement(new QName("http://jaxws.axis2.apache.org/client/soapaction", "getPriceWithActionResponse"), responseEnv.getBody());
+            OMElement elem = sf.createOMElement(new QName("", "price"), responseBodyContent);
+            OMText text = sf.createOMText(Float.toString(status));
+            elem.addChild(text);
+        }
+        else if (name.equals("getPriceWithAction")) {
+            float status = 0;
+            if (checkOperation("getPriceWithAction", request) &&
+                checkSOAPAction("http://jaxws.axis2.apache.org/client/soapaction/getPrice", request)) {
+                System.out.println("[server] all checks passed");
+                status = 1;
+            }
+            else {
+                System.out.println("[server] some checks failed");
+            }
+            
+            responseBodyContent = sf.createOMElement(new QName("http://jaxws.axis2.apache.org/client/soapaction", "getPriceWithActionResponse"), responseEnv.getBody());
+            OMElement elem = sf.createOMElement(new QName("", "price"), responseBodyContent);
+            OMText text = sf.createOMText(Float.toString(status));
+            elem.addChild(text);
+        }
+        
+        /*
+        else if (name.equals("item")) {
+            if (checkOperation("getInventory", request) &&
+                checkSOAPAction("", request)) {
+                status = STATUS_PASS;
+            }
+        }
+        else if (name.equals("itemWithAction")) {
+            if (checkOperation("getInventoryWithAction", request) &&
+                checkSOAPAction("http://jaxws.axis2.apache.org/client/soapaction/getInventory", request)) {
+                status = STATUS_PASS;
+            }
+        }
+        */
+        
+        // Fill in the contents of the response and send it back
+        MessageContext response = MessageContextBuilder.createOutMessageContext(request);
+        responseEnv.getBody().addChild(responseBodyContent);
+        response.setEnvelope(responseEnv);
+        
+        System.out.println("[server] response message [" + responseEnv.toString() + "]");
+        
+        response.getOperationContext().addMessageContext(response);
+        AxisEngine engine = new AxisEngine(response.getConfigurationContext());
+        engine.send(response);    
+    }
+    
+    /*
+     * Verify that the AxisOperation on the MessageContext is the 
+     * one that we were expecting based on the request.
+     */
+    private boolean checkOperation(String expectedOperationName, MessageContext mc) {
+        AxisOperation op = mc.getAxisOperation();
+        System.out.println("[server] checking expected operation [" + expectedOperationName + "] against resolved operation [" + op.getName() + "]");
+        if (op.getName().getLocalPart().equals(expectedOperationName)) {
+            System.out.println("[server] operation name is correct");
+            return true;
+        }
+        else {
+            System.out.println("[server] operation name is incorrect");
+            return false;
+        }
+    }
+    
+    /*
+     * Verify that the SOAPAction present on the MessageContext is
+     * the one that we were expecting based on the request.
+     */
+    private boolean checkSOAPAction(String expectedAction, MessageContext mc) {
+       String action = mc.getSoapAction();
+       System.out.println("[server] checking expected action [" + expectedAction + "] against received action [" + action + "]");
+       if (action != null && action.equals(expectedAction)) {
+           System.out.println("[server] soap action is correct");
+           return true;
+       }           
+       else {
+           System.out.println("[server] soap action is incorrect");
+           return false;
+       }   
+    }
+}

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?view=diff&rev=483349&r1=483348&r2=483349
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Wed Dec  6 21:51:33 2006
@@ -23,6 +23,8 @@
 
 import org.apache.axis2.jaxws.anytype.tests.AnyTypeTests;
 import org.apache.axis2.jaxws.attachments.MTOMSerializationTests;
+import org.apache.axis2.jaxws.client.DispatchSoapActionTests;
+import org.apache.axis2.jaxws.client.ProxySoapActionTests;
 import org.apache.axis2.jaxws.databinding.BindingToProtocolTests;
 import org.apache.axis2.jaxws.description.AnnotationDescriptionTests;
 import org.apache.axis2.jaxws.description.AnnotationProviderImplDescriptionTests;
@@ -31,16 +33,16 @@
 import org.apache.axis2.jaxws.description.GetDescFromBindingProvider;
 import org.apache.axis2.jaxws.description.PartialWSDLTests;
 import org.apache.axis2.jaxws.description.PortSelectionTests;
-import org.apache.axis2.jaxws.description.ServiceTests;
 import org.apache.axis2.jaxws.description.ServiceAnnotationTests;
+import org.apache.axis2.jaxws.description.ServiceTests;
 import org.apache.axis2.jaxws.description.ValidateWSDLTests;
 import org.apache.axis2.jaxws.description.WSDLDescriptionTests;
 import org.apache.axis2.jaxws.description.WSDLTests;
 import org.apache.axis2.jaxws.description.WrapperPackageTests;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderTests;
 import org.apache.axis2.jaxws.description.impl.ServiceDescriptionImplTests;
-import org.apache.axis2.jaxws.dispatch.SOAP12Dispatch;
 import org.apache.axis2.jaxws.dispatch.DispatchTestSuite;
+import org.apache.axis2.jaxws.dispatch.SOAP12Dispatch;
 import org.apache.axis2.jaxws.exception.ExceptionFactoryTests;
 import org.apache.axis2.jaxws.handler.HandlerChainProcessorTests;
 import org.apache.axis2.jaxws.i18n.JaxwsMessageBundleTests;
@@ -74,7 +76,6 @@
 import org.apache.axis2.jaxws.sample.NonWrapTests;
 import org.apache.axis2.jaxws.sample.ParallelAsyncTests;
 import org.apache.axis2.jaxws.sample.WrapTests;
-import org.apache.axis2.jaxws.sample.faultsservice.FaultsService;
 import org.apache.axis2.jaxws.security.BasicAuthSecurityTests;
 import org.apache.log4j.BasicConfigurator;
 
@@ -82,7 +83,7 @@
     
     static {
         // Uncomment the followign line to enable debug
-        // BasicConfigurator.configure();
+        BasicConfigurator.configure();
     }
     
     /**
@@ -95,6 +96,8 @@
         // Add each of the test suites
         suite = DispatchTestSuite.addTestSuites(suite);
         suite.addTestSuite(SOAP12Dispatch.class);
+        suite.addTestSuite(DispatchSoapActionTests.class);
+        suite.addTestSuite(ProxySoapActionTests.class);
         
         suite.addTestSuite(BlockTests.class);
         suite.addTestSuite(MessageTests.class);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org