Type.registerNamespace('Heineken.WebApp.ScriptServices');
Heineken.WebApp.ScriptServices.UrlShorteningService=function() {
Heineken.WebApp.ScriptServices.UrlShorteningService.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
Heineken.WebApp.ScriptServices.UrlShorteningService.prototype={
ShortenUrl:function(url,succeededCallback, failedCallback, userContext) {
return this._invoke(Heineken.WebApp.ScriptServices.UrlShorteningService.get_path(), 'ShortenUrl',false,{url:url},succeededCallback,failedCallback,userContext); }}
Heineken.WebApp.ScriptServices.UrlShorteningService.registerClass('Heineken.WebApp.ScriptServices.UrlShorteningService',Sys.Net.WebServiceProxy);
Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance = new Heineken.WebApp.ScriptServices.UrlShorteningService();
Heineken.WebApp.ScriptServices.UrlShorteningService.set_path = function(value) { 
var e = Function._validateParams(arguments, [{name: 'path', type: String}]); if (e) throw e; Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._path = value; }
Heineken.WebApp.ScriptServices.UrlShorteningService.get_path = function() { return Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._path; }
Heineken.WebApp.ScriptServices.UrlShorteningService.set_timeout = function(value) { var e = Function._validateParams(arguments, [{name: 'timeout', type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); }
Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._timeout = value; }
Heineken.WebApp.ScriptServices.UrlShorteningService.get_timeout = function() { 
return Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._timeout; }
Heineken.WebApp.ScriptServices.UrlShorteningService.set_defaultUserContext = function(value) { 
Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._userContext = value; }
Heineken.WebApp.ScriptServices.UrlShorteningService.get_defaultUserContext = function() { 
return Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._userContext; }
Heineken.WebApp.ScriptServices.UrlShorteningService.set_defaultSucceededCallback = function(value) { 
var e = Function._validateParams(arguments, [{name: 'defaultSucceededCallback', type: Function}]); if (e) throw e; Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._succeeded = value; }
Heineken.WebApp.ScriptServices.UrlShorteningService.get_defaultSucceededCallback = function() { 
return Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._succeeded; }
Heineken.WebApp.ScriptServices.UrlShorteningService.set_defaultFailedCallback = function(value) { 
var e = Function._validateParams(arguments, [{name: 'defaultFailedCallback', type: Function}]); if (e) throw e; Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._failed = value; }
Heineken.WebApp.ScriptServices.UrlShorteningService.get_defaultFailedCallback = function() { 
return Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance._failed; }
Heineken.WebApp.ScriptServices.UrlShorteningService.set_path("/ScriptServices/UrlShorteningService.asmx");
Heineken.WebApp.ScriptServices.UrlShorteningService.ShortenUrl= function(url,onSuccess,onFailed,userContext) {Heineken.WebApp.ScriptServices.UrlShorteningService._staticInstance.ShortenUrl(url,onSuccess,onFailed,userContext); }
