You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/06/29 07:05:00 UTC

svn commit: r202317 - in /webservices/axis/trunk/java/modules/core: src/org/apache/axis/clientapi/ src/org/apache/axis/context/ src/org/apache/axis/transport/http/ src/org/apache/axis/transport/mail/ src/org/apache/axis/transport/mail/server/ test/org/...

Author: hemapani
Date: Tue Jun 28 22:04:58 2005
New Revision: 202317

URL: http://svn.apache.org/viewcvs?rev=202317&view=rev
Log:
fix the SOAP action

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/server/MailSorter.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java Tue Jun 28 22:04:58 2005
@@ -47,6 +47,7 @@
 
     public void send(OperationDescription axisop, final MessageContext msgctx) throws AxisFault {
         verifyInvocation(axisop);
+        msgctx.setSoapAction(soapAction);
         msgctx.setMessageInformationHeaders(messageInformationHeaders);
         msgctx.setServiceContext(serviceContext);
         ConfigurationContext syscontext = serviceContext.getEngineContext();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java Tue Jun 28 22:04:58 2005
@@ -137,6 +137,7 @@
             }
         } else {
             msgctx.setTo(to);
+            msgctx.setSoapAction(soapAction);
             msgctx.setServiceContext(serviceContext);
             ConfigurationContext syscontext = serviceContext.getEngineContext();
 
@@ -174,6 +175,7 @@
             AxisEngine engine = new AxisEngine(syscontext);
             //TODO
             checkTransport(msgctx);
+            msgctx.setSoapAction(soapAction);
 
             if (useSeparateListener) {
                 String messageID = String.valueOf(System.currentTimeMillis());

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java Tue Jun 28 22:04:58 2005
@@ -40,6 +40,7 @@
     protected ServiceContext serviceContext;
     protected final String mep;
     protected String soapVersionURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
+    protected String soapAction = "";
 
     public MEPClient(ServiceContext service, String mep) {
         this.serviceContext = service;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java Tue Jun 28 22:04:58 2005
@@ -122,6 +122,8 @@
     
     private QName pausedHandlerName;
     
+    private String soapAction;
+    
     /**
      * Conveniance Method, but before call engine.send() or  engine.receive() one must send transport in/out
      * @param engineContext
@@ -549,6 +551,20 @@
      */
     public void setPausedPhaseName(String name) {
         pausedPhaseName = name;
+    }
+
+    /**
+     * @return
+     */
+    public String getSoapAction() {
+        return soapAction;
+    }
+
+    /**
+     * @param string
+     */
+    public void setSoapAction(String string) {
+        soapAction = string;
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Tue Jun 28 22:04:58 2005
@@ -202,6 +202,7 @@
             String soapActionString = req.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
             if (soapActionString != null) {
                 msgContext.setWSAAction(soapActionString);
+                msgContext.setSoapAction(soapActionString);
             }
             Utils.configureMessageContextForHTTP(
                 req.getContentType(),

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java Tue Jun 28 22:04:58 2005
@@ -51,9 +51,9 @@
         int contentLength)
         throws AxisFault {
         try {
-            Object soapAction = msgContext.getWSAAction();
-            String soapActionString =
-                soapAction == null ? "" : soapAction.toString();
+            String soapAction = msgContext.getSoapAction();
+            soapAction = (soapAction!= null)?soapAction:msgContext.getWSAAction();
+            soapAction = (soapAction == null)? "" : soapAction.toString();
             StringBuffer buf = new StringBuffer();
             buf.append(HTTPConstants.HEADER_POST).append(" ");
             buf.append(url.getFile()).append(" ").append(httpVersion).append("\n");
@@ -78,7 +78,7 @@
                 buf.append(HTTPConstants.HEADER_CONTENT_LENGTH).append(": " + contentLength + "\n");
             }
             if (!this.doREST) {
-                buf.append("SOAPAction: \"" + soapActionString + "\"\n");
+                buf.append("SOAPAction: \"" + soapAction + "\"\n");
             }
             buf.append("\n");
             out.write(buf.toString().getBytes());

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java Tue Jun 28 22:04:58 2005
@@ -68,6 +68,7 @@
 
         try {
             msgContext.setWSAAction(soapAction);
+            msgContext.setSoapAction(soapAction);
             msgContext.setTo(new EndpointReference(AddressingConstants.WSA_TO, requestURI));
             msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);
             msgContext.setServerSide(true);
@@ -129,6 +130,7 @@
         String requestURI,
         ConfigurationContext configurationContext,Map requestParameters) throws AxisFault {
             msgContext.setWSAAction(soapAction);
+            msgContext.setSoapAction(soapAction);
             msgContext.setTo(new EndpointReference(AddressingConstants.WSA_TO, requestURI));
             msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);
             msgContext.setServerSide(true);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java Tue Jun 28 22:04:58 2005
@@ -83,7 +83,9 @@
             msgContext = new MessageContext(reg,transportIn,transportOut);
             msgContext.setServerSide(true);
             msgContext.setProperty(MailConstants.CONTENT_TYPE, mimeMessage.getContentType());
-            msgContext.setWSAAction(getMailHeader(MailConstants.HEADER_SOAP_ACTION));
+            String soapAction  = getMailHeader(MailConstants.HEADER_SOAP_ACTION);
+            msgContext.setWSAAction(soapAction);
+            msgContext.setSoapAction(soapAction);
 
             String serviceURL = mimeMessage.getSubject();
             if (serviceURL == null) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/server/MailSorter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/server/MailSorter.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/server/MailSorter.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/server/MailSorter.java Tue Jun 28 22:04:58 2005
@@ -63,7 +63,9 @@
             msgContext.setServerSide(true);
 
             msgContext.setProperty(MailConstants.CONTENT_TYPE, mimeMessage.getContentType());
-            msgContext.setWSAAction(getMailHeader(MailConstants.HEADER_SOAP_ACTION, mimeMessage));
+            String soapAction = getMailHeader(MailConstants.HEADER_SOAP_ACTION, mimeMessage);
+            msgContext.setWSAAction(soapAction);
+            msgContext.setSoapAction(soapAction);
 
             String serviceURL = mimeMessage.getSubject();
             if (serviceURL == null) {

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java Tue Jun 28 22:04:58 2005
@@ -123,6 +123,7 @@
         axisOp.getRemainingPhasesInFlow().add(phase3);
 
         mc.setWSAAction(operationName.getLocalPart());
+        mc.setSoapAction(operationName.getLocalPart());
         System.out.flush();
 
     }

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java?rev=202317&r1=202316&r2=202317&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java Tue Jun 28 22:04:58 2005
@@ -91,6 +91,7 @@
 
 
         mc.setWSAAction(opearationName.getLocalPart());
+        mc.setSoapAction(opearationName.getLocalPart());
         System.out.flush();
     }