开发者

SOAP::Lite in Perl

开发者 https://www.devze.com 2022-12-22 07:54 出处:网络
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 a

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";


As I recall, $result is an object; Try:

use Data::Dumper;
print Dumper($result), "\n";

This may help you determine what is going on.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消