I am need of a script to get data from OBIEE Web services. I have done some preliminary work but need some help to complete.
Basically I am trying to execute SQL and get results using OBIEE web service. Below is where I am at:
#!/usr/bin/perl
use warnings;
use strict;
use diagnostics;
use XML::Simple;
use Data::Dumper;
use Log::Log4perl;
use SOAP::Lite 0.65 +trace => 'debug';
#Initialize Logger
Log::Log4perl->init("[login to view URL]");
my $logger = Log::Log4perl->get_logger();
my $outputFormat = "SAWRowsetData";
my $SQL = qq(sql);
my $sessionID = "session id";
my $soap = SOAP::Lite
->readable(1)
->uri('urn://[login to view URL]')
->proxy( 'http://host:port/analytics/[login to view URL]' );
my $serializer = $soap->serializer();
$serializer->register_ns("urn://[login to view URL]","sawsoap");
my $som = $soap->call('executeSQLQuery',
SOAP::Data->name('sawsoap:sql' => $SQL)->type('xsd:string'),
SOAP::Data->name('sawsoap:outputFormat' => $outputFormat)->type('sawsoap:XMLQueryOutputFormat'),
SOAP::Data->name('sawsoap:executionOptions')->type('sawsoap:XMLQueryExecutionOptions')->value(
\SOAP::Data->value(
SOAP::Data->name("sawsoap:async")->type("xsd:boolean")->value("?"),
SOAP::Data->name("sawsoap:maxRowsPerPage")->type("xsd:int")->value("?"),
SOAP::Data->name("sawsoap:refresh")->type("xsd:boolean")->value("?"),
SOAP::Data->name("sawsoap:presentationInfo")->type("xsd:boolean")->value("?"),
SOAP::Data->name("sawsoap:type")->type("xsd:string")->value("?"))),
SOAP::Data->name('sawsoap:sessionID' => $sessionID)->type('xsd:string')
);
$logger->info(Dumper $som);
here is the soap envelope it produced that works perfectly fine using soapUI
<soap:Envelope
soap:encodingStyle="[login to view URL]"
xmlns:sawsoap="urn://[login to view URL]"
xmlns:soap="[login to view URL]"
xmlns:soapenc="[login to view URL]"
xmlns:xsd="[login to view URL]"
xmlns:xsi="[login to view URL]">
<soap:Body>
<logon xmlns="urn://[login to view URL]">
<sawsoap:name xsi:type="xsd:string">name</sawsoap:name>
<sawsoap:password xsi:type="xsd:string">password</sawsoap:password>
</logon>
</soap:Body>
</soap:Envelope>
I checked the OBIEE server and do not see a request. It is generating the right stuff but the request is not getting across.
hello,
Could you response the following questions:
- could you provide me the web service url?
- could you provide me the sample credentials for my testing purpose.
- is it OK if we use the serialize-envelop method instead of passing soap based data request? as using this method would be always a valid request, no need to worry about the invalid data type.
let me know your response as I am ready to complete this in quick once you agree with my offer above.