Page 1 of 1

Webservice issue

Posted: Thu Feb 01, 2018 7:47 am
by eventoteam
Respected Team,

I'm facing some issue in soap call.
Error message : Unable to connect to ProcessMaker. Error Number: 2 Error Message: User does not have rights to enter the system. object(stdClass)#3 (4) { ["status_code"]=> int(2) ["message"]=> string(46) "User does not have rights to enter the system." ["version"]=> string(3) "2.0" ["timestamp"]=> string(19) "2018-02-01 16:38:47" }

Can you please help me out how to fix it?
However i have run login test and it give status code = 0.

Re: Webservice issue

Posted: Thu Feb 01, 2018 10:45 pm
by amosbatto
The user needs to have the PM_LOGIN permission in his/her role in order to be able to login with web services.
If that isn't the problem, then post your PHP code and I will look at it.

Re: Webservice issue

Posted: Fri Feb 02, 2018 3:54 am
by eventoteam
User has Administrator role also PM_login is mapped against the user.

Code of Soapcall_config.php

<?php
//Server configuration file
include "server_config.php";
ini_set("soap.wsdl_cache_enabled", "0");
ini_set('error_reporting', E_ALL);
ini_set('display_errors', True);
// Soap Call function, This will be verifying credentials
$client = new SoapClient('http://'.$AppServerIP.'/sysworkflow/en/green/services/wsdl2');

?>

Re: Webservice issue

Posted: Fri Feb 02, 2018 10:06 pm
by amosbatto
What version of MySQL are you using? If your passwords are stored as 64 character hashes, then you need to use SHA256:
Code: Select all
$md5pass='md5:'. hash('sha256', $_POST['password']);
See:
http://wiki.processmaker.com/3.0/Proces ... e_Database

I don't see your code to connect to the PM web services URL. I assume that you have a line like this in one of the files you included:
Code: Select all
$client = new SoapClient('http://example.com/sysworkflow/en/neoclassic/services/wsdl2'); 
Your way of passing the parameters to the login web service is bizarre and I'm not sure if it works. Have you tried the way listed on the wiki?
Code: Select all
$params = array(array('userid'=>$username, 'password'=>$md5pass));
$result = $client->__SoapCall('login', $params);

Re: Webservice issue

Posted: Sat Feb 03, 2018 7:46 am
by eventoteam
Currently, we are using 5.5.32 version of mysql and 1.245 version of PM.

For passing the parameter, I had taken reference from one of the post of forum.

This code has worked for me.
$params = array(array('userid'=>$username, 'password'=>$md5pass));
$result = $client->__SoapCall('login', $params);

Thank You for your support once again :)

Re: Webservice issue

Posted: Mon Feb 05, 2018 11:44 pm
by amosbatto
Wow, I haven't used PM version 1.2 in over 6 years. Do you see any problems using it in modern web browsers?

Re: Webservice issue

Posted: Thu Feb 08, 2018 8:12 am
by eventoteam
LOL :D Our company is using it since, i guess 2010 or so.
It works fine, but there are few limitations i.e Dynaform editor only works in FireFox mozilla.
I have planned to upgrade it as soon as possible, as the newer version has bugs fixed and new features included.

It's always critical situation for us to perform changes in this version as there's no documentation of Verison 1.245 available atm.

Re: Webservice issue

Posted: Thu Feb 08, 2018 11:51 pm
by amosbatto
Here is the old documentation for version 1:
http://web.archive.org/web/201407012347 ... umentation

When we migrated from MediaWiki to Drupal, we didn't copy the documentation for version 1.

Re: Webservice issue

Posted: Fri Sep 23, 2022 2:38 am
by petergroft
Below are different tests you can perform to determine if the problem is on your end, in-between, or the web server.
Test your Internet connection.
Refresh your browser or try another browser.
Test and reset your router.
Test site using an online service.
Traceroute the connection.

Regards,
Peter