Loading ...
Sorry, an error occurred while loading the content.

94Re: [soaplite] non-RPC usage for SOAP::Lite

Expand Messages
  • Paul Kulchenko
    Mar 5, 2001
    • 0 Attachment
      Hi, Alvaro!

      --- wagner19722001@... wrote:
      > Do I *really* need to call freeform() to serialize my data or
      > access
      > the XML docs in the envelope? SOAP::Serializer docs says the above
      > method "lets you build your own payload inside a SOAP envelope".
      Yes, it's basically does the same as method(), so it build envelope,
      but method() has little bit special logic for method element (like
      put uri on it) and freeform() method doesn't do anything with it,
      just put everything as is inside the envelope.

      If you have XML generated somewhere and want to include it inside the
      message than you can take a look into 'xml' type, whi let you write
      SOAP::Data->type(xml => '<element>value</element>') and include XML
      fragment into your payload or write your own serializer (next version
      will include XML::DOM example for serialization/deserialization).

      > Or merely should I use SOAP::Custom::XML methods as pointed in
      > t/05-customxml?
      SOAP::Custom::XML can be used only on parsing side (it simplifies
      interface for parsing messages, and couldn't be used for creating

      > I would like Paul or someone to explain freeform() usage and maybe
      > some example.

      ->freeform(SOAP::Data->name(root => {a => 1}));

      will generates:

      <root xsi:type="namesp1:SOAPStruct"
      <a xsi:type="xsd:int"


      ->method(method => SOAP::Data->name(root => {a => 1}));

      will generates:

      <root xsi:type="namesp2:SOAPStruct"
      <a xsi:type="xsd:int"

      Envelope skipped in both cases.

      As you see the only difference is 'method' element (ad your control
      on it). The important question is who (and how) will handle this
      package on server side (you may, for example, create AUTOLOAD sub on
      server side in your package and it'll catch ALL dispatched calls, but
      server side of SOAP::Lite will treat 'root' element in first case as
      method's name and others as parameters, that could be not what you
      want. There is no way to alter this behavior on server side for now
      as far as I understand.

      Hope it gives you some ideas and if it won't help, please provide
      some details of what do you want to achive, maybe we could help with

      Best wishes, Paul.

      Do You Yahoo!?
      Get email at your own domain with Yahoo! Mail.
    • Show all 3 messages in this topic