Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl Monk, Perl Meditation

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://') ->proxy( 'http://host:port/analytics/saw.dll/wsdl/v6' ); my $serializer = $soap->serializer(); $serializer->register_ns("urn://","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="" xmlns:sawsoap="urn://" xmlns:soap="" xmlns:soapenc="" xmlns:xsd="" xmlns:xsi=""> <soap:Body> <logon xmlns="urn://"> <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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-04-18 22:35 GMT
Find Nodes?
    Voting Booth?

    April first is:

    Results (472 votes), past polls