Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Found unrecognised attribute in SOAP WSD

by Anonymous Monk
on Aug 02, 2013 at 18:50 UTC ( #1047640=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks!
I am testing a Perl code to connect and retrieve data using "SOAP::WSDL" but no matter what I try I am getting these warnings:
found unrecognised attribute { +l}Action (ignored) at /usr/local/share/perl5/SOAP/WSDL/ line 1 +30. found unrecognised attribute { +l}Action (ignored) at /usr/local/share/perl5/SOAP/WSDL/ line 1 +30. found unrecognised attribute { +l}Action (ignored) at /usr/local/share/perl5/SOAP/WSDL/ line 1 +30. found unrecognised attribute { +l}Action (ignored) at /usr/local/share/perl5/SOAP/WSDL/ line 1 +30.

and here is the Perl code I am using:
#!/usr/bin/perl -w use strict; #use SOAP::Lite; # +trace=>"debug"; # commented for testing use Data::Dumper; use SOAP::WSDL; use XML::Simple; my %data = ( 'inXML' => "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoa\" xmlns:xsd=\"http://pw_b1rws2.wsbeans.iseries/x +sd\"> <soapenv:Header/> <soapenv:Body> <xsd:getinfo_XML> <xsd:args0> <xsd:GETID>MYACCOUNT 1234567 2013 </xsd +:GETID> </xsd:args0> </xsd:getinfo_XML> </soapenv:Body> </soapenv:Envelope>" ); my $soap = SOAP::WSDL->new( wsdl => '', ); my $result = $soap->call('getinfo_XML', %data); #print Dumper $result; open( XML, '>', 'results.xml' ) or die "Couldn't open"; print XML $result->result(); close XML; # create object my $xml = new XML::Simple; # read XML file my $data = $xml->XMLin("results.xml"); # print output print Dumper($data);
If anyone has done anything like that or had a similar issue like this one, it would be nice to let meknow how it got solved!


Replies are listed 'Best First'.
Re: Found unrecognised attribute in SOAP WSD
by kcott (Chancellor) on Aug 03, 2013 at 15:02 UTC

    Is the code at (and around) line 130 of .../SOAP/WSDL/ of no help to you?

    I don't have that module installed but looking at SOAP::WSDL::Base source code on CPAN, I see warn "your reported warning"; at line 130 (with a comment just before it with an explanation):

    ... # check for namespae-qualified attributes. # neither XML Schema, nor WSDL1.1, nor the SOAP binding allow # namespace-qualified attribute names my ($ns, $localname) = split /\|/, $value->{ Name }; if ($ns) { warn "found unrecognised attribute \{$ns}$localname (ignor +ed)"; next; } ...

    -- Ken

Re: Found unrecognised attribute in SOAP WSD
by nevdka (Pilgrim) on Aug 04, 2013 at 22:51 UTC

    It looks like something in your code is trying to do something that SOAP::WSDL doesn't like. If you get a stack trace, it should show you where in your code the problem is. Put the following under your other use statements:

    use Carp; $SIG{__DIE__} = sub {confess "@_";}; $SIG{__WARN__} = sub {confess "@_";};

    I don't have SOAP::WSDL installed, so I can't run this myself. The error message should help you track the problem down.

    Update: carp changed to Carp. Thanks Anonymous Monk!

      There is no "carp" module :) use Carp::Always; is shorter to type

        Yes, it should have been use Carp;. It's not the first time I missed that capital, and I doubt it will be the last. :)

        I didn't know about Carp::Always, but it sounds useful. Thanks!

        Hi, I've got the same problem. Did you get a solution for the error? Are you trying to use a web service that is hosted by an IBM i machine (aka, AS400)? Please, let me know if you found a solution, it would help me so much. Thank you, Esdras

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1047640]
Approved by ww
Front-paged by toolic
[Corion]: Hehe - $work is a place where we have lots of (money) accounts, and lots of journals where every transaction is recorded. But our HR system where the accounts of hours worked and vacation days taken are stored, there is no real account of who changed ...
[Corion]: ... that balance, and when. And it seems to me that they somehow really messed up the database since the start of the year and have been frantically adding and subtracting numbers from the totals, but without trace ;)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-01-23 16:42 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (249 votes). Check out past polls.