<?php
require_once 'SOAP/Value.php';
class Person {
var $Age;
var $ID;
var $Name;
var $Male;
function Person($a=NULL, $i=NULL, $n=NULL, $m=NULL) {
$this->Age = $a;
$this->ID = $i;
$this->Name = $n;
$this->Male = $m;
}
function &__to_soap($name = 'x_Person',
$ns = 'http://soapinterop.org/xsd')
{
return new SOAP_Value("\{$ns}$name",'Person',
array( #push struct elements into one soap value
new SOAP_Value("\{$ns}Age",'double',$this->Age),
new SOAP_Value("\{$ns}ID",'float',$this->ID),
),array('Name'=>$this->Name,'Male'=>$this->Male));
}
}
$shane = new Person(32,'abcd1234','Shane Caraveo',true);
$soapval = $shane->__to_soap();
?>