in reply to The sad state of SOAP and Perl

I thought that you are generally expected to write your WDSL by hand, that the generators don't work. To get SOAP on *my* Fedora Core 4 desktop, I typed cpan SOAP::Lite and it just worked. That is, all the tests that I expected to pass. If you look at what's failing, it's things like "someone else's host has changed" so now the test doesn't pass. You can rerun your tests w/o doing the public testing and will likely see that it works ok. If not, file a bug on http://rt.cpan.org.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: The sad state of SOAP and Perl
by jhourcle (Prior) on Apr 13, 2006 at 02:43 UTC
    I thought that you are generally expected to write your WDSL by hand, that the generators don't work.

    Well, some generators work ... but that's not necessarily a good thing.

    The problem is, not all languages implement their data structures in the same manner -- most modern languages have a concept of an associative array of some sort ... but is a struct, a dict, a mapping, or a hash? Are any of those even the same thing? Does it support multiple values for a given key? Does it require a specific order? Does it allow elements to be missing?

    It seems like a rather stupid thing, but what works in one language doesn't work in other languages. The solution is easy -- write the specification in something that doesn't deal with implementation details, and then force the language to implement the given specification.

    So, write the WSDL first, then if you want to use some sort of auto-generator, use it to help you set up your functions/methods/subroutines/whatever they're called in the given language.

    If you want to know more -- lurk on the SOAPBuilders mailing list for a while, or look for the various SOAP Interop testing, or search for 'SOAP impedence error'

Re^2: The sad state of SOAP and Perl
by jdrago_999 (Hermit) on Apr 12, 2006 at 23:10 UTC
    I thought that you are generally expected to write your WSDL by hand, that the generators don't work.
    I thought so too, which seemed really odd since .NET has the WebMethod attribute which sets up some automagickal WSDL/webservice thing that does what you need to expose your code as a webservice.
    Example: Creating web services with .Net and Visual Studio

    Example:
    [WebMethod] public string greet( string name ) { return "Hello, " + name; }
    The POD sections that Pod::WSDL looks for are pretty much along the same lines.
    =begin WSDL _IN name $string _RETURN $string =cut sub greet { my ($s, $name) = @_; return "Hello, $name!"; }
    I typed cpan SOAP::Lite and it just worked.
    If you're using Apache 1.3x that works just fine.

      Java does that too. With the latest Java, you can easily expose your web service through simple annotation like @WebService, @WebMethod.

      Perl's support of WSDL is really poor.

        Thanks for the tip on Java -

        I assume reflection is used to figure out what parts to document in the WSDL (names, arguments, return values, etc).