Perl 中的 SOAP::Lite
我是 Perl 新手。我正在关注生物信息学 webapi 并且我正在尝试简单地显示存储在 $result 中的值。我的打印“$result\n”;命令似乎不起作用。这里发生的事情有哪些可能性?
# #!/usr/local/bin/perl
use strict;
# 1. include SOAP Lite
use SOAP::Lite;
# 2. specifies WSDL file
my $service = SOAP::Lite -> service('http://xml.nig.ac.jp/wsdl/GetEntry.wsdl');
# 3. call SOAP service
my $result = $service->getXML_DDBJEntry("AB000003");
print "$result\n";
I am new with Perl. I'm following a bioinformatics webapi and I'm attempting to simply display the value stored in $result. My print "$result\n"; command doesn't appear to be functioning. What are some possibilities as to what is going on here?
# #!/usr/local/bin/perl
use strict;
# 1. include SOAP Lite
use SOAP::Lite;
# 2. specifies WSDL file
my $service = SOAP::Lite -> service('http://xml.nig.ac.jp/wsdl/GetEntry.wsdl');
# 3. call SOAP service
my $result = $service->getXML_DDBJEntry("AB000003");
print "$result\n";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我记得,
$result
是一个对象;尝试:这可以帮助您确定发生了什么。
As I recall,
$result
is an object; Try:This may help you determine what is going on.
在浏览器中打开代码中的 URL,然后尝试通过浏览器搜索功能查找“AB000003”。
对我来说,我找不到文本 - 因此空/undef 是合乎逻辑的结果。
Open the URL from your code in a browser and try a find "AB000003" via the browser search function.
For me I can not find the text - thus empty/undef is the logical result.