Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

SOAP::WSDL isn't generating interfaces

by ptomblin (Initiate)
on Jan 17, 2013 at 14:32 UTC ( #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:

~$ -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/ line 235. Use of uninitialized value $namespace in hash element at /opt/perl/lib +/site_perl/5.12.2/SOAP/WSDL/ 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/ line 79 at line 2 at /opt/perl/lib/site_perl/5.12.2/SOAP/WSDL/Expat/ 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:

~$ -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/ 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?

Comment on SOAP::WSDL isn't generating interfaces
Select or Download Code
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(" +_types", "uaas_types"); $s->ns("", "uaas"); $s->ns(" +_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?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-07-12 15:21 GMT
Find Nodes?
    Voting Booth?

    When choosing user names for websites, I prefer to use:

    Results (240 votes), past polls