cvs: presentations / xmlandphp5-phpcon-oct-2003.xml /slides/soap5 resources.xml sample-client.php sample-client.xml sample-data.php sample-data.xml
sample-server-handler.php sample-server.xml soap-envelope.php soap-envelope.xml soap-schema.php soap-schema.xml soap-wsdl.php soap-wsdl.xml soap.xml
/slides/xmlandphp agenda-phpcon-oct2003.xml dom.xml evaluate_simplexml.xml newphp5.xml soap.xml streams.php titlepage-phpcon-oct2003.xml
xml-streams.xml
| From: | Shane Caraveo | Date: | Mon, 27 Oct 2003 19:51:32 +0000 |
| Subject: | cvs: presentations / xmlandphp5-phpcon-oct-2003.xml /slides/soap5 resources.xml sample-client.php sample-client.xml sample-data.php sample-data.xml sample-server-handler.php sample-server.xml soap-envelope.php soap-envelope.xml soap-schema.php soap-schema.xml soap-wsdl.php soap-wsdl.xml soap.xml /slides/xmlandphp agenda-phpcon-oct2003.xml dom.xml evaluate_simplexml.xml newphp5.xml soap.xml streams.php titlepage-phpcon-oct2003.xml xml-streams.xml |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-874@lists.php.net to get a copy of this message | ||
shane Mon Oct 27 14:51:32 2003 EDT
Added files:
/presentations xmlandphp5-phpcon-oct-2003.xml
/presentations/slides/xmlandphp agenda-phpcon-oct2003.xml
newphp5.xml streams.php
titlepage-phpcon-oct2003.xml
xml-streams.xml
/presentations/slides/soap5 resources.xml sample-client.php
sample-client.xml sample-data.php
sample-data.xml
sample-server-handler.php
sample-server.xml soap-envelope.php
soap-envelope.xml soap-schema.php
soap-schema.xml soap-wsdl.php
soap-wsdl.xml soap.xml
Modified files:
/presentations/slides/xmlandphp dom.xml evaluate_simplexml.xml
soap.xml
Log:
php con xml & soap talk
Index: presentations/slides/xmlandphp/dom.xml diff -u presentations/slides/xmlandphp/dom.xml:1.3 presentations/slides/xmlandphp/dom.xml:1.4 --- presentations/slides/xmlandphp/dom.xml:1.3 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/dom.xml Mon Oct 27 14:51:31 2003 @@ -5,6 +5,7 @@ <bullet>Standard XML Structure</bullet> <bullet>Designed for Java, Cross-Language Standard</bullet> <bullet>PHP Extension uses %libXML% by Daniel Veillard</bullet> +<bullet>Full PHP Streams IO</bullet> </list> <list> <bullet>PHP 5 features a vastly superior DOM extension</bullet> Index: presentations/slides/xmlandphp/evaluate_simplexml.xml diff -u presentations/slides/xmlandphp/evaluate_simplexml.xml:1.1 presentations/slides/xmlandphp/evaluate_simplexml.xml:1.2 --- presentations/slides/xmlandphp/evaluate_simplexml.xml:1.1 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/evaluate_simplexml.xml Mon Oct 27 14:51:31 2003 @@ -1,5 +1,5 @@ <slide> -<title>SimpleXML: Pros and Cons</title> +<title>SimpleXML: Pros + Cons</title> <list title="Pros"> <bullet>Simple structures, PHP style objects</bullet> <bullet>Parser Optimizations/Result Caching Available</bullet> Index: presentations/slides/xmlandphp/soap.xml diff -u presentations/slides/xmlandphp/soap.xml:1.1 presentations/slides/xmlandphp/soap.xml:1.2 --- presentations/slides/xmlandphp/soap.xml:1.1 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/soap.xml Mon Oct 27 14:51:31 2003 @@ -1,13 +1,13 @@ -<slide title="SOAP"> +<slide title="SOAP for PHP 5"> <blurb> -Where is it? +Where is it? On my computer! </blurb> <list> <bullet>WSDL Code Generation improved</bullet> <bullet>Schema Code Generation added!</bullet> <bullet>Less focus on RPC, more on Document messaging</bullet> <bullet>Smaller code base, easier to extend</bullet> -<bullet>Will make use of streams for transport api's</bullet> +<bullet>Streams API support</bullet> <bullet>Uses DOM, may use SimpleXML alternately in the future</bullet> <bullet>Cleaner code, better organized</bullet> <bullet>Makes use of new OO support in PHP 5</bullet> Index: presentations/xmlandphp5-phpcon-oct-2003.xml +++ presentations/xmlandphp5-phpcon-oct-2003.xml <presentation template="php" navmode="html" > <topic>PHP</topic> <title>XML, SOAP and PHP 5</title> <event>PHPCON West</event> <location>Santa Clara, CA</location> <date>Oct 23, 2003</date> <speaker>Shane Caraveo</speaker> <email>shanec@ActiveState.com</email> <url>http://talks.php.net/</url> <slide>slides/xmlandphp/titlepage-phpcon-oct2003.xml</slide> <slide>slides/xmlandphp/agenda-phpcon-oct2003.xml</slide> <slide>slides/xmlandphp/newphp5.xml</slide> <slide>slides/xmlandphp/sample.xml</slide> <slide>slides/xmlandphp/interface.xml</slide> <slide>slides/xmlandphp/sax.xml</slide> <slide>slides/xmlandphp/callback.xml</slide> <slide>slides/xmlandphp/glue.xml</slide> <slide>slides/xmlandphp/parseinto.xml</slide> <slide>slides/xmlandphp/pear.xml</slide> <slide>slides/xmlandphp/pear1.xml</slide> <slide>slides/xmlandphp/pear2.xml</slide> <slide>slides/xmlandphp/dom.xml</slide> <slide>slides/xmlandphp/domglue.xml</slide> <slide>slides/xmlandphp/helpers.xml</slide> <slide>slides/xmlandphp/xpath.xml</slide> <slide>slides/xmlandphp/validation.xml</slide> <slide>slides/php5intro/simplexml1.xml</slide> <slide>slides/php5intro/simplexml2.xml</slide> <slide>slides/xmlandphp/evaluate_sax.xml</slide> <slide>slides/xmlandphp/evaluate_dom.xml</slide> <slide>slides/xmlandphp/evaluate_simplexml.xml</slide> <slide>slides/xmlandphp/xslt.xml</slide> <slide>slides/xmlandphp/xslt1.xml</slide> <slide>slides/xmlandphp/xslt2.xml</slide> <slide>slides/xmlandphp/xslt-api.xml</slide> <slide>slides/xmlandphp/xml-streams.xml</slide> <slide>slides/soap5/soap.xml</slide> <slide>slides/soap5/sample-client.xml</slide> <slide>slides/soap5/sample-data.xml</slide> <slide>slides/soap5/sample-server.xml</slide> <slide>slides/soap5/soap-envelope.xml</slide> <slide>slides/soap5/soap-wsdl.xml</slide> <slide>slides/soap5/soap-schema.xml</slide> <slide>slides/soap5/resources.xml</slide> </presentation> Index: presentations/slides/xmlandphp/agenda-phpcon-oct2003.xml +++ presentations/slides/xmlandphp/agenda-phpcon-oct2003.xml <slide title="Agenda"> <list> <bullet>PHP 5 XML Support</bullet> <bullet>DOM, SimpleXML, SAX</bullet> <bullet>XPath, Validation, XSLT</bullet> <bullet>SOAP</bullet> </list> </slide> Index: presentations/slides/xmlandphp/newphp5.xml +++ presentations/slides/xmlandphp/newphp5.xml <slide title="Hot off the press!"> <list> <bullet>W3C Document Object Model Level 3</bullet> <bullet>PHP Extension uses %libXML% by Daniel Veillard</bullet> <bullet>Full PHP Streams IO support</bullet> <bullet>Validation</bullet> </list> <list> <bullet>Still to come...</bullet> <bullet>Transparent translation between various XML extensions</bullet> <bullet>Completion of DOM API</bullet> </list> </slide> Index: presentations/slides/xmlandphp/streams.php +++ presentations/slides/xmlandphp/streams.php <?php $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" . "Cookie: foo=bar\r\n" ), 'file'=>array() ); $context = stream_context_create($opts); libxml_set_streams_context($context); $d = domdocument::load('http://localhost/stream-example.xml'); print $d->saveXML(); ?> Index: presentations/slides/xmlandphp/titlepage-phpcon-oct2003.xml +++ presentations/slides/xmlandphp/titlepage-phpcon-oct2003.xml <slide fontsize="3.5em"> <title>Welcome</title> <blurb> </blurb> <blurb align="center" fontsize="6.0em">XML, SOAP and PHP 5</blurb> <blurb align="center" fontsize="4.0em">PHPCON</blurb> <blurb align="center">Oct 23, 2003</blurb> <link align="center" leader="Shane Caraveo, " text="shanec@ActiveState.com" href="mailto:shanec@ActiveState.com"/> </slide> Index: presentations/slides/xmlandphp/xml-streams.xml +++ presentations/slides/xmlandphp/xml-streams.xml <slide title="Streams"> <list> <bullet>All XML support uses PHP Streams</bullet> <bullet>You can filter stream data prior to parsing by libXML</bullet> <bullet>Write your own stream handlers</bullet> <bullet>Internal support for HTTP, HTTPS, TCP, and much more</bullet> </list> <example fontsize="1.6em" filename="streams.php" /> </slide> Index: presentations/slides/soap5/resources.xml +++ presentations/slides/soap5/resources.xml <slide title="That's all folks!"> <list title="Thank you!"> <bullet>PHP: www.php.net</bullet> <bullet>PEAR::SOAP: pear.php.net</bullet> <bullet>EMail List: soap@lists.php.net</bullet> <bullet>EMail Me: ShaneC@ActiveState.com</bullet> </list> </slide> Index: presentations/slides/soap5/sample-client.php +++ presentations/slides/soap5/sample-client.php <?php $c = new SOAP_Client('http://localhost/example.wsdl'); $ret = $c->echoStruct(new SOAPStruct) ->deserializeBody(); var_dump($ret); ?> Index: presentations/slides/soap5/sample-client.xml +++ presentations/slides/soap5/sample-client.xml <slide title="Client"> <list> <bullet>Uses object overloading</bullet> <bullet>Simplified, much less effort to make it work</bullet> </list> <example fontsize="1.6em" filename="sample-client.php" /> </slide> Index: presentations/slides/soap5/sample-data.php +++ presentations/slides/soap5/sample-data.php <?php class SOAPStruct implements SchemaTypeInfo, SchemaSerializable { public $varInt = 123; public $varFloat = 123.123; public $varString = 'hello world'; public static function getTypeName() { return 'SOAPStruct'; } public static function getTypeNamespace() { return 'http://soapinterop.org/xsd'; } public function schemaSerialize() { return new domelement('SOAPStruct'); } public function schemaDeserialize($node) { $this->whoami = $node->getAttribute('whoami'); } } ?> Index: presentations/slides/soap5/sample-data.xml +++ presentations/slides/soap5/sample-data.xml <slide title="Data Types"> <list> <bullet>Uses object overloading</bullet> <bullet>Uses class interfaces</bullet> <bullet>Can be serialized, or provide it's own</bullet> </list> <example fontsize="1.6em" filename="sample-data.php" /> </slide> Index: presentations/slides/soap5/sample-server-handler.php +++ presentations/slides/soap5/sample-server-handler.php <?php class ServerHandler_Round2Base implements SOAP_Service { public static function getSOAPServiceNamespace() { return 'http://soapinterop.org/'; } public static function getSOAPServiceName() { return 'ExampleService'; } public static function getSOAPServiceDescription() { return 'Just a simple example.'; } public static function getWSDLURI() { return 'http://localhost/soap/tests/interop.wsdl'; } public function echoString($inputString) { return array('return' => (string)$inputString); } } $server = new SOAP_Server; require_once 'ServerHandler_Round2Base.php'; $soapclass = new ServerHandler_Round2Base(); $server->addService($soapclass); if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD']=='POST') { $server->service('php://input'); } ?> Index: presentations/slides/soap5/sample-server.xml +++ presentations/slides/soap5/sample-server.xml <slide title="Server"> <list> <bullet>Full WSDL Support</bullet> <bullet>Simplified API</bullet> <bullet>Server Handlers use interfaces</bullet> <bullet>Testable with PHPUnit</bullet> <bullet>Liberal with what it recieves</bullet> <bullet>Interoperable with what it sends</bullet> </list> <example fontsize="1.6em" filename="sample-server-handler.php" /> </slide> Index: presentations/slides/soap5/soap-envelope.php +++ presentations/slides/soap5/soap-envelope.php <?php $request = SOAP_Envelope::request($wsdlURI); $request->addMethod($method, $args); $data = $request->saveXML(); $headers = "User-Agent: PEAR-SOAP\r\n". "Content-Type: text/xml; charset={$this->_encoding}\r\n". "Content-Length: ".strlen($data)."\r\n". "SOAPAction: \"{$request->soapAction}\"\r\n"; $opts = array( $url['scheme'] => array( 'method' => 'POST', 'header' => $headers, 'content' => $data ) ); $response = SOAP_Envelope::parse($endpointURI, $opts); $result = $response->deserializeBody(); ?> Index: presentations/slides/soap5/soap-envelope.xml +++ presentations/slides/soap5/soap-envelope.xml <slide title="Envelope"> <list title="SOAP_Envelope DOMDocument class"> <bullet>Lighten the load and do it yourself</bullet> <bullet>Knows how to de/serialize</bullet> <bullet>Handles the transport of data</bullet> <bullet>Use XPath, Validate it, whatever!</bullet> </list> <example fontsize="1.6em" filename="soap-envelope.php" /> </slide> Index: presentations/slides/soap5/soap-schema.php +++ presentations/slides/soap5/soap-schema.php <?php $doc = new DOMDocument; $node = SchemaSimple::domSerialize($doc, 'tagName', $value); $val = SchemaSimple::domDeserialize($node); ?> Index: presentations/slides/soap5/soap-schema.xml +++ presentations/slides/soap5/soap-schema.xml <slide title="Schema"> <list> <bullet>Does the hard work of de/serialization</bullet> <bullet>FUTURE: Generate Schema from Class Interfaces</bullet> </list> <example fontsize="1.6em" filename="soap-schema.php" /> </slide> Index: presentations/slides/soap5/soap-wsdl.php +++ presentations/slides/soap5/soap-wsdl.php <?php $url = 'http://localhost/soap/tests/interop.wsdl'; $result = WSDLManager::get($url); print $result->generateProxyCode(); ?> Index: presentations/slides/soap5/soap-wsdl.xml +++ presentations/slides/soap5/soap-wsdl.xml <slide title="WSDL"> <list> <bullet>Handles Imported WSDL and Schema</bullet> <bullet>Serializes SOAP requests using WSDL validation</bullet> <bullet>Generates source code from WSDL and Schema</bullet> <bullet>FUTURE: Generate WSDL from Class Interfaces</bullet> <bullet>FUTURE: Generate Schema from Class Interfaces</bullet> </list> <example fontsize="1.6em" filename="soap-wsdl.php" /> </slide> Index: presentations/slides/soap5/soap.xml +++ presentations/slides/soap5/soap.xml <slide title="SOAP for PHP 5"> <blurb> Where is it? On my computer! </blurb> <list> <bullet>WSDL Code Generation improved</bullet> <bullet>Schema Code Generation added!</bullet> <bullet>Less focus on RPC, more on Document messaging</bullet> <bullet>Smaller code base, easier to extend</bullet> <bullet>Streams API support</bullet> <bullet>Uses DOM, may use SimpleXML alternately in the future</bullet> <bullet>Cleaner code, better organized</bullet> <bullet>Makes use of new OO support in PHP 5</bullet> <bullet>Alpha Release late October 2003</bullet> </list> </slide>
Index: presentations/slides/xmlandphp/dom.xml diff -u presentations/slides/xmlandphp/dom.xml:1.3 presentations/slides/xmlandphp/dom.xml:1.4 --- presentations/slides/xmlandphp/dom.xml:1.3 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/dom.xml Mon Oct 27 14:51:31 2003 @@ -5,6 +5,7 @@ <bullet>Standard XML Structure</bullet> <bullet>Designed for Java, Cross-Language Standard</bullet> <bullet>PHP Extension uses %libXML% by Daniel Veillard</bullet> +<bullet>Full PHP Streams IO</bullet> </list> <list> <bullet>PHP 5 features a vastly superior DOM extension</bullet> Index: presentations/slides/xmlandphp/evaluate_simplexml.xml diff -u presentations/slides/xmlandphp/evaluate_simplexml.xml:1.1 presentations/slides/xmlandphp/evaluate_simplexml.xml:1.2 --- presentations/slides/xmlandphp/evaluate_simplexml.xml:1.1 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/evaluate_simplexml.xml Mon Oct 27 14:51:31 2003 @@ -1,5 +1,5 @@ <slide> -<title>SimpleXML: Pros and Cons</title> +<title>SimpleXML: Pros + Cons</title> <list title="Pros"> <bullet>Simple structures, PHP style objects</bullet> <bullet>Parser Optimizations/Result Caching Available</bullet> Index: presentations/slides/xmlandphp/soap.xml diff -u presentations/slides/xmlandphp/soap.xml:1.1 presentations/slides/xmlandphp/soap.xml:1.2 --- presentations/slides/xmlandphp/soap.xml:1.1 Thu Oct 9 03:53:38 2003 +++ presentations/slides/xmlandphp/soap.xml Mon Oct 27 14:51:31 2003 @@ -1,13 +1,13 @@ -<slide title="SOAP"> +<slide title="SOAP for PHP 5"> <blurb> -Where is it? +Where is it? On my computer! </blurb> <list> <bullet>WSDL Code Generation improved</bullet> <bullet>Schema Code Generation added!</bullet> <bullet>Less focus on RPC, more on Document messaging</bullet> <bullet>Smaller code base, easier to extend</bullet> -<bullet>Will make use of streams for transport api's</bullet> +<bullet>Streams API support</bullet> <bullet>Uses DOM, may use SimpleXML alternately in the future</bullet> <bullet>Cleaner code, better organized</bullet> <bullet>Makes use of new OO support in PHP 5</bullet> Index: presentations/xmlandphp5-phpcon-oct-2003.xml +++ presentations/xmlandphp5-phpcon-oct-2003.xml <presentation template="php" navmode="html" > <topic>PHP</topic> <title>XML, SOAP and PHP 5</title> <event>PHPCON West</event> <location>Santa Clara, CA</location> <date>Oct 23, 2003</date> <speaker>Shane Caraveo</speaker> <email>shanec@ActiveState.com</email> <url>http://talks.php.net/</url> <slide>slides/xmlandphp/titlepage-phpcon-oct2003.xml</slide> <slide>slides/xmlandphp/agenda-phpcon-oct2003.xml</slide> <slide>slides/xmlandphp/newphp5.xml</slide> <slide>slides/xmlandphp/sample.xml</slide> <slide>slides/xmlandphp/interface.xml</slide> <slide>slides/xmlandphp/sax.xml</slide> <slide>slides/xmlandphp/callback.xml</slide> <slide>slides/xmlandphp/glue.xml</slide> <slide>slides/xmlandphp/parseinto.xml</slide> <slide>slides/xmlandphp/pear.xml</slide> <slide>slides/xmlandphp/pear1.xml</slide> <slide>slides/xmlandphp/pear2.xml</slide> <slide>slides/xmlandphp/dom.xml</slide> <slide>slides/xmlandphp/domglue.xml</slide> <slide>slides/xmlandphp/helpers.xml</slide> <slide>slides/xmlandphp/xpath.xml</slide> <slide>slides/xmlandphp/validation.xml</slide> <slide>slides/php5intro/simplexml1.xml</slide> <slide>slides/php5intro/simplexml2.xml</slide> <slide>slides/xmlandphp/evaluate_sax.xml</slide> <slide>slides/xmlandphp/evaluate_dom.xml</slide> <slide>slides/xmlandphp/evaluate_simplexml.xml</slide> <slide>slides/xmlandphp/xslt.xml</slide> <slide>slides/xmlandphp/xslt1.xml</slide> <slide>slides/xmlandphp/xslt2.xml</slide> <slide>slides/xmlandphp/xslt-api.xml</slide> <slide>slides/xmlandphp/xml-streams.xml</slide> <slide>slides/soap5/soap.xml</slide> <slide>slides/soap5/sample-client.xml</slide> <slide>slides/soap5/sample-data.xml</slide> <slide>slides/soap5/sample-server.xml</slide> <slide>slides/soap5/soap-envelope.xml</slide> <slide>slides/soap5/soap-wsdl.xml</slide> <slide>slides/soap5/soap-schema.xml</slide> <slide>slides/soap5/resources.xml</slide> </presentation> Index: presentations/slides/xmlandphp/agenda-phpcon-oct2003.xml +++ presentations/slides/xmlandphp/agenda-phpcon-oct2003.xml <slide title="Agenda"> <list> <bullet>PHP 5 XML Support</bullet> <bullet>DOM, SimpleXML, SAX</bullet> <bullet>XPath, Validation, XSLT</bullet> <bullet>SOAP</bullet> </list> </slide> Index: presentations/slides/xmlandphp/newphp5.xml +++ presentations/slides/xmlandphp/newphp5.xml <slide title="Hot off the press!"> <list> <bullet>W3C Document Object Model Level 3</bullet> <bullet>PHP Extension uses %libXML% by Daniel Veillard</bullet> <bullet>Full PHP Streams IO support</bullet> <bullet>Validation</bullet> </list> <list> <bullet>Still to come...</bullet> <bullet>Transparent translation between various XML extensions</bullet> <bullet>Completion of DOM API</bullet> </list> </slide> Index: presentations/slides/xmlandphp/streams.php +++ presentations/slides/xmlandphp/streams.php <?php $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" . "Cookie: foo=bar\r\n" ), 'file'=>array() ); $context = stream_context_create($opts); libxml_set_streams_context($context); $d = domdocument::load('http://localhost/stream-example.xml'); print $d->saveXML(); ?> Index: presentations/slides/xmlandphp/titlepage-phpcon-oct2003.xml +++ presentations/slides/xmlandphp/titlepage-phpcon-oct2003.xml <slide fontsize="3.5em"> <title>Welcome</title> <blurb> </blurb> <blurb align="center" fontsize="6.0em">XML, SOAP and PHP 5</blurb> <blurb align="center" fontsize="4.0em">PHPCON</blurb> <blurb align="center">Oct 23, 2003</blurb> <link align="center" leader="Shane Caraveo, " text="shanec@ActiveState.com" href="mailto:shanec@ActiveState.com"/> </slide> Index: presentations/slides/xmlandphp/xml-streams.xml +++ presentations/slides/xmlandphp/xml-streams.xml <slide title="Streams"> <list> <bullet>All XML support uses PHP Streams</bullet> <bullet>You can filter stream data prior to parsing by libXML</bullet> <bullet>Write your own stream handlers</bullet> <bullet>Internal support for HTTP, HTTPS, TCP, and much more</bullet> </list> <example fontsize="1.6em" filename="streams.php" /> </slide> Index: presentations/slides/soap5/resources.xml +++ presentations/slides/soap5/resources.xml <slide title="That's all folks!"> <list title="Thank you!"> <bullet>PHP: www.php.net</bullet> <bullet>PEAR::SOAP: pear.php.net</bullet> <bullet>EMail List: soap@lists.php.net</bullet> <bullet>EMail Me: ShaneC@ActiveState.com</bullet> </list> </slide> Index: presentations/slides/soap5/sample-client.php +++ presentations/slides/soap5/sample-client.php <?php $c = new SOAP_Client('http://localhost/example.wsdl'); $ret = $c->echoStruct(new SOAPStruct) ->deserializeBody(); var_dump($ret); ?> Index: presentations/slides/soap5/sample-client.xml +++ presentations/slides/soap5/sample-client.xml <slide title="Client"> <list> <bullet>Uses object overloading</bullet> <bullet>Simplified, much less effort to make it work</bullet> </list> <example fontsize="1.6em" filename="sample-client.php" /> </slide> Index: presentations/slides/soap5/sample-data.php +++ presentations/slides/soap5/sample-data.php <?php class SOAPStruct implements SchemaTypeInfo, SchemaSerializable { public $varInt = 123; public $varFloat = 123.123; public $varString = 'hello world'; public static function getTypeName() { return 'SOAPStruct'; } public static function getTypeNamespace() { return 'http://soapinterop.org/xsd'; } public function schemaSerialize() { return new domelement('SOAPStruct'); } public function schemaDeserialize($node) { $this->whoami = $node->getAttribute('whoami'); } } ?> Index: presentations/slides/soap5/sample-data.xml +++ presentations/slides/soap5/sample-data.xml <slide title="Data Types"> <list> <bullet>Uses object overloading</bullet> <bullet>Uses class interfaces</bullet> <bullet>Can be serialized, or provide it's own</bullet> </list> <example fontsize="1.6em" filename="sample-data.php" /> </slide> Index: presentations/slides/soap5/sample-server-handler.php +++ presentations/slides/soap5/sample-server-handler.php <?php class ServerHandler_Round2Base implements SOAP_Service { public static function getSOAPServiceNamespace() { return 'http://soapinterop.org/'; } public static function getSOAPServiceName() { return 'ExampleService'; } public static function getSOAPServiceDescription() { return 'Just a simple example.'; } public static function getWSDLURI() { return 'http://localhost/soap/tests/interop.wsdl'; } public function echoString($inputString) { return array('return' => (string)$inputString); } } $server = new SOAP_Server; require_once 'ServerHandler_Round2Base.php'; $soapclass = new ServerHandler_Round2Base(); $server->addService($soapclass); if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD']=='POST') { $server->service('php://input'); } ?> Index: presentations/slides/soap5/sample-server.xml +++ presentations/slides/soap5/sample-server.xml <slide title="Server"> <list> <bullet>Full WSDL Support</bullet> <bullet>Simplified API</bullet> <bullet>Server Handlers use interfaces</bullet> <bullet>Testable with PHPUnit</bullet> <bullet>Liberal with what it recieves</bullet> <bullet>Interoperable with what it sends</bullet> </list> <example fontsize="1.6em" filename="sample-server-handler.php" /> </slide> Index: presentations/slides/soap5/soap-envelope.php +++ presentations/slides/soap5/soap-envelope.php <?php $request = SOAP_Envelope::request($wsdlURI); $request->addMethod($method, $args); $data = $request->saveXML(); $headers = "User-Agent: PEAR-SOAP\r\n". "Content-Type: text/xml; charset={$this->_encoding}\r\n". "Content-Length: ".strlen($data)."\r\n". "SOAPAction: \"{$request->soapAction}\"\r\n"; $opts = array( $url['scheme'] => array( 'method' => 'POST', 'header' => $headers, 'content' => $data ) ); $response = SOAP_Envelope::parse($endpointURI, $opts); $result = $response->deserializeBody(); ?> Index: presentations/slides/soap5/soap-envelope.xml +++ presentations/slides/soap5/soap-envelope.xml <slide title="Envelope"> <list title="SOAP_Envelope DOMDocument class"> <bullet>Lighten the load and do it yourself</bullet> <bullet>Knows how to de/serialize</bullet> <bullet>Handles the transport of data</bullet> <bullet>Use XPath, Validate it, whatever!</bullet> </list> <example fontsize="1.6em" filename="soap-envelope.php" /> </slide> Index: presentations/slides/soap5/soap-schema.php +++ presentations/slides/soap5/soap-schema.php <?php $doc = new DOMDocument; $node = SchemaSimple::domSerialize($doc, 'tagName', $value); $val = SchemaSimple::domDeserialize($node); ?> Index: presentations/slides/soap5/soap-schema.xml +++ presentations/slides/soap5/soap-schema.xml <slide title="Schema"> <list> <bullet>Does the hard work of de/serialization</bullet> <bullet>FUTURE: Generate Schema from Class Interfaces</bullet> </list> <example fontsize="1.6em" filename="soap-schema.php" /> </slide> Index: presentations/slides/soap5/soap-wsdl.php +++ presentations/slides/soap5/soap-wsdl.php <?php $url = 'http://localhost/soap/tests/interop.wsdl'; $result = WSDLManager::get($url); print $result->generateProxyCode(); ?> Index: presentations/slides/soap5/soap-wsdl.xml +++ presentations/slides/soap5/soap-wsdl.xml <slide title="WSDL"> <list> <bullet>Handles Imported WSDL and Schema</bullet> <bullet>Serializes SOAP requests using WSDL validation</bullet> <bullet>Generates source code from WSDL and Schema</bullet> <bullet>FUTURE: Generate WSDL from Class Interfaces</bullet> <bullet>FUTURE: Generate Schema from Class Interfaces</bullet> </list> <example fontsize="1.6em" filename="soap-wsdl.php" /> </slide> Index: presentations/slides/soap5/soap.xml +++ presentations/slides/soap5/soap.xml <slide title="SOAP for PHP 5"> <blurb> Where is it? On my computer! </blurb> <list> <bullet>WSDL Code Generation improved</bullet> <bullet>Schema Code Generation added!</bullet> <bullet>Less focus on RPC, more on Document messaging</bullet> <bullet>Smaller code base, easier to extend</bullet> <bullet>Streams API support</bullet> <bullet>Uses DOM, may use SimpleXML alternately in the future</bullet> <bullet>Cleaner code, better organized</bullet> <bullet>Makes use of new OO support in PHP 5</bullet> <bullet>Alpha Release late October 2003</bullet> </list> </slide>