in reply to Re: Starting on SOAP
in thread Starting on SOAP
In the beginning I tried creating objects (bless {...}) and pass them to SOAP to create the xml-message, but this didn't worked well. Most of the times it created SOAP-xml that wasn't what the other side expected i.e. it was useless.SOAP::Lite has absorbed some but not all functionality from SOAP::WSDL.
So my final solution was to use SOAP::Lite like wrapper for the communication and build the XML myself via Template-toolkit. I find the pseudo XPath expressions you can use on the result very useful.
If you want to send objects (complexTypes) to a SOAP web-service use SOAP::WSDL. It works. Really.
Hand-building XML for SOAP (even using templates) is just a waste of time. That's what WSDL is for.
The only conceivably non-useless scenario I can think of for partially building SOAP messages with templates is the case where the web-service expects Document/Literal (or .NET) encoding, but at the same time allows for recursively defined complexTypes to be passed. That's quite a lot more complicated than what most developers have to deal with.
Everyone should know that "SOAP Interoperability" is a cosmic-scale joke perpetrated on the industry by hermit-like evil geniuses.
That being said, it's still much better to use SOAP::WSDL and to override its default behaviour where necessary. If you find you're using set of overrides a lot, create a sub-class of SOAP::WSDL. Simple.
The bad thing about this approach is that you have to read .wsdl and .xsd specs :( arggh..If you've gone down this path because SOAP::Lite / SOAP::WSDL don't yet implement the WSDL 'import' construct... that's a little drastic :-)
One more thing to know about .wsdl. What SOAP::Lite does is it parses the .wsdl file and creates a module on the fly with all the methods, but that is. It does not go further to parse .xsd schemas, so you are on your own from there.
You have a few options:
-David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Starting on SOAP
by rootcho (Pilgrim) on Nov 15, 2007 at 02:26 UTC |