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

RE: [soaplite] Returning multiple values from a SOAP::Lite server

Expand Messages
  • simon.fairey@ft.com
    Well the client will be Python but what I was wondering is whether there is a safe standard way to return things that then lead to minimal fiddling on the
    Message 1 of 3 , Aug 16 9:01 AM
    • 0 Attachment

      Well the client will be Python but what I was wondering is whether there is a safe standard way to return things that then lead to minimal fiddling on the client side. For example is it better to return name value pairs (or a hash) rather than an array (I know SOAP::Lite handles typing of parameters to a certain extent.)

      Basically can I just do:

              return('soap', 'is', 'clean', 'and', 'easy');

      and leave it to the client to handle interpretation, I also guess from your response that I need to do more reading on SOAP in general to better understand how the protocol works.

      Thanks

      Si



      "Andersson, Kimmo" <Kimmo.Andersson@...>

      16/08/2002 12:00

             
              To:        "'simon.fairey@...'" <simon.fairey@...>, soaplite@yahoogroups.com
              cc:        
              Subject:        RE: [soaplite] Returning multiple values from a SOAP::Lite server





      Hi !

       

      You did not mention with which language Your client is implemented.

       

      I have a SOAP client, actually a C++ library. So I had to embed Perl into my C++ code. Actually I have a own Perl module between C++ and SOAP::Lite. My Perl module returns the SOAP response as an array and I have no problems on C++ side while reading that array from the Perl stack.  Perl_call_argv returns the number of items Perl put into the stack. Just read that many items from the stack with POPp-function in a loop.

       

      But remember that they come from the Perl stack in reverse order. I put them into a STL list with push_front so they are then in the list automatically in the correct order.

       

      A bigger problem was that my library provides support for several different SOAP messages. The SOAP array from paramsout() might contain several arrays, or one array or none. So I have go through the array and de-reference the arrays in it. So only an array containing scalars is returned from my Perl module to C++.

       

      BR

       

      Kimmo Andersson

       

      Yomi Solutions Ltd                   E-mail:  Kimmo.Andersson@...

      P.O Box 354, Piippukatu 11     Mobile:  +358 50 384 3734                                                 

      FIN-40101 JYVÄSKYLÄ      Fax :     +358 14 240 4709

      FINLAND                                  



      -----Original Message-----
      From: simon.fairey@... [mailto:simon.fairey@...]
      Sent: 16. elokuuta 2002 16:18
      To: soaplite@yahoogroups.com
      Subject: [soaplite] Returning multiple values from a SOAP::Lite server

       


      Hi,

      I'm fairly new to SOAP and still getting my head round the protocol. I have a simple Apache & mod_soap client-server working and my question is this:

      I know I can return an array of results and use paramsout() to get the full list but if the client is not written in Perl then should I be returning the data in a more standard form rather than just:
              return @array_of_data;

      I've hunted around the web for info and am a bit lost, a pointer to some examples etc would be more than sufficient. Think I'll go buy SOAP book (any recommendations?)

      Thanks

      Si

      This email may contain confidential material. If you were not an
      intended recipient, please notify the sender and delete all copies.
      We may monitor email to and from our network.




      Yahoo! Groups Sponsor

      ADVERTISEMENT
      [IMAGE]







      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.



      This email may contain confidential material. If you were not an
      intended recipient, please notify the sender and delete all copies.
      We may monitor email to and from our network.
    Your message has been successfully submitted and would be delivered to recipients shortly.