File: soap.js

package info (click to toggle)
virtuoso-opensource 7.2.12%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 299,780 kB
  • sloc: ansic: 655,047; sql: 508,209; xml: 269,573; java: 84,064; javascript: 79,847; cpp: 37,662; sh: 32,429; cs: 25,702; php: 12,690; yacc: 11,661; lex: 7,933; makefile: 7,309; jsp: 4,523; awk: 1,719; perl: 1,013; ruby: 1,003; python: 326
file content (40 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 *  $Id$
 *
 *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
 *
 *  Copyright (C) 2005-2024 OpenLink Software
 *
 *  See LICENSE file for details.
 */
/*
	OAT.Soap.command(target, data, callback, optObj)
*/

OAT.Soap = {
	generate:function(data,wsdlFormat) {
		var data_ = "";
		if (wsdlFormat) {
			data_ += '<?xml version="1.0" ?>\n'+
				'<env:Envelope env:encodingType="http://schemas.xmlsoap.org/soap/encoding/" ' +
	 			'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
				'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
				'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" ' +
				'xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" ' +
				'xmlns:dt="urn:schemas-microsoft-com:datatypes"><env:Body>';
		} else {
			data_ += '<?xml version="1.0"?>\n'+
				'<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"'+
				' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'+
				' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'+
				'<env:Body>';
		}
		data_ += data;
		data_ += '</env:Body></env:Envelope>';
		return data_;
	},
	command:function(target, data, callback, optObj, wsdlFormat) {
		var data_ = OAT.Soap.generate(data,wsdlFormat);
		OAT.AJAX.SOAP(target, data_, callback, optObj);
	}
}