dims 2002/05/31 07:12:37
Modified: java/src/org/apache/axis MessageContext.java
Log:
Make org.apache.axis.MessageContext implement
javax.xml.rpc.handler.soap.SOAPMessageContext
Revision Changes Path
1.93 +66 -12 xml-axis/java/src/org/apache/axis/MessageContext.java
Index: MessageContext.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- MessageContext.java 30 May 2002 03:06:06 -0000 1.92
+++ MessageContext.java 31 May 2002 14:12:37 -0000 1.93
@@ -56,26 +56,24 @@
package org.apache.axis ;
import org.apache.axis.client.AxisClient;
-import org.apache.axis.encoding.TypeMappingRegistry;
+import org.apache.axis.description.OperationDesc;
+import org.apache.axis.description.ServiceDesc;
import org.apache.axis.encoding.TypeMapping;
+import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.session.Session;
+import org.apache.axis.soap.SOAP11Constants;
+import org.apache.axis.soap.SOAPConstants;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.LockableHashtable;
-import org.apache.axis.description.OperationDesc;
-import org.apache.axis.description.ServiceDesc;
-import org.apache.axis.soap.SOAPConstants;
-import org.apache.axis.soap.SOAP11Constants;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.xml.rpc.Call;
-
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
import javax.xml.rpc.namespace.QName;
-
-import java.util.Hashtable;
import java.io.File;
+import java.util.Hashtable;
/**
* Some more general docs will go here.
@@ -100,7 +98,7 @@
* @author Doug Davis ([EMAIL PROTECTED])
* @author Jacek Kopecky ([EMAIL PROTECTED])
*/
-public class MessageContext {
+public class MessageContext implements SOAPMessageContext {
protected static Log log =
LogFactory.getLog(MessageContext.class.getName());
@@ -429,6 +427,15 @@
}
/**
+ * Gets the SOAPMessage from this message context
+ * @return Returns the SOAPMessage; returns null if no request
+ * SOAPMessage is present in this SOAPMessageContext
+ */
+ public javax.xml.soap.SOAPMessage getMessage() {
+ return getCurrentMessage();
+ }
+
+ /**
* Set the current (i.e. request before the pivot, response after)
* message.
*/
@@ -444,6 +451,19 @@
}
/**
+ * Sets the SOAPMessage for this message context
+ * @param message Request SOAP message
+ * @throws JAXRPCException If any error during the setting
+ * of the request message or if invalid SOAPMessage
+ * is set
+ * @throws java.lang.UnsupportedOperationException If this
+ * operation is not supported
+ */
+ public void setMessage(javax.xml.soap.SOAPMessage message) {
+ setCurrentMessage((Message)message);
+ }
+
+ /**
* Determine when we've passed the pivot
*/
public boolean getPastPivot()
@@ -747,6 +767,25 @@
} // setProperty
/**
+ * Returns true if the MessageContext contains a property with the specified
name.
+ * @param name Name of the property whose presense is to be tested
+ * @return Returns true if the MessageContext contains the
+ property; otherwise false
+ */
+ public boolean containsProperty(String name) {
+ Object propertyValue = getProperty(name);
+ return (propertyValue != null)?true:false;
+ }
+
+ /**
+ * Returns an Iterator view of the names of the properties in this
MessageContext
+ * @return Iterator for the property names
+ */
+ public java.util.Iterator getPropertyNames() {
+ return bag.keySet().iterator();
+ }
+
+ /**
* Returns the value associated with the named property - or null if not
* defined/set.
*
@@ -885,7 +924,7 @@
return encodingStyle;
} // getEncodingStyle
- public void clearProperty(String propName)
+ public void removeProperty(String propName)
{
if (bag != null) {
bag.remove(propName);
@@ -950,4 +989,19 @@
public void setHighFidelity(boolean highFidelity) {
this.highFidelity = highFidelity;
}
-};
+
+ /**
+ * Gets the SOAP actor roles associated with an execution of the HandlerChain
and its contained Handler instances.
+ * Note that SOAP actor roles apply to the SOAP node and are managed using
HandlerChain.setRoles and
+ * HandlerChain.getRoles. Handler instances in the HandlerChain use this
information about the SOAP actor roles
+ * to process the SOAP header blocks. Note that the SOAP actor roles are
invariant during the processing of
+ * SOAP message through the HandlerChain.
+ *
+ * @return Array of URIs for SOAP actor roles
+ * @see javax.xml.rpc.handler.HandlerChain#setRoles(java.lang.String[])
HandlerChain.setRoles(java.lang.String[])
+ * @see javax.xml.rpc.handler.HandlerChain#getRoles() HandlerChain.getRoles()
+ */
+ public String[] getRoles() {
+ return null;
+ }
+}