NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Newbie question


Joined: 29 Jan 2008
Posts: 2
Reply with quote
Hi, I've been trying to connect to a webservice to start a session... ut since I have no experience with webservices whatsoever, I just can't figure out how to do it. The documentation of the webservice gives the following example:

Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://tesis.nl/webservices/types">
    <soapenv:Body>
      <typ:startSessionRequest>
         <credentials>
            <userId>YourUserName</userId>
            <name>n.a.</name>
            <organization>Organization</organization>
            <applicationId>appId</applicationId>
            <applicationTicket>Not Important For Testing</applicationTicket>
         </credentials>
      </typ:startSessionRequest>
   </soapenv:Body>
</soapenv:Envelope>


Can anybody help me on my way how to translate this example into a valid into a nusoap client call?

Eric
View user's profileFind all posts by bigEsmurfSend private message
Re: Newbie question


Joined: 14 Dec 2007
Posts: 2
Reply with quote
bigEsmurf wrote:
Hi, I've been trying to connect to a webservice to start a session... ut since I have no experience with webservices whatsoever, I just can't figure out how to do it. The documentation of the webservice gives the following example:

Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://tesis.nl/webservices/types">
    <soapenv:Body>
      <typ:startSessionRequest>
         <credentials>
            <userId>YourUserName</userId>
            <name>n.a.</name>
            <organization>Organization</organization>
            <applicationId>appId</applicationId>
            <applicationTicket>Not Important For Testing</applicationTicket>
         </credentials>
      </typ:startSessionRequest>
   </soapenv:Body>
</soapenv:Envelope>


Can anybody help me on my way how to translate this example into a valid into a nusoap client call?

Eric


Try this:

Code:

include_once ('nusoap/lib/nusoap.php');

$client = new soapclient('http://41.208.18.13/soap/SOAP_server.php?wsdl', true);

$err = $client->getError();

//Checks for errors creating client
if ($err)
{
   echo "Constructor error";
}

$result = $client->call('startSessionRequest', array ('credentials'=>array('userId' => 'YourUserName', 'name'=>'n.a.', 'organization'=>'Organization', 'applicationId'=>'appId', 'applicationTicket'=>'Not Important For Testing')));


Naturally you will want to replace 'YourUserName', 'n.a.', 'Organization', 'appId' and 'Not Important For Testing' with the correct values.
View user's profileFind all posts by NexusZASend private message


Joined: 29 Jan 2008
Posts: 2
Reply with quote
Thanx for the reply Smile I had allready tried something like that, and also lots of other ways, but nothing worked... I finally figured it out though, I had to add two namespaces to the client, and the call had to be in the 'document' en 'literal' format... with the parameters as a string, that contains the xml within the body Smile
View user's profileFind all posts by bigEsmurfSend private message
Newbie question
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