OK, so according to all the docs and other hype, SOAP is simple and easy to use, right? Yeah, pull the other one, I've got bells on that one.

According to the docs I ought to be able to generate a module with simple

D:\Perl\bin\stubmaker.pl http://webservices.seek.com.au/marketsegment. +asmx?wsdl
and then call the methods with something like
use MarketSeg; print MarketSeg::GetMarketClassifiers('Main Exec');
Yeah, all those that believe this raise your hands! (Not just your right or left one, both. Yeah, that's more like it.)

I wont talk about all the things I tried (adding use SOAP::Lite +trace => [ all, -transport ]; on top of the test script was one of the first ones), here's the result. In the generated MarketSeg.pm I had to replace

-> call($method => map {@templates ? shift(@templates)->value($_ +) : $_} @_);
by
-> call( SOAP::Data->name($method)->attr({xmlns => 'http://webse +rvices.seek.com.au'}) => map {@templates ? shift(@templates)->value($ +_) : $_} @_);
and in the test script instead of the promised
print MarketSeg::GetMarketClassifiers('Main Exec');
by
my $params = SOAP::Data->new(name => 'marketSegment', value => 'Main E +xec'); print MarketSeg::GetMarketClassifiers($params);

Yeah, SOAP is cool. SOAP is simple. SOAP is just perfect. Maybe I'll live long enough to see it actually work.

For reference I have SOAP::Lite 0.60, ActivePerl v5.8.0 build 805 under Win2K SP4 Server.

Jenda
P.S.: If all job boards were as eager to adopt great new technologies and "carefully" design their integration specs as SEEK.com.au, we would not be delivering jobs to hundreds of boards, but to tens at most. Yeah, "we are the biggest job board in Australia and New Zealand and noone had any complaints against the integration yet." Sure, they only had to integrate with you.
P.P.S.: If anyone tries to make the stubmaker.pl and SOAP::Lite actually work with .Net SOAP servers either use a different service or make sure the parameter you send this one is "Main Exec" or one of the other defined market segments. The service crashes with an System.NullReferenceException exception if you try something that's not in the list. Go figure.

Replies are listed 'Best First'.
Re: Of SOAP and men, aka "It's perfectly simple" they say
by Joost (Canon) on Mar 08, 2005 at 15:11 UTC
      Neither simple, nor object, unless you call anything you can access on the web an object. Discovering that SOAP has no support for OO programming was a big surprise to me.
Re: Of SOAP and men, aka "It's perfectly simple" they say
by Jenda (Abbot) on Mar 08, 2005 at 17:28 UTC

    Update:
    I did get the

    use MarketSeg; print MarketSeg::GetMarketClassifiers('Main Exec');
    to work. The code generated by stubmaker.pl contained this:
    my %methods = ( RpcGetMarketClassifiers => { endpoint => 'http://webservices.seek.com.au/marketsegment.asmx', soapaction => 'http://webservices.seek.com.au/RpcGetMarketClassifi +ers', uri => 'http://webservices.seek.com.au', parameters => [ SOAP::Data->new(name => 'marketSegment', type => 's:string', att +r => {}), ], }, GetMarketClassifiers => { endpoint => 'http://webservices.seek.com.au/marketsegment.asmx', soapaction => 'http://webservices.seek.com.au/GetMarketClassifiers +', uri => '', parameters => [ SOAP::Data->new(name => 'parameters', type => '', attr => {}), ], }, );
    Not sure what's the Rpc... version supposed to be good for, but if I copy the parameters => [...] from the RpcGetMarketClassifiers to the GetMarketClassifiers it starts to work. Erm, OK.

    Jenda
    We'd like to help you learn to help yourself
    Look around you, all you see are sympathetic eyes
    Stroll around the grounds until you feel at home
       -- P. Simon in Mrs. Robinson

Re: Of SOAP and men, aka "It's perfectly simple" they say
by Mutant (Priest) on Mar 08, 2005 at 17:49 UTC
    My one foray into using SOAP left me with a similar bitter taste in my mouth. I'm wondering if this is just a Perl issue, or if it's the whole protocol that's broken.