[Xml-compile] Help with compiling serializers and de-serializers
Bill Moseley
moseley at hank.org
Mon May 23 03:41:03 GMT 2011
On Sun, May 22, 2011 at 3:11 PM, Mark Overmeer <mark at overmeer.net> wrote:
> * Bill Moseley (moseley at hank.org) [110522 19:41]:
> > Is only showing me code to create a client, which I don't need.
>
> Ah, yes, you are using the Catalyst connector, which I did not write so
> do not support.
>
Actually, I'm not using that right now. All I'm trying to do is map a SOAP
XML request =3D> Perl data, and Perl data =3D> SOAP XML response.
The WSDL I'm working with defines both a Header and Body and I need to
decode/encode both, not just the Body.
>
> > And then it only shows "Parameters" which is the data only for the
> > createPersonRequest, and says nothing about "HeaderInfoParameters" for
> > the imsx_syncRequestHeaderInfo data.
>
> That can be considered a missing feature/bug. I'll add that. But the
> example may help you a bit. You can also use $wsdl->template($type,
> 'PERL')..
> ro see data-types.
>
Just to be clear, is these statements correct?
1) XML::Compile should be able compile a single subroutine that in one
operation will move the SOAP request =3D> Perl, and then Perl back to SOAP
response and process both the Header and Body?
2) XML::Compile currently cannot do #1?
I was able, with multiple parser subs (one for the element in the Header and
on for the element in the Body), get the code working round-trip. That is,
I can take the full XML (Header and Body) and return a Perl data structure.
I can also do the reverse.
I'm accessing $operation->{input_def} and $operation->{output_def} directly,
which we know is wrong, but I'm not sure how else to do it. I'm also not
clear if my approach will work with other WSDL files.
I re-uploaded to http://hank.org/soap_compile.pl. My question is with the
current state of XML::Compile::SOAP is there any other approach that what
I'm doing in that script?
>> There's two input sections. Can I compile a single subroutine to
> >>> parse/de-serialize a message that includes both the header and body?
> And
> >>> likewise, create a single sub to encode/serialize?
> > That's good news. Is there an example you can point me to?
>
> It should always work, no special example needed. However, probably you
> are stuck to the Catalyst component which I did not write.
>
Again, I'm not using that Catalyst controller at this point. Once I can
move XML <=3D> Perl for the request and response adding it to Catalyst will=
be
no problem. I just would like to make sure I'm using XML::Compile as it was
intended.
Thanks for the help, Mark.
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20110522/bc=
322f4a/attachment-0001.htm
More information about the Xml-compile
mailing list