Re: [SOAP] Custom SOAP Types of Custom SOAP types?

From: Date: Sat, 24 May 2003 20:05:31 +0000
Subject: Re: [SOAP] Custom SOAP Types of Custom SOAP types?
References: 1 2  Groups: php.soap 
Request: Send a blank email to php-soap+get-665@lists.php.net to get a copy of this message
I was doing some reading and I came across someone talking about building a usertype that extends another usertype. So I could have a base type of vehicle, and derived types of car and truck. Letting me re-use the definition of vehicle that I've already created. And then I should be able to pass back an array of vehicles weather they are cars or trucks, and have my client be able to handle everything seamlessly. The information I came across was talking about the restricted tag and the base attribute. I was wondering if anyone new any more about this, or if there are some conventions in PEAR::SOAP to deal with this? Rob "Shane Caraveo" <shane@caraveo.com> wrote in message news:3ECF976D.9090504@caraveo.com... > I guess I'm not certain what you mean by 'inheritance with SOAP'. SOAP > is an xml messaging system, not an object layer. You need to do your OO > stuff in the client or server, and pass the xml message that will > sufficiently provide the data needed on the other end. > Shane > > Rob Booth wrote: > > I have a wierd problem that I've been banging my head against for some time. > > > > I'm trying to simulate inheritance with SOAP (if SOAP does this I haven't > > found any information about it). So I have an object that has 4 fields only > > 1 of which will be populated at any time. These fields represent derived > > objects. When I populate one of these fields and then build my SOAP_Value I > > get this: > > - <ns4:GetPlayPlanResponse> > > - <PlayPlan xsi:type="SOAP-ENC:Array" > > SOAP-ENC:arrayType="ns4:IntervalPlayPlan[1]" SOAP-ENC:offset="[0]"> > > - <IntervalPlayPlan xsi:type="ns4:IntervalPlayPlan"> > > ---DataRemoved--- > > </IntervalPlayPlan> > > </PlayPlan> > > </ns4:GetPlayPlanResponse> > > > > What I think I should be getting back is this: > > > > - <ns4:GetPlayPlanResponse> > > - <PlayPlan xsi:type="ns4:PlayPlan"> > > - <IntervalPlayPlan xsi:type="ns4:IntervalPlayPlan"> > > ---DataRemoved--- > > </IntervalPlayPlan> > > </PlayPlan> > > </ns4:GetPlayPlanResponse> > > > > Has anyone run into anything like this? Or does anyone know if I can build > > Inheritance into my SOAP Types? I've been able to force PEAR::SOAP to > > generate the second response if I add a simple type to my PlayPlan object, > > or if I set more than 1 of my fields to a value. But when I only have one > > field populated and the others are null I get that encoding section. > > > > Any help is appreciated, > > Rob > > > > > > > >

« previous php.soap (#665) next »