Perl SOAP :: Lite无法调用方法

时间:2013-11-29 21:05:10

标签: perl soap soaplite

我正在编写一个脚本来从OBIEE Web服务获取数据。以下显示了创建的正确肥皂信封但是我没有得到任何结果。

#!/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
ue("?"),
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);

这里是它生产的肥皂信封,使用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:password>
</logon>
</soap:Body>
</soap:Envelope>

我检查了OBIEE服务器但没有看到请求。它正在生成正确的东西,但请求没有得到通过。任何见解都会得到极大的赞赏。

1 个答案:

答案 0 :(得分:0)

使用端点代理解决了该问题。

相关问题