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 gd...@apache.org on 2002/09/24 23:02:24 UTC
cvs commit: xml-axis/java/src/org/apache/axis/providers/java MsgProvider.java
gdaniels 2002/09/24 14:02:23
Modified: java/src/org/apache/axis/description OperationDesc.java
ServiceDesc.java
java/src/org/apache/axis/providers/java MsgProvider.java
Log:
Also support Document method(Document)
(this is needed for the attachments sample right now, will probably go away becuase it's not really an adequate API)
Revision Changes Path
1.21 +2 -0 xml-axis/java/src/org/apache/axis/description/OperationDesc.java
Index: OperationDesc.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- OperationDesc.java 24 Sep 2002 20:45:19 -0000 1.20
+++ OperationDesc.java 24 Sep 2002 21:02:23 -0000 1.21
@@ -82,6 +82,8 @@
public static final int MSG_METHOD_SOAPENVELOPE = 2;
// public Element [] method(Element [])
public static final int MSG_METHOD_ELEMENTARRAY = 3;
+ // public Document method(Document)
+ public static final int MSG_METHOD_DOCUMENT = 4;
protected static Log log =
LogFactory.getLog(OperationDesc.class.getName());
1.60 +5 -0 xml-axis/java/src/org/apache/axis/description/ServiceDesc.java
Index: ServiceDesc.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/ServiceDesc.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- ServiceDesc.java 24 Sep 2002 20:45:19 -0000 1.59
+++ ServiceDesc.java 24 Sep 2002 21:02:23 -0000 1.60
@@ -687,6 +687,11 @@
(method.getReturnType() == SOAPBodyElement[].class)) {
return OperationDesc.MSG_METHOD_BODYARRAY;
}
+
+ if ((params[0] == Document.class) &&
+ (method.getReturnType() == Document.class)) {
+ return OperationDesc.MSG_METHOD_DOCUMENT;
+ }
} else if (params.length == 2) {
if ((params[0] == SOAPEnvelope.class) &&
(params[1] == SOAPEnvelope.class) &&
1.33 +12 -0 xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java
Index: MsgProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- MsgProvider.java 24 Sep 2002 20:45:20 -0000 1.32
+++ MsgProvider.java 24 Sep 2002 21:02:23 -0000 1.33
@@ -148,6 +148,18 @@
}
}
return;
+
+ // Element [] / Element []
+ case OperationDesc.MSG_METHOD_DOCUMENT:
+ Document doc = ((SOAPBodyElement)bodies.get(0)).getAsDocument();
+ argObjects[0] = doc;
+ Document resultDoc =
+ (Document) method.invoke( obj, argObjects );
+ if (resultDoc != null) {
+ resEnv.addBodyElement(new SOAPBodyElement(
+ resultDoc.getDocumentElement()));
+ }
+ return;
}
} else {
Object argObjects[] = new Object [2];