projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b0d53b4
)
2002/08/07 05:08:23
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:49:52 +0000
(06:49 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:49:52 +0000
(06:49 +0000)
darcs-hash:
20040130064952
-2ba56-
9dc5ed278a36d142736e789fa5426bdb41526949
.gz
CHANGES
patch
|
blob
|
history
src/org/xwt/SOAP.java
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index
a498193
..
53820e0
100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-350,4
+350,6
@@
06-Jul megacz XMLRPC.java: new HTTP stack, better verbose output
06-Jul megacz XMLRPC.java: new HTTP stack, better verbose output
+06-Jul megacz SOAP.java: new HTTP stack
+
diff --git
a/src/org/xwt/SOAP.java
b/src/org/xwt/SOAP.java
index
a36e9a9
..
3c3ed7d
100644
(file)
--- a/
src/org/xwt/SOAP.java
+++ b/
src/org/xwt/SOAP.java
@@
-29,7
+29,7
@@
class SOAP extends XMLRPC {
/** When you get a property from an SOAP, it just returns another SOAP with the property name tacked onto methodname. */
public Object get(String name, Scriptable start) {
/** When you get a property from an SOAP, it just returns another SOAP with the property name tacked onto methodname. */
public Object get(String name, Scriptable start) {
- return new SOAP(url.toString(), (methodname.equals("") ? "" : methodname + ".") + name, action, nameSpace);
+ return new SOAP(url.toString(), (methodname.equals("") ? "" : methodname + ".") + name, http, action, nameSpace);
}
}
@@
-241,6
+241,7
@@
class SOAP extends XMLRPC {
protected String send(Object[] args, HTTP http) throws JavaScriptException, IOException {
// build up the request
StringBuffer content = new StringBuffer();
protected String send(Object[] args, HTTP http) throws JavaScriptException, IOException {
// build up the request
StringBuffer content = new StringBuffer();
+ content.append("SOAPAction: " + action + "\r\n\r\n");
content.append("<?xml version=\"1.0\"?>\n");
content.append("<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"\n");
content.append(" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"\n");
content.append("<?xml version=\"1.0\"?>\n");
content.append("<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"\n");
content.append(" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"\n");
@@
-258,12
+259,12
@@
class SOAP extends XMLRPC {
appendObject(o[i].toString(), ((Scriptable)args[0]).get(o[i].toString(), (Scriptable)args[0]), content);
}
content.append(" </" + methodname + "></SOAP-ENV:Body></SOAP-ENV:Envelope>");
appendObject(o[i].toString(), ((Scriptable)args[0]).get(o[i].toString(), (Scriptable)args[0]), content);
}
content.append(" </" + methodname + "></SOAP-ENV:Body></SOAP-ENV:Envelope>");
- http.addHeader("SOAPAction", action);
return content.toString();
}
return content.toString();
}
- SOAP(String url, String methodname, String action, String nameSpace) {
- super(url, methodname);
+ SOAP(String url, String methodname, String action, String nameSpace) { this(url, methodname, new HTTP(url), action, nameSpace); }
+ SOAP(String url, String methodname, HTTP http, String action, String nameSpace) {
+ super(url, methodname, http);
this.action = action;
this.nameSpace = nameSpace;
}
this.action = action;
this.nameSpace = nameSpace;
}