Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

SOAP::Lite to access OBIEE Web Services

by nirvanaPL (Novice)
on Nov 29, 2013 at 20:35 UTC ( #1065001=perlquestion: print w/ replies, xml ) Need Help??
nirvanaPL has asked for the wisdom of the Perl Monks concerning the following question:

I am working on a script to get data from OBIEE Web services. The following shows the correct soap envelope created however i do not get any results.

#!/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("log.conf"); 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://oracle.bi.webservices/v6') ->proxy( 'http://host:port/analytics/saw.dll/wsdl/v6' ); my $serializer = $soap->serializer(); $serializer->register_ns("urn://oracle.bi.webservices/v6","sawsoap"); my $som = $soap->call('executeSQLQuery', SOAP::Data->name('sawsoap:sql' => $SQL)->type('xsd:string'), SOAP::Data->name('sawsoap:outputFormat' => $outputFormat)->type('sawso +ap:XMLQueryOutputFormat'), SOAP::Data->name('sawsoap:executionOptions')->type('sawsoap:XMLQueryEx +ecutionOptions')->value( \SOAP::Data->value( SOAP::Data->name("sawsoap:async")->type("xsd:boolean")->va +lue("?"), 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:bo +olean")->value("?"), SOAP::Data->name("sawsoap:type")->type("xsd:string")->valu +e("?"))), 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="http://schemas.xmlsoap.org/soap/encoding/" xmlns:sawsoap="urn://oracle.bi.webservices/v6" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <logon xmlns="urn://oracle.bi.webservices/v6"> <sawsoap:name xsi:type="xsd:string">name</sawsoap:name> <sawsoap:password xsi:type="xsd:string">password</sawsoap:passwo +rd> </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. Any insight is greatly Appreciated.

Comment on SOAP::Lite to access OBIEE Web Services
Select or Download Code
Re: SOAP::Lite to access OBIEE Web Services
by Anonymous Monk on Nov 30, 2013 at 01:31 UTC

      I get no response with the above code. $som->result gives undef. I will have to try your suggested debug. I also tried using SOAP::Lite->Service(WSDL,service,port)->$method which works for simple type such as logon to get session id but does not work for complex types.

        I get no response with the above code. $som->result gives undef.

        result is not response, response is http response, the same way you have soap envelope it produced you should have what the server gave back at you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1065001]
Approved by boftx
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (17)
As of 2014-07-25 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (173 votes), past polls