[Xml-compile] Help with compiling serializers and de-serializers

Bill Moseley moseley at hank.org
Mon May 23 21:01:41 GMT 2011


On Mon, May 23, 2011 at 12:54 PM, Mark Overmeer <mark at overmeer.net> wrote:

>
> (after waiting half an hour to get Moose installed) I do get a header. My
> output:
>

Moose, yes that can be painful to install.  But, what do you need Moose for?
 Are you testing with Catalyst?  My example scripts didn't have any
dependency on Moose.



>  ...
>    }
>  ],
>  'HeaderInfoParameters' =3D> [
>    {
>      'imsx_messageIdentifier' =3D> '1',
>      'imsx_version' =3D> 'V1.2'
>    },
>    {
>      'imsx_messageIdentifier' =3D> '1',
>      'imsx_version' =3D> 'V1.0'
>    }
>  ]
> };
>

Oh my.  Indeed this works:

$wsdl->call( 'createPerson',
    {
        HeaderInfoParameters =3D> {
         'imsx_messageIdentifier' =3D> '1',
         'imsx_version' =3D> 'V1.2'
       },
        #imsx_version =3D> 1.0,  # complains
        sourcedId    =3D> time,
        personRecord =3D> {
            sourcedGUID =3D> {
                sourcedId =3D> time,
            },
        },
    },
);


If you look at the XML example request in my scripts the <Body> is this:

   <soapenv:Body>
      <ims:createPersonRequest>
         <ims:sourcedId>TST_4dd116b66fc61833726232_1234</ims:sourcedId>

And the <Head> is like this:

    <soapenv:Header>
          <ims:imsx_syncRequestHeaderInfo>
             <ims:imsx_version>V1.2</ims:imsx_version>

So,  <ims:sourcedId> and <ims:imsx_version> are nested equally which is why
I was trying that.  Second:

my $op =3D $wsdl->operation( 'createPerson' );
print $op->explain( $wsdl, PERL =3D> 'INPUT' );


shows nothing about HeaderInfoParameters.  Should explain also include info
about the header?



> Which version of XML::Compile, ::Cache and ::SOAP do you have?
>

XML::Comple: $VERSION =3D '1.21';
XML::Compile::SOAP $VERSION =3D '2.23';




> > If you look at Daniel's Catalyst::Controller::SOAP you can see he also =
is
> > inspecting {input_def} directly, too.  The problem with that code is it
> > assumes that there's only a <Body> element.
>
> Yes, that's the reason I denied his code to my namespace. There is a
> cleaner interface for most things he is doing and where interfaces are
> missing, I offered him to add it. But he was not interested in clean
> code.
>

Ok, I'll work some more on figuring out how to use that cleaner interface.

Thanks,


-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20110523/aa=
14da17/attachment.htm


More information about the Xml-compile mailing list