Joined: 29 Aug 2010 |
Posts: 1 |
|
|
|
Posted: Sun Aug 29, 2010 10:41 pm |
|
|
|
|
|
Hi I have the following code..
/* Place Order */
$server->wsdl->addComplexType('sendOrder_request', 'complexType', 'struct', 'all', '',
array(
'imei' => array('name' => 'imei', 'type' => 'xsd:string'),
'id_tool' => array('name' => 'id_tool', 'type' => 'xsd:int'),
'email' => array('name' => 'email', 'type' => 'xsd:string'),
'mobile' => array('name' => 'mobile', 'type' => 'xsd:string'),
'network' => array('name' => 'network', 'type' => 'xsd:string'),
'provider' => array('name' => 'provider', 'type' => 'xsd:string'),
'pin' => array('name' => 'pin', 'type' => 'xsd:string'),
'type' => array('name' => 'type', 'type' => 'xsd:string'),
'locks' => array('name' => 'locks', 'type' => 'xsd:int'),
'comments' => array('name' => 'comments', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType('sendOrder_response', 'complexType', 'struct', 'all', '',
array(
'id' => array('name' => 'id', 'type' => 'xsd:int'),
'status' => array('name' => 'status', 'type' => 'xsd:string')
)
);
$server->register('w_sendOrder',
array('sendOrder' => 'tns:sendOrder_request'),
array('return' => 'tns:sendOrder_response'),
$ns);
function w_sendOrder($params){
$userid = $_SESSION["userid"];
return array("id"=>$userid, "status"=>$params["imei"]);
}
// When I try to call my WSDL $params["imei"] is empty
function sendOrder($params){
global $client;
//Send Order
$params = array(
'imei' => '354512019781448',
'id_tool' => 198,
'email' => 'alex@fleitescomputers.com',
'mobile' => '1457',
'network' => '0',
'provider' => '',
'pin' => '',
'type' => '',
'locks' => 0,
'comments' => 'TEST-API');
$response = $client->call('w_sendOrder', $params);
if($response){
return $response;
}else{
return false;
}
}
|