The complexity of WSDL has exceeded my level of interest in deciphering the complexity of WSDL.
I tried to wrestle my way through the arcana of WSDL, but I'm giving up. I don't doubt that it can be done, but I don't care enough to work my way through it.
this WSDL file describes
method. At least, the
1 2 #!/usr/bin/perl -- # -*- Perl -*- 3 4use SOAP::Lite; 5 6my $usage = "$0 userid\n"; 7 8my $userid = shift @ARGV || die $usage; 9 10my $wsdl = "http://norman.walsh.name/2005/02/24/examples/witw.wsdl"; 11my $service = SOAP::Lite->service($wsdl); 12 13my $result = $service->name($userid); 14 15print "$userid is $result\n"; 16 17
If it works in some tool that you have, I'd been keen to hear it. Likewise, if it doesn't work and you know how to fix it, I'd like to hear that too.
I tried to extend the file to support all of the methods provided by my SOAP server, but I gave up. I bungled it, or the tools I tried are buggy, or both. Sometimes I got incomprehensible error messages, sometimes I got incomprehensible results, and sometimes the code just went off into an infinite loop.
That said, I do think some sort of web services description language is necessary. While XML geeks may be happy building fancy URIs and parsing XML result documents to get work done, I'm afraid your average programmer isn't going to go for that.
The WITW project uses a function to calculate the distance between two points on the earth. I use that function by declaring it and calling it:
1use Math::Trig qw(great_circle_distance); 2… 3$dist = great_circle_distance($lat, $long, $llat, $llong, $radius);
Now suppose the implementation of
great_circle_distance was a web service. It could
be a straight-forward REST web service or it could be some sort of RPC
or it could be something else. As a programmer writing WITW,
I don't care! What has to happen is, I declare the
function and then I use it. A little boilerplate is OK, but making
me understand URIs or GET or POST or XML isn't.
I think something dramatically simpler than WSDL could get the job done most of the time. We know the hard things are possible, we just have to make the easy things easy.