2

我正在尝试使用 SOAP::Lite 在 Perl 中调用 SOAP 服务,它似乎在解析返回值时遇到了问题。这是一个稍微净化过的版本,当我use SOAP::Lite q/trace/;

请注意,我已将响应 XML 重新格式化为xmllint --format -

SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: uaas:getOrganizationListInput
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x975730)
SOAP::Transport::HTTP::Client::send_receive: POST http://sv-websvc-t2:9087/UAASCIAMWebServices/services/UAASPort HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 758
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.myemployer.com/ciam/services/uaas#getOrganizationListInput"

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope 
    xmlns:uaas="http://www.myemployer.com/ciam/services/uaas" 
    xmlns:ciam_types="http://associate.insidemyemployer.com/ciamservices/service/ciam_types" 
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:uaas_types="http://associate.insidemyemployer.com/ciamservices/service/uaas_types" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <uaas:getOrganizationListInput xmlns="http://www.myemployer.com/ciam/services/uaas" xsi:nil="true" />
      </soap:Body>
</soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1262480)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: Close
Date: Tue, 19 Mar 2013 15:27:47 GMT
Server: WebSphere Application Server/8.0
Content-Language: en-US
Content-Length: 11672
Content-Type: text/xml; charset=utf-8
Client-Date: Tue, 19 Mar 2013 15:27:48 GMT
Client-Peer: 170.22.136.114:9087
Client-Response-Num: 1
X-Powered-By: Servlet/3.0

<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="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">
  <soapenv:Header/>
  <soapenv:Body>
    <p672:getOrganizationListOutput xmlns:p490="http://associate.insidemyemployer.com/ciamservices/service/uaas_types" xmlns:p672="http://www.myemployer.com/ciam/services/uaas">
      <response>
        <responseCode>9000</responseCode>
        <responseDescription>Success</responseDescription>
      </response>
      <p490:organizations>
        <id>506</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577487</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577480</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>6</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>AMEX006</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>7</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>AMEX002</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>202</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>252</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>201</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>101</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>102</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>EMP123</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>108</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>BC12334</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>113</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577494</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577493</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>105</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>bb1</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1151</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1302</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>H001</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1303</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>4343</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>116</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577489</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>301</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>275</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>602</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577497</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577484</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>32053</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1301</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>213</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577486</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>351</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>271</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577496</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>14435</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>605</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577490</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1604</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>1009</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1654</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1655</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>253</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577481</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577488</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577495</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>256</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577483</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577491</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>50</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>1577485</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>258</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>203</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1577482</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>100</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>251</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>117</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>118</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>151</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>155</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>TL004</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>255</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>119</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>111111</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1304</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>1308</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>154</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>123</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>120</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>999999</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>51</id>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>2554</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>383</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>2604</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>384</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>107</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>T878787</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>104</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchId>78906</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>407</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>408</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>549</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>257</id>
        <legalName>ABC</legalName>
        <branchId>1586</branchId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>2654</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>406</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>403</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>405</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>404</id>
        <taxId>00000000</taxId>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>254</id>
        <legalName>ABC</legalName>
      </p490:organizations>
      <p490:organizations>
        <id>112</id>
        <taxId>00000000</taxId>
        <branchName>DEF</branchName>
      </p490:organizations>
      <p490:organizations>
        <id>111</id>
        <taxId>00000000</taxId>
        <branchName>DEF</branchName>
      </p490:organizations>
    </p672:getOrganizationListOutput>
  </soapenv:Body>
</soapenv:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()
Incorrect parameter at /opt/perl/lib/site_perl/5.12.2/SOAP/Lite.pm line 1993.
SOAP::SOM::DESTROY: ()
SOAP::Lite::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()

我希望得到修复或解决方法。

4

1 回答 1

4

我在SourceForge 上找到了这个线程并尝试了解决方案,它似乎可以工作。

我将消息中引用的行Incorrect parameter at /opt/perl/lib/site_perl/5.12.2/SOAP/Lite.pm line 1993

die "Incorrect parameter" unless $itself =~/^\d$/;

die "Incorrect parameter" unless $itself =~/^\d+$/;
于 2013-03-19T18:24:59.010 回答