Re: [SOAP] Custom SOAP Types of Custom SOAP types?
| From: | Shane Caraveo | Date: | Sat, 24 May 2003 21:42:49 +0000 |
| Subject: | Re: [SOAP] Custom SOAP Types of Custom SOAP types? | ||
| References: | 1 2 3 4 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-668@lists.php.net to get a copy of this message | ||
Ok, I grok schema better than english ;)
I haven't tried this, and doubt it will work with the current schema parser. A good place to look and see what is regularily tested is in the PEAR::SOAP_Interop module. There are a bunch of wsdl files in there, for the most part, any schema construct in those should work or at least pass through in a way that works.
Shane
Rob Booth wrote:
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>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/ht ml/wsdlexplained.asp?frame=true<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> atOn Sat, 24 May 2003, Shane Caraveo wrote:time.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 somehaven'tI'm trying to simulate inheritance with SOAP (if SOAP does this Ifields onlyfound any information about it). So I have an object that has 4derived1 of which will be populated at any time. These fields representSOAP_Value Iobjects. When I populate one of these fields and then build mybuildget 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 canobject,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 PlayPlanoneor if I set more than 1 of my fields to a value. But when I only havefield 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