%META:TOPICPARENT{name="OATDOCIndex"}%
---+ ws.js
Web Services (WSDL) interface.
%TOC%
---++ Functions
---+++ OAT.WS.getEndpoint(wsdlURL, callback)
Asynchronously retrieve the endpoint URL for a given wsdlURL. Will callback(url) when retrieved.
---+++ OAT.WS.listServices(wsdlURL, callback)
Asynchronously retrieve a list of valid services for a given wsdlURL. Will callback(servicesArray) when retrieved.
---+++ OAT.WS.listParameters(wsdlURL, service, callback)
Asynchronously retrieve input and output values for given wsdlURL and service. Will callback(inputObject, outputObject) when retrieved.
---+++ OAT.WS.invoke(wsdlURL, service, callback, options)
Invokes a web service, with WSDL file located at wsdlURL. Input values are specified in options; will callback(outputObject) when finished. Options:
* type - (default OAT.AJAX.TYPE_XML)
* headers - (default {"SOAPAction":service})
---+++Example
/* Sample code for google search */
var wsdl = "/google/services.wsdl";
var serviceName = "doGoogleSearch";
var inputObject = {
doGoogleSearch:{
key:"IGWnqjhQFHKvB8MdJlVI0GPKDJxZhwBf",
q:"my query",
start:0,
maxResults:10,
filter:"",
restrict:"",
safeSearch:"",
lr:"",
ie:"",
oe:""
}
}
function callback(outputObject) {
alert('Data arrived!');
}
OAT.WS.invoke(wsdl, callback, serviceName, inputObject);
CategoryDocumentation CategoryOAT CategoryOpenSource