in reply to SOAP::Lite, .NET, and complex structures

As is my tradition in these parts, I recommend SOAP::WSDL because it solves the following problems:

At most, you'll have to change the contents of the default on_action handler to reflect your server's SOAPAction expectations (it works straight away for .NET based services).

-David

  • Comment on Re: SOAP::Lite, .NET, and complex structures

Replies are listed 'Best First'.
Re^2: SOAP::Lite, .NET, and complex structures
by MidLifeXis (Monsignor) on Aug 10, 2007 at 14:20 UTC

    Thanks, but isn't SOAP::WSDL a client library? Perl is running the service, and an MS client is reading the data as a .NET service.

    If I am wrong, I would be happy to learn more about it, but my reading of the documents indicates that SOAP::WSDL is only a client.

    --MidLifeXis

      Ok, I didn't understand it that way from your description.

      The .NET client is likely doing all the right things wrt SOAP, so let's look at the perl web-service (assuming you used the standard tools to generate your proxy class).

      Firstly, are you publishing WSDL for your service? If so, how did you construct it?
      If your WSDL is not exactly correct, you'll get all sorts of namespace/type/arity issues.

      I use Pod::WSDL to generate WSDL from my web-service classes. It requires you to add some POD to each method and class because perl doesn't handle types/arity statically. In practice, this just makes your class better documented.

      WSDL descriptions of each method can generally be a little loose because perl (and SOAP::Lite) doesn't really molest the data too much before passing to the method... however, it's really important to properly describe (annotate) your classes (complex types).

      I actually have my web-services serve up the WSDL at http://server/path/to/service?WSDL

      Microsoft's wsdl.exe proxy class generator tool should have no problem consuming WSDL generated by Pod::WSDL.

      -David

        Do you have an example of returning a complex structure to the client? I see the examples of returning complex error types, can get arrays of internal types to return with no problem, but cannot, for the life of me, figure out how to get a complex type returned.

        I will be digging into the source, but if there is an example of this somewhere, it would be most helpful.

        thanks,

        --MidLifeXis