You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Duncan Cameron <dc...@bcs.org.uk> on 2000/11/17 20:51:36 UTC

Re: PERL and complex Data objects

Rick

Are you using the Devlopmentor Perl library?  That has a restriction on using Perl 
objects.  I recommend SOAP::Lite which allows arbitrary Perl objects to be used, get it  from CPAN or http://geocities.com/paulclinger/soap.html

As this list seems to have a very low Perl content you might also want to subscribe to the Developmentor SOAP mailing list at http://discuss.develop.com.

Regards,
Duncan Cameron


On 17/11/2000 at 14:10:00, Rick Fisk <rf...@cisco.com>  wrote concerning 'PERL and complex Data objects':
>
>Date: Wed, 15 Nov 2000 15:10:40 -0800
>To: soap-user@xml.apache.org
>From: Rick Fisk <rf...@cisco.com>
>Subject: PERL and Complex Data objects
>Message-Id: <20...@fargo.cisco.com>
>
>I've installed the Perl version of SOAP and am wondering if this is the
>right place to talk about it.
>
>I  keep getting Parser errors when trying to create complex data structures.
>
>It appears as if SOAP is only designed to handle simple objects (duh!
>probably) but
>I have come up with a remedy using Data::Dumper and eval so that I can pass
>complex 
>objects within simple SOAP objects.
>
>I am trying to create a unix CLI which uses SOAP to initiate an oracle sql
>query and return a list of 
>objects. I decided to see if SOAP could be my RPC-like interface rather
>than create something from scratch using LWP and having to deal with URL
>encoded data.
>
>It's working pretty well but I worry about how I am passing back data in
>that it could be breaking the spec.
>
>Within the body, I define an xml element that contains a Data::Dumper
>output of a hash. Eval'ing that string
>recreates the hash which itself contains more hashes.
>
>Other SOAP->body elements contain "dumped" arrays which can also be
>reconstructed using eval. 
>
>( I use these arrays to pass through the order in which the data was
>returned from the DB and the header values for displaying that data as
>hashes [as returned by DBI->fetchrow_hashref] do not keep the data objects
>in the same order for which they were requested).
>
>I've had to go this route because when trying to use SOAP elements to
>define this complex data structure (SOAP::Struct->new($complex_hash)) I
>always end up with SOAP::Parser errors. 
>
>My method seems to deliver exactly what I want, but I'm just curious about
>how others have solved this problem and whether or not the "correct" way to
>handle this  is to create a complex series of SOAP header/body elements
>rather than passing long strings...
>
>Perhaps this is a problem with the current Perl SOAP implementation?
>
>Rick Fisk
>Cisco Systems 
>EMAN
>rfisk@cisco.com
>