4

Does SOAP::Lite can be used for creating document/literal web services ? While it does support writing clients for an existing document/literal web services I cannot find how to created a document/literal server.

Is there any other module that enable this ?, it will also be helpful if there is a simple way to generate the WSDL for such a service, I tried using POD::WSDL, but the other side could not access it (while using SOAP::Lite I can use the WSDL)

Thanks

Roeya
  • 111
  • 7
  • 1
    Pod::WSDL just creates a document from your perl Class - outputing it as a string, usually. You still need to 'serve' it somehow to the client from your webserver (as a .wsdl file). If you're implementing the web-service part from scratch (rather than on top of CGI/mod_perl/NGinX/dancer, etc), then you'll need to add a "route" to serve the .wsdl document. You'd usually have the end-point serve an HTML page which contains human readable documentation, perhaps some test forms, and finally, a link to your WSDL route. – David-SkyMesh Dec 26 '13 at 11:35
  • I have used POD::WSDL with SOAP::Lite, the POD::WSDL was used to generated the WSDLand SOAP::Lite to implement the service however both where RPC/ENCODED – Roeya Jan 07 '14 at 08:56
  • You've written that `the other side could not access it`. Do you mean the "other side" can't download the WSDL, can't consume it, or doesn't understand it? Doc/Lit services are certainly possible, but I wouldn't use SOAP::Lite. Here someone got it working nicely with XML::Compile::SOAP::Daemon - https://rt.cpan.org/Public/Bug/Display.html?id=86079 – David-SkyMesh Jan 07 '14 at 10:52
  • That's actually a bug report above, but it's not an issue you're likely to have noticed and it has since been fixed. – David-SkyMesh Jan 07 '14 at 10:52
  • I seriously doubt POD::WSDL will be up to creating the WSDL for you; I'd construct it by hand. – David-SkyMesh Jan 07 '14 at 10:53

1 Answers1

0

I think XML::Compile, XML::Compile::SOAP and XML::Compile::WSDL11 are the modules you want to use when building a (modern) SOAP server and/or client.

Those modules provide a way to create both SOAP servers and clients. They can work with WSDL files to load definitions automatically, or you can do that manually. They also support "document" and "RPC" modes.

Another cool feature of these modules is that they can parse the WSDL and (if applicable) XSDs, and generate example Perl data structures from them, so you know what to expect when writing a handler (or want to know what arguments to supply when writing a client).

Martijn
  • 1,620
  • 9
  • 18