• Topic
  • Discussion
  • OATWikiWeb.OATDOCsoap(Last) -- Owiki? , 2016-08-19 14:58:52 Edit owiki 2016-08-19 14:58:52

    soap.js

    Provides basic asynchronous XML call (AJAX) routines for use with SOAP requests.

    Functions

    OAT.Soap.command(url, data, callback, customHeaders)

    Sends an HTTP request to a page url. Data to be contained in request are specified in data. When response arrives, callback(response) will be executed. You may specify the following customHeaders:

    This function is similar to its OAT.AJAX.* counterpart, except that you don't have to specify method (HTTP GET with SOAP headers is always used) and sent data are automatically put into the SOAP envelope.

    Using this call replaces this:

    var options = {
        type:OAT.AJAX.TYPE_XML,
        auth:OAT.AJAX.AUTH_BASIC,
        async:true
        noSecurityCookie:false
        user:"username",
        password:"top_secret",
        headers: ToBeDone -- put some headers in! 
        onerror:function(request) { alert(request.getStatus()); }
        onstart:
        onend:
    }
    var callback = function(data) { alert(data); };
    OAT.AJAX.SOAP("/myfile.xml", false, callback, options);
    

    -- with this --

    var customHeaders = ToBeDone -- put some headers in! ; 
    var callback = function(data) { alert(data); };
    OAT.Soap.command("/myfile.xml", false, callback, customHeaders);
    

    ToBeDone - correct the code snippets above to reflect the actual effective replacement...

    ToBeDone - add Constants, Messages, Properties, OAT.Soap.abortAll(), borrowing from OAT.AJAX.* as relevant


    Referenced by...