12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: mdsrv
- **
- ** (C) Copyright IBM Corp. 2008, 2010
- **
- ** US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *****************************************************************/
- /**
- * This class allows for the sending of an async ping request to the metadata service.
- *
- * @constructor
- * @requires G_BusServer
- * @extends C_BusRequest
- * @param {I_RequestListener} v_oListener The listener for this request. If null, then no events will be fired.
- * @param {String} v_sMetadataRequest The metadata request to send.
- */
- function C_mdsrvPingRequest( v_oListener )
- {
- var pingRequest =
- '<asyncRequest>' +
- '</asyncRequest>';
-
- var v_sBusRequest = '<md1:runSpecification>' +
- '<bus:specification xsi:type="bus:metadataServiceSpecification">' +
- '<bus:value xsi:type="bus:specification">' +
- String(pingRequest).F_XMLEncode() +
- '</bus:value>' +
- '</bus:specification>' +
- G_BusServer.F_GetParameterValues() +
- '<bus:options SOAP-ENC:arrayType="bus:option[]" xsi:type="SOAP-ENC:Array">' +
- '<item xsi:type="bus:asynchOptionInt">' +
- '<bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>' +
- '<bus:value xsi:type="xsd:int">' + C_mdsrvBusRequest.K_sPrimaryWaitThreshold + '</bus:value>' +
- '</item>' +
- '<item xsi:type="bus:asynchOptionInt">' +
- '<bus:name xsi:type="bus:asynchOptionEnum">secondaryWaitThreshold</bus:name>' +
- '<bus:value xsi:type="xsd:int">' + C_mdsrvBusRequest.K_sSecondaryWaitThreshold + '</bus:value>' +
- '</item>' +
- '<item xsi:type="bus:runOptionBoolean">' +
- '<bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>' +
- '<bus:value xsi:type="xsd:boolean">false</bus:value>' +
- '</item>' +
- '</bus:options>' +
- '</md1:runSpecification>';
-
- this.F_ConstructBaseClass( v_oListener, C_mdsrvBusRequest.K_sSOAPAction_metadataService, v_sBusRequest );
- this.F_SetAsyncBusRequest("md1:wait", "md1:cancel", "md1:getOutput");
- };
- C_mdsrvPingRequest.F_Extends( C_mdsrvBusRequest );
- /**
- * @private
- */
- C_mdsrvPingRequest.prototype.F_ProcessResponse = function()
- {
- // alert('in F_ProcessResponse' );
- C_mdsrvPingRequest.superClass.F_ProcessResponse.call( this );
- var v_docSoapResponse = this.F_GetResponse();
- //debugger;
- if ( !v_docSoapResponse )
- {
- var err = this.F_GetError();
- alert( err.F_GetErrorSummary() + err.F_GetErrorDetails() );
- return;
- }
-
- var data = v_docSoapResponse.selectNodes( "/SOAP-ENV:Envelope/SOAP-ENV:Body/*/result/details/item/data" );
- //debugger;
- if( data.length > 0 )
- {
- var encoded = new Base64();
- alert( encoded.decode64( data.item( 0 ).text ) );
- }
-
- // XXXXXXXXXX add body of processing here
- };
|