Customers
User information
 Loading ...
Show article in Knowledge Base

 Logging in using the Web service API Export knowledge base Export     SubscribeSubscribe      Show article info

Before logging in you first have to make sure that you have a Web service client stubs that you can use in your preferred language.

 

A jar file containing Java stubs are available in the directory: "api/docs/" and it is called: VisionProjectWebService-client.jar

 

 

Version number

Always try to use the latest version number for the web service API, this is currently 13.0

 

 

In your program you can then use:

 

Java

// Create object that should be used to invoke methods
VisionProjectWebServiceImpl visionProjectWebService = new VisionProjectWebServiceImpl("https://www.visionproject.se/service/VisionProject-v2/VisionProjectWebServiceService");
// Enable sessions in the client
visionProjectWebService._getBindingProvider().getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);
// Login, you will get the current logged in user back
SystemUser currentSystemuser = visionProjectWebService.loginWithAPIKey2("username", "password", "WSAPIKey", "13.0");

If you have your own installation of the system and you login to this you should use the method login2 instead and in this case you don't need a WSAPIKey:

// Login, you will get the current logged in user back
SystemUser currentSystemuser = visionProjectWebService.login2("username", "password", "13.0");

 

 

Sample for .NET

// Create object that should be used to invoke methods
VisionProjectWebServiceService client = new VisionProjectWebServiceService();

// Set URL
client.Url = "https://www.visionproject.se/service/VisionProject-v2/VisionProjectWebServiceService"; 

// Enable sessions in the client
client.CookieContainer = new System.Net.CookieContainer();

// Login, you will get the current logged in user back
SystemUser currentSystemuser = client.loginWithAPIKey2("username", "password", "WSAPIKey", "13.0");

If you have your own installation of the system and you login to this you should use the method login2 instead and in this case you don't need a WSAPIKey:

// Login, you will get the current logged in user back
SystemUser currentSystemuser = client.login2("username", "password", "13.0");

 

 

PHP

// Create object that should be used to invoke methods
$client = new SoapClient('http://www.visionflow.com/api/docs/service.wsdl')

// Set URL
$client->__setLocation('https://www.visionflow.com/service/VisionProject-v2/VisionProjectWebServiceService');

// Set parameters
$params = array('username'=>'username',
		        'password'=>'password',
			'webserviceAPIKey'=>'WSAPIKey',
			'visionProjectVersion'=>'13.0');

// Login, you will get the current logged in user back
$systemUser = $client->loginWithAPIKey2($params);

If you have your own installation of the system and you login to this you should use the method login2 instead and in this case you don't need a WSAPIKey:

// Set parameters 
$params = array('username'=>'username',        
'password'=>'password',
'visionProjectVersion'=>'13.0');

// Login, you will get the current logged in user back
$systemUser = $client->login2($params);

 

 

 

That's it. You now have an active connection to the server and can use the methods in the API.


User comments
 Loading ...