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 sa...@apache.org on 2006/09/04 09:05:11 UTC
svn commit: r439956 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
Author: saminda
Date: Mon Sep 4 00:05:10 2006
New Revision: 439956
URL: http://svn.apache.org/viewvc?view=rev&rev=439956
Log:
In the case of soap12 action header is optional. If it's present, it
will be set in the MC.setSoapAction();
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?view=diff&rev=439956&r1=439955&r2=439956
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Mon Sep 4 00:05:10 2006
@@ -210,6 +210,28 @@
if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
soap11 = false;
+ //Check for action header and set it in as soapAction in MessageContext
+ int index = contentType.indexOf("action");
+ if (index > -1) {
+ String transientString = contentType.substring(index,contentType.length());
+ int equal = transientString.indexOf("=");
+ int firstComma = transientString.indexOf(";");
+ String soapAction; // This will contain "" in the string
+ if (firstComma > -1) {
+ soapAction = transientString.substring(equal+1,firstComma-1);
+
+ } else {
+ soapAction = transientString.substring(equal+1,transientString.length());
+ }
+ if ((soapAction != null) && soapAction.startsWith("\"")
+ && soapAction.endsWith("\"")) {
+ soapAction = soapAction
+ .substring(1, soapAction.length() - 1);
+ }
+ msgContext.setSoapAction(soapAction);
+
+ }
+
// it is SOAP 1.2
builder =
new StAXSOAPModelBuilder(xmlreader,
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org