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 sc...@apache.org on 2009/12/03 21:22:55 UTC
svn commit: r886904 - in /webservices/axis2/trunk/java/modules:
kernel/src/org/apache/axis2/client/ kernel/src/org/apache/axis2/context/
kernel/src/org/apache/axis2/description/
transport/http/src/org/apache/axis2/transport/http/
Author: scheu
Date: Thu Dec 3 20:22:55 2009
New Revision: 886904
URL: http://svn.apache.org/viewvc?rev=886904&view=rev
Log:
AXIS2-4264
Contributor: Rich Scheuerle
Correction to original AXIS2-4264 fix plus more SOAPAction related trace
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java?rev=886904&r1=886903&r2=886904&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java Thu Dec 3 20:22:55 2009
@@ -242,6 +242,9 @@
if (action == null && parent != null) {
return parent.getAction();
}
+ if (log.isDebugEnabled()) {
+ log.debug("getAction (" + action + ") from " + this);
+ }
return action;
}
@@ -582,6 +585,19 @@
* @param action
*/
public void setAction(String action) {
+ if (log.isDebugEnabled()) {
+ log.debug("setAction Old action is (" + this.action + ")");
+ log.debug("setAction New action is (" + action + ")");
+
+ // It is unusual for a non-null action to be set to a different
+ // non-null action. This *might* indicate an error, so the
+ // call stack is dumped in this unusual case.
+ if ((this.action != null && this.action.length() > 0) &&
+ (action != null && action.length() > 0) &&
+ !action.equals(this.action)) {
+ log.debug(" The call stack is:" + JavaUtils.callStackToString());
+ }
+ }
this.action = action;
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=886904&r1=886903&r2=886904&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Thu Dec 3 20:22:55 2009
@@ -1096,7 +1096,11 @@
* @return Returns soap action.
*/
public String getSoapAction() {
- return options.getAction();
+ String action = options.getAction();
+ if (log.isDebugEnabled()) {
+ log.debug("SoapAction is (" + action + ")");
+ }
+ return action;
}
/**
@@ -1127,7 +1131,11 @@
}
public String getWSAAction() {
- return options.getAction();
+ String action = options.getAction();
+ if (log.isDebugEnabled()) {
+ log.debug("WASAction is (" + action + ")");
+ }
+ return action;
}
/**
@@ -1494,6 +1502,10 @@
* @param soapAction
*/
public void setSoapAction(String soapAction) {
+ if (log.isDebugEnabled()) {
+ log.debug("Old SoapAction is (" + options.getAction() + ")");
+ log.debug("New SoapAction is (" + soapAction + ")");
+ }
options.setAction(soapAction);
}
@@ -1522,6 +1534,10 @@
* setWSAAction
*/
public void setWSAAction(String actionURI) {
+ if (log.isDebugEnabled()) {
+ log.debug("Old WSAAction is (" + options.getAction() + ")");
+ log.debug("New WSAAction is (" + actionURI + ")");
+ }
options.setAction(actionURI);
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?rev=886904&r1=886903&r2=886904&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Thu Dec 3 20:22:55 2009
@@ -438,9 +438,17 @@
}
}
- public void setWsamappingList(ArrayList<String> wsamappingList) {
+ public void setWsamappingList(ArrayList wsamappingList) {
+ if (log.isDebugEnabled()) {
+ log.debug("setWsamappinglist");
+ }
this.wsamappingList = wsamappingList;
- }
+ if (wsamappingList != null && !wsamappingList.isEmpty()) {
+ if (log.isDebugEnabled()) {
+ log.debug(" wsa action is " + (String)wsamappingList.get(0));
+ }
+ }
+ }
/**
* Return an OperationClient suitable for this AxisOperation.
@@ -469,7 +477,13 @@
}
public void setSoapAction(String soapAction) {
+ if(log.isDebugEnabled()) {
+ log.debug("Entry: AxisOperation::setSoapAction, previous soapAction: " + this.soapAction + " updated soapAction: " + soapAction);
+ }
this.soapAction = soapAction;
+ if(log.isDebugEnabled()) {
+ log.debug("Exit: AxisOperation::setSoapAction");
+ }
}
/*
@@ -481,14 +495,30 @@
* when you want to get the wsa input action.
*/
public String getInputAction() {
+ if(log.isDebugEnabled()) {
+ log.debug("Entry: AxisOperation::getInputAction");
+ }
String result = null;
if (soapAction != null && !"".equals(soapAction)) {
+ if(log.isDebugEnabled()) {
+ log.debug("Debug: AxisOperation::getInputAction - using soapAction"); // so we know which path was taken
+ // log wsa map to see if it matches or is set
+ if (wsamappingList != null && !wsamappingList.isEmpty()) {
+ log.debug(" but WSA map indicates " + (String)wsamappingList.get(0));
+ }
+ }
result = soapAction;
} else {
if (wsamappingList != null && !wsamappingList.isEmpty()) {
+ if(log.isDebugEnabled()) {
+ log.debug("Debug: AxisOperation::getInputAction - using wsamappingList");
+ }
result = wsamappingList.get(0);
}
}
+ if(log.isDebugEnabled()) {
+ log.debug("Exit: AxisOperation::getInputAction " + result);
+ }
return result;
}
@@ -547,6 +577,9 @@
}
public String getSoapAction() {
+ if(log.isDebugEnabled()) {
+ log.debug("AxisOperation::getSoapAction " + soapAction);
+ }
/*
* This AxisOperation instance may be used for the client OUT-IN or for
* the server IN-OUT. If the below code were changed to getInputActions, and the
Modified: webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=886904&r1=886903&r2=886904&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Thu Dec 3 20:22:55 2009
@@ -429,11 +429,27 @@
if (!JavaUtils.isTrueExplicitly(disableSoapAction)) {
// first try to get the SOAP action from message context
soapActionString = messageContext.getSoapAction();
+ if (log.isDebugEnabled()) {
+ log.debug("SOAP Action from messageContext : (" + soapActionString + ")");
+
+ }
+ if (soapActionString != null &&
+ (soapActionString.equals("urn:anonOutInOp") ||
+ soapActionString.equals("anonOutInOp") ||
+ soapActionString.equals("urn:anonOutonlyOp") ||
+ soapActionString.equals("anonOutonlyOp") ||
+ soapActionString.equals("urn:anonRobustOp") ||
+ soapActionString.equals("anonRobustOp"))) {
+ if (log.isDebugEnabled()) {
+ log.debug("Will not use SOAP Action because (" + soapActionString + ") was auto-generated");
+ }
+ soapActionString = null;
+ }
if ((soapActionString == null) || (soapActionString.length() == 0)) {
// now let's try to get WSA action
soapActionString = messageContext.getWSAAction();
if (log.isDebugEnabled()) {
- log.debug("SOAP Action from getWSAAction was : " + soapActionString);
+ log.debug("SOAP Action from getWSAAction was : (" + soapActionString + ")");
}
if (messageContext.getAxisOperation() != null
&& ((soapActionString == null) || (soapActionString
@@ -442,13 +458,13 @@
String axisOpSOAPAction = messageContext.getAxisOperation().
getSoapAction();
if (log.isDebugEnabled()) {
- log.debug("SOAP Action from AxisOperation was : " + axisOpSOAPAction);
+ log.debug("SOAP Action from AxisOperation was : (" + axisOpSOAPAction + ")");
}
if (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction)
- || (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction))
- || (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction))) {
+ || (ServiceClient.ANON_OUT_IN_OP.equals(axisOpSOAPAction))
+ || (ServiceClient.ANON_ROBUST_OUT_ONLY_OP.equals(axisOpSOAPAction))) {
if (log.isDebugEnabled()) {
- log.debug("Will not override SOAP Action because " + axisOpSOAPAction + " in AxisOperation was auto-generated");
+ log.debug("Will not override SOAP Action because (" + axisOpSOAPAction + ") in AxisOperation was auto-generated");
}
} else {
soapActionString = axisOpSOAPAction;