Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SOAP::Lite service stubs

I have been looking at this soap lite tutorial about generating service stubs using WSDL URL. However my data structures are more complex and have nested elements. The tutorial covers how to create complex structures using SOAP::Data. This seems very manual.

In other languages like Java it is very easy to stub the request object and use method calls to set the parameters. Is there a way to get a request object where I can then simply make method calls on the object to set the parameters rather then "manually" writing out the complex data structure using SOAP::Data as in the tutorial and SOAP::Data documentation?


Note: SOAP::Lite is not SOAP::WSDL. The SOAP::WSDL documentation states:

This module has a large number of known bugs and is not being actively developed. This 3.0 release is intended to update the module to pass tests on newer Perls. This is a service to existing applications already dependent on this module.

So the current supported modules are either SOAP::Lite or XML::Compile::SOAP.

like image 298
Chris Doyle Avatar asked Dec 18 '14 10:12

Chris Doyle


1 Answers

WSDL is not actually part of the SOAP standard. WSDL was a separate standard that is commonly used with SOAP by Java/.Net et alia.

It looks like you want the Java "Point the IDE at the WSDL" method. This is no substitute for understanding the SOAP protocol. I highly recommend learning how to make manual SOAP calls and debug them - before you wind up in a situation where you have to do it on a deadline. I have known many Java 'Web Services' programmers who didn't even know how the protocol worked because the IDE wrote most of the infrastructure for them.

That said, the excellent XML::Compile::WSDL11 will probably do what you want.

like image 82
arafeandur Avatar answered Sep 20 '22 15:09

arafeandur