php - How to create Date format in Nusoap server side? -
i make simple web service using nusoap & php server. in server page want instanciate date object , return client. part of complextype (struct). read solutions soapval() function can not make work. how can return date?
//complexlogintype $server->wsdl->addcomplextype('userinfo','complextype','struct','all','', array( 'id' => array('name' => 'id','type' => 'xsd:int'), 'lastname' => array('name' => 'lastname','type' => 'xsd:string'), 'firstname' => array('name' => 'firstname','type' => 'xsd:string'), 'address' => array('name' => 'address','type' => 'xsd:string'), 'position' => array('name' => 'position','type' => 'xsd:string'), 'manager' => array('name' => 'manager','type' => 'xsd:int'), 'password' => array('name' => 'password','type' => 'xsd:string'), 'date' => array('name' => 'date','type' => 'xsd:string')) );
my usage of soapval();
$date = new soapval('token', 'datetime', '2006-12-19t19:51:12.174z');
in service nusoap code working
$server->wsdl->addcomplextype( 'order_type', 'complextype', 'array', 'sequence', '', array( ... 'date_trips' => array('name' => 'date_trips', 'type' => 'xsd:date'), ... ) );
and service takes date in yyyy-mm-dd
format.
Comments
Post a Comment