BusinessObjects Board

Using GetReportBlock

I’ve published a very simple report block from a Web Intelligence report as a web service. Block Name is ‘ws_Category_Financials_Status_Unapproved’, web service works fine and can be consumed by Xcelsius.

I’m actually now trying to bring information from the web service into a web page. According to the Webi SAP 4.1 documentation, it’s a SOAP web service so I should be able to access it and tell it what I want out of it and what I want retrieved, I’m just a bit unsure as to how to use the GetReportBlock function to retrieve data out of the service.

My script code is currently:



<script>

function createCORSRequest(method, url){
		  var xhr = new XMLHttpRequest();
		  if ("withCredentials" in xhr){
			// XHR has 'withCredentials' property only if it supports CORS
			xhr.open(method, url, true);
		  } else if (typeof XDomainRequest != "undefined"){ // if IE use XDR
			xhr = new XDomainRequest();
			xhr.open(method, url);
		  } else {
			xhr = null;
		  }
		  return xhr;
		}

		var request = createCORSRequest( "get", "http://SERVERNAME&amp;PORT/dswsbobje/qaawsservices/biws?WSDL=1&amp;cuid=ATPhwm5EDYlNiblQwCBfw0E" );
		if ( request ){
		  // Define a callback function
		  request.onload = function (){"GetReportBlock_ws_Category_Financials_Status_Unapproved&amp;login=AUSERNAME&amp;password=APASSWORD&amp;closeDocument=true&amp;refresh=true&amp;getFromLatestDocumentInstance=false"};
		  // Send request
		  request.send();
		  alert.doug;
		}
		
</script>

So, here I’m trying to use CORS to avoid cross origin issues. I can access the web service in that I get it’s XML structure back but I’m a bit clueless as to how to pass it parameters as described in the documentation in order to get data back out of it.

Any help or pointers in the direction of some online would be appreciated especially because this isn’t really an Xcelsius issue, more web page scripting.

ty,

SD


SteveD :uk: (BOB member since 2009-11-02)