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

Re: [soaplite] The fog lifted. But problems still appear

Expand Messages
  • Duncan Cameron
    ... I m afraid that I have lost track of quite what you are trying to achieve
    Message 1 of 7 , Nov 12, 2003
    • 0 Attachment
      At 10:24:01 on 2003-11-12 Tilman Baumann <Tilman.Baumann@...> wrote:

      >Tilman Baumann wrote:
      >
      >> If i put them all into a array, i see them all at the serverside.
      >
      >The array is sadly not named. So it would be maybe a bit dificult to
      >parse at the serverside.
      >Is there a way to create something like
      ><anpsrechpartners xsi:type="SOAP-ENC:Array">
      ><ansprechpartner/>
      ><ansprechpartner/>
      ><ansprechpartner/>
      ></anpsrechpartners>
      I'm afraid that I have lost track of quite what you are trying to achieve <;
      If you are using SOAP::Lite on both client and server and not concerned about interoperability then you may as well use SOAP::Lite's automatic encoding of Perl variables
      to send an array you need to pass an array ref
      to send a hash you need to pass a hash ref

      so maybe your example could be coded as

      $soap->method({
      'name' => 'Tilman',
      'ansprechpartner' => [
      {name => 'foo', email => 'foo@bar'},
      {name => 'foo2', email => 'f002@bar'}
      # etc
      ]
      }
      );
      Your server method will receive a hash ref through which it can access the individual elements and the array.

      If you really need to access the SOAP envelope from your server class then you need to inherit from SOAP::Server::Parameters, see the section in the docs "ACCESSING HEADERS AND ENVELOPE ON SERVER SIDE"

      Regards
      Duncan
    • Byrne Reese
      Let me suggest you use an attachment. It is a much easier solution than trying to embed a base64 encoded file into some XML. Use SOAP::Lite v0.60, or
      Message 2 of 7 , Nov 12, 2003
      • 0 Attachment
        Let me suggest you use an attachment. It is a much easier solution than
        trying to embed a base64 encoded file into some XML.

        Use SOAP::Lite v0.60, or SOAP::Lite v0.55 with SOAP::MIME. Even though the
        two toolkits are merged in 0.60, the code samples are the same:

        http://www.majordojo.com/SOAP-MIME/

        > I banished the thought of making object oriententated programminig in
        > SOAP. But problems still stay. :)
        >
        > So sending data to the server runs perfect. I'm sending the data in
        > great perl hashes wich SOAP::Lite convert verry well.
        >
        > So, the server has to send the client a file (or lets say a bytestream)
        > in some cases.
        > I saw no examples they describe a way to do this.
        > I think i need a filed with type xsi:type="SOAP-ENC:base64".
        >
        > (My real part is the client, but i have to implement a testserver since
        > there is no real server. Other people has to implement the real server
        > towards my specification...)
        >
        > Thank you again :)
        >
        > PS: I did'nt saw my last post apper at the list. You neither?
        >
        > --
        > Tilman Baumann
        >
        > pyramid computer GmbH
        > Boetzinger Strasse 60 D-79111 Freiburg
        >
        > ----------------------------------
        > They who would give up an essential liberty for temporary security,
        > deserve
        > neither liberty or security
        > - Benjamin Franklin
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Sponsor
        >
        >
        > ADVERTISEMENT
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        >
        >
        >
        >
        >


        ^byrne :/
      • Byrne Reese
        Duncan is right - you need to extend SOAP::Server::Parameters. There is a good article that provides these code samples:
        Message 3 of 7 , Nov 12, 2003
        • 0 Attachment
          Duncan is right - you need to extend SOAP::Server::Parameters. There is a
          good article that provides these code samples:

          http://builder.com.com/5100-6389-1046624.html
          http://builder.com.com/5100-6389-1052448.html

          >
          >
          >
          >
          >
          > Well, i think i 'm in the know now. Mostly...
          >
          >
          > I have still one single Problem. How do i access parts at the serverside
          > when they are like a array.
          >
          > Like this: (Code at the clients side)
          > (it's not necessary to understnad the german words... :) )
          > SOAP::Data-
          >
          >
          >
          >
          > To unsubscribe from this group, send an email to:
          > soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
          >
          >
          >
          >
          >


          ^byrne :/
        Your message has been successfully submitted and would be delivered to recipients shortly.