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

2170Re: [soaplite] Beginner question

Expand Messages
  • Paul Kulchenko
    Dec 8, 2002
    • 0 Attachment
      Hi Thomas,


      --- absolsp <absolsp@...> wrote:
      > How do I create a simple structure like the following
      >
      > @data = (['Data Segment', 'Payload segment']);
      I'm not sure that this code returns the structure you want to have.
      Probably you need to use:

      $data = ['Data Segment', 'Payload segment'];

      -OR-

      @data = ('Data Segment', 'Payload segment');

      > into
      >
      > <refseg href="ref-12345"/>
      > <data id="ref-12345" SOAP-ENC:root="0">
      > <segment1> Data segment </segment1>
      > <segment2> Payload segment </segment2>
      > </data>
      >
      >
      > Does SOAP Lite automatically create the "ref-12345" id's or do I
      > need to supply them?
      You don't need to do anything special. SOAP::Lite will generate
      multireferences for you if there is more than one reference to the
      same variable.

      > Is it possible to create the structure as
      >
      > <refseg>
      > <data id="ref-12345" SOAP-ENC:root="0">
      > <segment1> Data segment </segment1>
      > <segment2> Payload segment </segment2>
      > </data>
      > </refseg>
      >
      >
      > In the second case, the tag <data> is now embedded inside the
      > <refseg> tag. Does SOAP give you control on which type of xml is
      > output (referenced data or embedded data). Any pointers to help me
      > create the both the first and second type of output will be highly
      > appreciated.
      As far as I understand, second structure is NOT the same as the first
      one. Yes, SOAP::Lite allows you to specify how multiple references
      have to be encoded: inline or separate. multirefinplace() method of
      serializes makes all multireferences inlined. Keep in mind that not
      all SOAP implementations can deal with it (even though there is some
      ambiguity around it, most people believe that it's disallowed by SOAP
      spec; that's why it's turned off by default in SOAP::Lite).

      Best wishes, Paul.

      __________________________________________________
      Do you Yahoo!?
      Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    • Show all 4 messages in this topic