/** When you get a property from an SOAP, it just returns another SOAP with the property name tacked onto methodname. */
public Object get(Object name) {
- return new SOAP(url, (method.equals("") ? "" : method + ".") + name.toString(), http, action, nameSpace); }
+ return new SOAP(url, (method.equals("") ? "" : method + ".") + name.toString(), this, action, nameSpace); }
// Methods to Recieve and parse SOAP Responses ////////////////////////////////////////////////////
}
SOAP(String url, String methodname, String action, String nameSpace) {
- this(url, methodname, new HTTP(url), action, nameSpace);
+ super(url, methodname);
+ this.action = action;
+ this.nameSpace = nameSpace;
}
- SOAP(String url, String methodname, HTTP http, String action, String nameSpace) {
- super(url, methodname, http);
+ SOAP(String url, String methodname, SOAP httpSource, String action, String nameSpace) {
+ super(url, methodname, httpSource);
this.action = action;
this.nameSpace = nameSpace;
}
*/
class XMLRPC extends JS {
- public XMLRPC(String url, String method) { this(url, method, new HTTP(url)); }
- public XMLRPC(String url, String method, HTTP http) { this.http = http; this.url = url; this.method = method; }
- public Object get(Object name) { return new XMLRPC(url, (method.equals("") ? "" : method + ".") + name.toString(), http); }
+ public XMLRPC(String url, String method) {
+ this.http = url.startsWith("stdio:") ? HTTP.stdio : new HTTP(url);
+ this.url = url;
+ this.method = method;
+ }
+ public XMLRPC(String url, String method, XMLRPC httpSource) {
+ this.http = httpSource.http; this.url = url; this.method = method; }
+ public Object get(Object name) {
+ return new XMLRPC(url, (method.equals("") ? "" : method + ".") + name.toString(), this); }
/** this holds character content as we read it in -- since there is only one per instance, we don't support mixed content */
if((int)d == d) return Integer.toString((int)d);
return o.toString();
}
- throw new RuntimeException("can't coerce that!");
+ throw new RuntimeException("can't coerce "+o+" [" + o.getClass().getName() + "]");
}
// Instance Methods ////////////////////////////////////////////////////////////////////