1
--- axis-1_2/src/org/apache/axis/handlers/ServiceInvocation.java 1970-01-01 01:00:00.000000000 +0100
2
+++ jonas-axis/src/org/apache/axis/handlers/ServiceInvocation.java 2005-01-25 15:02:00.000000000 +0000
5
+package org.apache.axis.handlers;
7
+import java.util.Iterator;
9
+import javax.xml.soap.SOAPBody;
10
+import javax.xml.soap.SOAPElement;
11
+import javax.xml.soap.SOAPEnvelope;
12
+import javax.xml.soap.SOAPException;
13
+import javax.xml.soap.SOAPMessage;
15
+import org.apache.axis.MessageContext;
20
+ * Keep here the invocation info:
21
+ * operation + arguments.
22
+ * TODO This class should be in the jonas code.
23
+ * @author Ph Durieux
25
+public class ServiceInvocation {
28
+ * @return Returns the argNames.
30
+ public String getArgNames() {
34
+ * @param argNames The argNames to set.
36
+ public void setArgNames(String argNames) {
37
+ this.argNames = argNames;
40
+ * @return Returns the methodName.
42
+ public String getMethodName() {
46
+ * @param methodName The methodName to set.
48
+ public void setMethodName(String methodName) {
49
+ this.methodName = methodName;
52
+ * @return Returns the numArgs.
54
+ public int getNumArgs() {
58
+ * @param numArgs The numArgs to set.
60
+ public void setNumArgs(int numArgs) {
61
+ this.numArgs = numArgs;
63
+ private String methodName = "";
64
+ private String argNames = "";
65
+ private int numArgs = -1;
67
+ public ServiceInvocation(MessageContext msgContext) {
69
+ SOAPMessage reqMsg = msgContext.getMessage();
70
+ SOAPEnvelope reqEnv;
72
+ reqEnv = reqMsg.getSOAPPart().getEnvelope();
73
+ } catch (SOAPException e1) {
74
+ e1.printStackTrace();
79
+ body = reqEnv.getBody();
80
+ } catch (SOAPException e) {
81
+ e.printStackTrace();
87
+ Iterator it = body.getChildElements();
88
+ SOAPElement operation = (SOAPElement) it.next();
89
+ methodName = operation.getNodeName();
91
+ for (Iterator i = operation.getChildElements(); i.hasNext();) {
92
+ SOAPElement elt = (SOAPElement) i.next();
94
+ argNames += elt.getNodeName();
98
+ public boolean equals(Object obj) {
102
+ return toString().equals(obj.toString());
105
+ public int hashCode() {
109
+ public String toString() {
110
+ return "[method=" + methodName + ",Args=" + argNames + "]";