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

SOAP::WSDL isn't generating interfaces

by ptomblin (Initiate)
on Jan 17, 2013 at 14:32 UTC ( [id://1013794]=perlquestion: print w/replies, xml ) Need Help??

ptomblin has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to connect to a WSDL service at the company I'm consulting to. I should state that I'm a complete newbie with SOAP and WSDL, although I've done plenty of other things with XML. The people in charge of the WSDL services don't speak Perl or anything other than Java, so they haven't been very helpful. My first step was to try to generate some classes, using the URL they gave me:

~$ wsdl2perl.pl -b wsdl_test/ -s http://sv-websvc-t1:9080/UAASCIAMWebS +ervices/services/UAASPort Use of uninitialized value $namespace in hash element at /opt/perl/lib +/site_perl/5.12.2/SOAP/WSDL/TypeLookup.pm line 235. Use of uninitialized value $namespace in hash element at /opt/perl/lib +/site_perl/5.12.2/SOAP/WSDL/TypeLookup.pm line 235. junk after document element at line 2, column 0, byte 64 at /opt/perl/ +lib/site_perl/5.12.2/SOAP/WSDL/Expat/Base.pm line 79 at line 2 at /opt/perl/lib/site_perl/5.12.2/SOAP/WSDL/Expat/Base.pm l +ine 82

I tried the trick I saw on a couple of posts here and tried appending '?wsdl' to their URL to get the WSDL, but that gave me another error. So they said "no, the WSDL is at another url", so I tried that:

~$ wsdl2perl.pl -b wsdl_test/ http://sv-websvc-t1:9080/UAASCIAMWebServ +ices/services/UAASPort/wsdl/ciam_uaas.wsdl [snip lots of "Creating complexType class" messages] Creating element class MyElements/createADAccountOutput.pm unsupported global type <faults:BaseFault> found in part <baseFault> Looks like a rpc/literal WSDL, which is not supported by SOAP::WSDL

I can't see anything in faults::BaseFault that looks any different from any other fault. wsdl_test/MyTypes/ has PM files for all of the types in faults.xsd including BaseFault, so I'm not sure what the error is telling me.

But more important (I think) is that I don't see the promised interface classes. How can I connect to this service?

Replies are listed 'Best First'.
Re: SOAP::WSDL isn't generating interfaces
by runrig (Abbot) on Jan 17, 2013 at 17:41 UTC

      I'm actually getting somewhere with SOAP::Lite, but it's a slog. I might try your suggestion instead.

        If anybody cares, here's how I got it to work:

        use strict; use Data::Dumper; use SOAP::Lite ; my $s = SOAP::Lite->new( proxy => "http://sv-websvc-t1:9080/UAASCIAMWebServices/service +s/UAASPort", uri => undef, ); $s->autotype(0)->readable(1); $s->ns("http://associate.insidecarefirst.com/ciamservices/service/uaas +_types", "uaas_types"); $s->ns("http://www.carefirst.com/ciam/services/uaas", "uaas"); $s->ns("http://associate.insidecarefirst.com/ciamservices/service/ciam +_types", "ciam_types"); $s->default_ns(''); my $r = $s->call("uaas:getContractorProfileInput", SOAP::Data->name('uaas_types:userName')->value('aaa364 +4') ); #print "dump: ", Dumper($r), "\n"; die "faultstring:", $r->fault->{faultstring} if ($r->fault); print "result:", Dumper($r->result), "\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1013794]
Approved by Corion
Front-paged by MidLifeXis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found