Return to bug41004.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / bugs |
1.1 misho 1: --TEST-- 2: Bug #41004 (minOccurs="0" and null class member variable) 3: --SKIPIF-- 4: <?php require_once('skipif.inc'); ?> 5: --FILE-- 6: <?php 7: ini_set('soap.wsdl_cache_enabled', false); 8: 9: class EchoBean{ 10: public $mandatoryElement; 11: public $optionalElement; 12: 13: } 14: 15: class EchoRequest{ 16: public $in; 17: } 18: 19: class EchoResponse{ 20: public $out; 21: } 22: 23: $wsdl = dirname(__FILE__)."/bug41004.wsdl"; 24: $classmap = array('EchoBean'=>'EchoBean','echo'=>'EchoRequest','echoResponse'=>'EchoResponse'); 25: $client = new SoapClient($wsdl, array('location'=>'test://',"classmap" => $classmap, 'exceptions'=>0, 'trace'=>1)); 26: $echo=new EchoRequest(); 27: $in=new EchoBean(); 28: $in->mandatoryElement="REV"; 29: $in->optionalElement=NULL; 30: $echo->in=$in; 31: $client->echo($echo); 32: echo $client->__getLastRequest(); 33: ?> 34: --EXPECT-- 35: <?xml version="1.0" encoding="UTF-8"?> 36: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Formation"><SOAP-ENV:Body><ns1:echo><in><mandatoryElement>REV</mandatoryElement></in></ns1:echo></SOAP-ENV:Body></SOAP-ENV:Envelope>