• Issue in Soap Client

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #40669  by rashedmohajer
 
hi
I using php soap Clint to test Authentication
Code: Select all
<?php
  // Register WSDL
  $OKMAuth = new SoapClient('http://localhost:8080/OpenKM/services/OKMAuth?wsdl');
 
  // Login
  $loginResp = $OKMAuth->login(array('user' => 'okmAdmin', 'password' => 'admin'));
  $token = $loginResp->return;
  echo "Token: ".$token;
 
  // Logout
  $OKMAuth->logout(array('token' => $token));
?>
But sometimes it return token and sometimes error (SoapFault)
i try google But all the solutions on the PHP server settings
and Still problem exists , i think the problem tomcat server
Is there one would like to help me with this problem
I Use the latest version of openkm community , Wamp Server Apache version 2.2.11 , php version 5.3.0 windows 7 , Mozilla Firefox 41.0.1
 #40677  by jllort
 
Why do not try to use our sdk for php ?
http://wiki.openkm.com/index.php/SDK_for_PHP

Could be several reason for this error, but if sometimes it retrieves the token and other you get and error I should looking for connection problems. Also take a look at catalina.log file ( to see complete error in case the connection really be established, otherwise you will not seeing anything there ).
 #40686  by rashedmohajer
 
Do you have any idea about this Error
Code: Select all
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost:8080/OpenKM/services/OKMAuth?wsdl' : Extra content at the end of the document in C:\wamp\www\PROJECT\OKMSDK\logintest.php:3 Stack trace: #0 C:\wamp\www\PROJECT\OKMSDK\logintest.php(3): SoapClient->SoapClient('http://localhos...') #1 {main} thrown in C:\wamp\www\PROJECT\OKMSDK\logintest.php on line 3
 #40694  by jllort
 
Try with this code, I've checked and goes right:
Code: Select all
<?php
  // Register WSDL
  $OKMAuth = new SoapClient('http://demo.openkm.com/OpenKM/services/OKMAuth?wsdl');
 
  // Login
  $loginResp = $OKMAuth->login(array('user' => 'user1', 'password' => 'pass1'));
  $token = $loginResp->return;
  echo "Token: ".$token;
 
  // Logout
  $OKMAuth->logout(array('token' => $token));
?>

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.