[Xml-compile] WSDL::Compile

"Alex J. G. Burzyński" ajgb at ajgb.net
Wed Nov 25 23:49:06 GMT 2009


Hi Mark,

Mark Overmeer wrote:
> * "Alex J. G. Burzyński" (ajgb at ajgb.net) [091125 16:51]:
>   
>> Example usage of the WSDL::Compile::Serialize
>>     
>
> Half of your code is in constructing and destructing objects, without
> added value. Although in a full application, those objects may be
> useful, it is overkill here.  Besides, the example demonstrates a use
> of XML::Compile::SOAP, not so much WSDL::Compile.  But any demo is
> better than none: please included that in your distribution.
That was an short example of WSDL::Compile::Serialize in conjunction
with XML::Compile::SOAP - how to turn class object into a hashref
expected by XML::Compile::SOAP and how to turn the hashref returned by a
call into a proper class.

Example::Op::CreateCustomer::Request shows that any extra logic could be
placed in BUILD method - like extended validation of class attributes,
calculating their values, calling other modules etc. I think that you
get the idea.

In future I'll try to add more detailed examples as clearly it may cause
some misunderstanding.

> XML::Compile also supports typemaps. You can use them to automagically
> map XML elements on Perl objects v.v. while reading/writing. This adds
> more abstraction to your code. You only have to add (de)serializers
> to your objects.
>   
I've not spotted that, thanks for pointer.

> By the way: wat is WSDL::Compile compiling?  XML::Compile compiles
> (produces runnable code) from a schema.  An other interpretation of
> the word "compile" is to construct something from smaller components.
> I assume you use that other interpretation, which is a bit confusing...
>   

The other interpretation is the correct one - .wsdl file is compiled
from moose classes which define SOAP operations.

Cheers,
Alex




More information about the Xml-compile mailing list