XML Schema: Mapping Native PHP types to XSD

From: Date: Sun, 16 May 2004 20:10:30 +0000
Subject: XML Schema: Mapping Native PHP types to XSD
Groups: php.soap 
Request: Send a blank email to php-soap+get-1521@lists.php.net to get a copy of this message
Hi, I'm currently writing some code to automatically expose any given PHP class/function as a SOAP service using WSDL. I've currently got it finding all input args, their types, any documentation, the return value type and obviously function names :) Additionally, I've written a WSDL generation package, which allows you to create WSDL using like: $wsdl = new WSDL(...); $wsdl->addPortType(....); $wsdl->addService(....); etc What I am looking to do, is to have a single XSD that describes all the base PHP simple and complex types, as PHP see's them. However, my XSD knowledge is very little... What I want is this: string -> xsd:string integer -> xsd:int boolean -> xsd:boolean float -> xsd:float array -> xsd:struct or soap-enc:Array (not sure struct can be used) where its elements can be xsd:anyType object -> xsd:struct where its elements can be xsd:anyType mixed -> xsd:anyType null -> ??? The users of my WSDL package will be able to specify their own custom XSD's too, but I want a default, catch-all XSD. Any help on this would be greatly appreciated. If you're interested, I am thinking of proposing my WSDL package to PEAR, if I don't it will be released as GPL code along with the rest of my code. - Davey

« previous php.soap (#1521) next »