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 pr...@apache.org on 2008/07/23 19:36:57 UTC
svn commit: r679135 - in /webservices/axis2/trunk/java/modules:
addressing/src/org/apache/axis2/handlers/addressing/
kernel/src/org/apache/axis2/addressing/
metadata/src/org/apache/axis2/jaxws/description/impl/
Author: pradine
Date: Wed Jul 23 10:36:57 2008
New Revision: 679135
URL: http://svn.apache.org/viewvc?rev=679135&view=rev
Log:
Some minor refactoring to the AddressingInHandler, plus some additional trace to aid debugging.
Modified:
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=679135&r1=679134&r2=679135&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java Wed Jul 23 10:36:57 2008
@@ -71,6 +71,10 @@
}
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+ //Set the defaults on the message context.
+ msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
+ msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
+
//Determine if we want to ignore addressing headers. This parameter must
//be retrieved from the message context because it's value can vary on a
//per service basis.
@@ -81,16 +85,12 @@
log.debug(
"The AddressingInHandler has been disabled. No further processing will take place.");
}
- msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
- msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
return InvocationResponse.CONTINUE;
}
// if there are not headers put a flag to disable addressing temporary
SOAPHeader header = msgContext.getEnvelope().getHeader();
if (header == null) {
- msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
- msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
return InvocationResponse.CONTINUE;
}
@@ -117,7 +117,7 @@
if (!iterator.hasNext()) {
if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
- log.debug("No Headers present corresponding to " + namespace);
+ log.debug("No headers present corresponding to " + namespace);
}
namespace = Submission.WSA_NAMESPACE;
@@ -126,11 +126,12 @@
}
else if (Final.WSA_NAMESPACE.equals(namespace) || Submission.WSA_NAMESPACE.equals(namespace)) {
iterator = header.getHeadersToProcess(rolePlayer, namespace);
+
+ if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+ log.debug("The preconfigured namespace is, , " + namespace);
+ }
}
else {
- msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
- msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
-
if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
log.debug("The specified namespace is not supported by this handler, " + namespace);
}
@@ -156,14 +157,12 @@
extractToEprReferenceParameters(msgContext.getTo(), header, namespace);
}
+ //We should only get to this point if we haven't thrown a fault.
msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.TRUE);
}
else {
- msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
- msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
-
if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
- log.debug("No Headers present corresponding to " + namespace);
+ log.debug("No headers present corresponding to " + namespace);
}
}
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=679135&r1=679134&r2=679135&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Wed Jul 23 10:36:57 2008
@@ -158,7 +158,7 @@
public WSAHeaderWriter(MessageContext mc, boolean isSubmissionNamespace, boolean addMU,
boolean replace, boolean includeOptional, String role) {
if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
- log.debug("WSAHeaderWriter: isFinal=" + isSubmissionNamespace + " addMU=" + addMU +
+ log.debug("WSAHeaderWriter: isFinal=" + !isSubmissionNamespace + " addMU=" + addMU +
" replace=" + replace + " includeOptional=" + includeOptional+" role="+role);
}
@@ -169,7 +169,7 @@
messageContextOptions = messageContext.getOptions();
addressingNamespace =
- (isSubmissionNamespace ? Submission.WSA_NAMESPACE : Final.WSA_NAMESPACE);
+ isSubmissionNamespace ? Submission.WSA_NAMESPACE : Final.WSA_NAMESPACE;
header = envelope.getHeader();
// if there is no soap header in the envelope being processed, add one.
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java?rev=679135&r1=679134&r2=679135&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java Wed Jul 23 10:36:57 2008
@@ -255,7 +255,7 @@
public static void setAddressingRequirementParemeterValue(AxisDescription axisDescription, String value) {
if (value == null) {
if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
- log.debug("getAddressingRequirementParemeterValue: value passed in is null. return");
+ log.debug("setAddressingRequirementParemeterValue: value passed in is null. return");
}
return;
}
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=679135&r1=679134&r2=679135&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Wed Jul 23 10:36:57 2008
@@ -1509,6 +1509,11 @@
}
}
}
+
+ if (log.isDebugEnabled()) {
+ log.debug("getAnnoAction: " + actionAnnotation);
+ }
+
return actionAnnotation;
}
@@ -1520,6 +1525,10 @@
inputAction = action.input();
}
+ if (log.isDebugEnabled()) {
+ log.debug("getInputAction: " + inputAction);
+ }
+
return inputAction;
}
@@ -1531,6 +1540,10 @@
outputAction = action.output();
}
+ if (log.isDebugEnabled()) {
+ log.debug("getOutputAction: " + outputAction);
+ }
+
return outputAction;
}
@@ -1542,6 +1555,10 @@
faultActions = action.fault();
}
+ if (log.isDebugEnabled()) {
+ log.debug("getFaultActions: " + faultActions);
+ }
+
return faultActions;
}