NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem with WSDL


Joined: 29 Aug 2010
Posts: 1
Reply with quote
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;
}
}
View user's profileFind all posts by afleitesSend private message
Problem with WSDL
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic