Author: ruchithf
Date: Thu Jul 6 06:50:10 2006
New Revision: 419552
URL: http://svn.apache.org/viewvc?rev=419552&view=rev
Log:
- Updating to the latest WSS4J changes
- Fix for http://issues.apache.org/jira/browse/AXIS2-866
Modified:
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllReceiver.java
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllSender.java
Modified:
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java?rev=419552&r1=419551&r2=419552&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
(original)
+++
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
Thu Jul 6 06:50:10 2006
@@ -48,13 +48,6 @@
protected HandlerDescription handlerDesc;
/**
- * This is used to get hold of the message context to extract the
- * configuration information (from axis2.xml and service.xml)
- * out of it
- */
- protected RequestData reqData;
-
- /**
* In Axis2, the user cannot set inflow and outflow parameters.
* Therefore, we need to map the Axis2 specific inflow and outflow
* parameters to WSS4J params,
@@ -192,29 +185,8 @@
* values of the axis2.xml
*/
public Object getOption(String axisKey) {
-
- MessageContext msgContext =
(MessageContext)this.reqData.getMsgContext();
-
- int repetition = this.getCurrentRepetition(msgContext);
-
- String key = Axis2Util.getKey(axisKey,inHandler, repetition);
-
- Object value = null;
-
- Parameter param = msgContext.getParameter(key);
- value = (param== null)?null:param.getValue();
-
- //
---------------------------------------------------------------------
- //If value is still null this point then the user has not set the value
-
-
- //Look in the handlerDesc for the value
- if(value == null) {
- Parameter parameter = this.handlerDesc.getParameter(key);
- value = (parameter== null)?null:parameter.getValue();
- }
-
- return value;
+ Parameter parameter = this.handlerDesc.getParameter(axisKey);
+ return (parameter== null)?null:parameter.getValue();
}
public void setProperty(Object msgContext, String key, Object value) {
@@ -223,14 +195,15 @@
/**
* Overrides the class loader used to load the PW callback class.
+ * @param msgCtx MessageContext
* @return Returns class loader.
*/
- public java.lang.ClassLoader getClassLoader() {
+ public java.lang.ClassLoader getClassLoader(Object msgCtx) {
try {
- MessageContext msgContext = (MessageContext)
this.reqData.getMsgContext();
- return msgContext.getAxisService().getClassLoader();
+
+ return ((MessageContext)msgCtx).getAxisService().getClassLoader();
} catch (Throwable t) {
- return super.getClassLoader();
+ return super.getClassLoader(msgCtx);
}
}
}
Modified:
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllReceiver.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllReceiver.java?rev=419552&r1=419551&r2=419552&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllReceiver.java
(original)
+++
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllReceiver.java
Thu Jul 6 06:50:10 2006
@@ -86,7 +86,7 @@
// Set the DOM impl to DOOM
DocumentBuilderFactoryImpl.setDOOMRequired(true);
}
-
+ RequestData reqData = new RequestData();
try {
Parameter param = ConversationConfiguration
@@ -97,7 +97,7 @@
.getWSAAction())
|| WSSHandlerConstants.RSTR_ACTON_SCT.equals(msgContext
.getWSAAction())) {
- this.processBasic(msgContext, disableDoom);
+ this.processBasic(msgContext, disableDoom, reqData);
} else {
this.processSecConv(msgContext);
}
@@ -165,7 +165,7 @@
.getSOAPEnvelopeFromDOOMDocument(config.getDocument()));
}
- private void processBasic(MessageContext msgContext, boolean disableDoom)
+ private void processBasic(MessageContext msgContext, boolean disableDoom,
RequestData reqData)
throws Exception {
// populate the properties
Modified:
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllSender.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllSender.java?rev=419552&r1=419551&r2=419552&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllSender.java
(original)
+++
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllSender.java
Thu Jul 6 06:50:10 2006
@@ -78,7 +78,7 @@
// Set the DOM impl to DOOM
DocumentBuilderFactoryImpl.setDOOMRequired(true);
}
-
+ RequestData reqData = new RequestData();
try {
Parameter param =
ConversationConfiguration.getParameter(msgContext);
@@ -86,7 +86,7 @@
WSSHandlerConstants.RSTR_ACTON_SCT.equals(msgContext.getWSAAction()) ||
WSSHandlerConstants.RSTR_ACTON_ISSUE.equals(msgContext.getWSAAction())) {
//If the msgs are msgs to an STS then use basic WS-Sec
- processBasic(msgContext, disableDoom);
+ processBasic(msgContext, disableDoom, reqData);
} else {
processSecConv(msgContext);
}
@@ -147,7 +147,7 @@
* @throws WSSecurityException
* @throws AxisFault
*/
- private void processBasic(MessageContext msgContext, boolean disableDoom)
throws WSSecurityException, AxisFault {
+ private void processBasic(MessageContext msgContext, boolean disableDoom,
RequestData reqData) throws WSSecurityException, AxisFault {
boolean doDebug = log.isDebugEnabled();
try {
@@ -172,7 +172,7 @@
inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
}
- reqData = new RequestData();
+
reqData.setNoSerialization(false);
reqData.setMsgContext(msgContext);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]