NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
call to a new url

Joined: 01 May 2007
Posts: 1
Reply with quote
I am trying to figure out how to send the next call to the serverUrl retrieved from the first login call.
The first call to this webservice returns, after succesfull login, url and sessionid to use for the rest of the communication with the service.
All the rest of the calls are suposed to use the returned serverUrl but this is not a wsdl adress and i dont know how to set this as the adress for the calls.
(This code is generated with the wsdl in Phped Nusoap Client, and it works for retrieving the new serverURL. )


// (IDs and adresses are faked here)

$wsdlURL = "";
$soap = new soapclient($wsdlURL, "wsdl");

                      $parameters['loginRequest']['PartnerId'] = "Jah0mahkXah6cooyeiChoh0oquau4";
$parameters['loginRequest']['PartnerPassword'] = "Ahkai";
$parameters['loginRequest']['UserId'] = "trup";
$parameters['loginRequest']['UserPassword'] = "12345";
$parameters['loginRequest']['Version'] = "v1_2";
$parameters['loginRequest']['IsSecure'] = "true";
$result = $soap->call("Login", $parameters);
if($error = $soap->getError()){ die($error);}

// call retrieves ServerUrl and SessionId that must be used in the next calls:
echo "ServerURL: " . $result["ServerUrl"] . "<br />";
echo "SessionId: " . $result["SessionId"] . "<br />";

// This is one of the methods retrieved from the wsdl and stored in phpeds Nusoap Client: It does not work like this. How to put the serverUrl in this and the next calls?
$result = $soap->call("GetProjects");
if($error = $soap->getError()){ die($error);}

//looks like this is working.... :     
$result = $soap->call("Logout");
if($error = $soap->getError()){ die($error);}


thanks for any help...
View user's profileFind all posts by chrastSend private message
call to a new url
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