Re: [SOAP] Custom SOAP Types of Custom SOAP types?
| From: | Rob Booth | Date: | Sat, 24 May 2003 20:48:11 +0000 |
| Subject: | Re: [SOAP] Custom SOAP Types of Custom SOAP types? | ||
| References: | 1 2 3 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-667@lists.php.net to get a copy of this message | ||
That's what I'm looking for.
Has anyone tried this with PEAR::SOAP or the Disco Server?
Rob
"Andrei Ivanov" <andrei.ivanov@ines.ro> wrote in message
news:Pine.LNX.4.50L0.0305242334420.3625-100000@webdev.ines.ro...
>
> I found this:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions . >
> <types>
> <schema targetNamespace="someNamespace"
> xmlns:typens="someNamespace">
> <xsd:complexType name="PERSON">
> <xsd:sequence>
> <xsd:element name="firstName" type="xsd:string"/>
> <xsd:element name="lastName" type="xsd:string"/>
> <xsd:element name="ageInYears" type="xsd:int"/>
> <xsd:element name="weightInLbs" type="xsd:float"/>
> <xsd:element name="heightInInches" type="xsd:float"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="femalePerson">
> <xsd:complexContent>
> <xsd:extension base="typens:PERSON" >
> <xsd:element name="favoriteLipstick" type="xsd:string" />
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="malePerson">
> <xsd:complexContent>
> <xsd:extension base="typens:PERSON" >
> <xsd:element name="favoriteShavingLotion" type="xsd:string"
> />
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="maleOrFemalePerson">
> <xsd:choice>
> <xsd:element name="fArg" type="typens:femalePerson" >
> <xsd:element name="mArg" type="typens:malePerson" />
> </xsd:choice>
> </xsd:complexType>
> </schema>
> </types>
>
> <message name="addPerson">
> <part name="person" type="typens:maleOrFemalePerson"/>
> </message>
>
> <message name="addPersonResponse">
> <part name="result" type="xsd:int"/>
> </message>
>
> </definitions>
>
> at
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/ht
ml/wsdlexplained.asp?frame=true
>
>
> On Sat, 24 May 2003, Shane Caraveo wrote:
>
> > 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
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP Soap Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >