Webservice issue

Ask questions about your install or get help installing and configuring ProcessMaker 2

Moderator: amosbatto

eventoteam
Posts: 18
Joined: Wed May 17, 2017 1:39 pm
Country: Pakistan

Webservice issue

Unread postby eventoteam » Thu Feb 01, 2018 7:47 am

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.
Attachments
Error.png
Error.png (8.89 KiB) Viewed 101 times

amosbatto
Posts: 5834
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz
Contact:

Re: Webservice issue

Unread postby amosbatto » Thu Feb 01, 2018 10:45 pm

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.
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)

eventoteam
Posts: 18
Joined: Wed May 17, 2017 1:39 pm
Country: Pakistan

Re: Webservice issue

Unread postby eventoteam » Fri Feb 02, 2018 3:54 am

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');

?>
Attachments
2018-02-02_12-56-23.png
Login php file.
2018-02-02_12-56-23.png (48.43 KiB) Viewed 93 times

amosbatto
Posts: 5834
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz
Contact:

Re: Webservice issue

Unread postby amosbatto » Fri Feb 02, 2018 10:06 pm

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/ProcessMaker_WSDL_Web_Services#Using_Hashed_Passwords_from_the_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);
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)

eventoteam
Posts: 18
Joined: Wed May 17, 2017 1:39 pm
Country: Pakistan

Re: Webservice issue

Unread postby eventoteam » Sat Feb 03, 2018 7:46 am

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 :)

amosbatto
Posts: 5834
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz
Contact:

Re: Webservice issue

Unread postby amosbatto » Mon Feb 05, 2018 11:44 pm

Wow, I haven't used PM version 1.2 in over 6 years. Do you see any problems using it in modern web browsers?
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)

eventoteam
Posts: 18
Joined: Wed May 17, 2017 1:39 pm
Country: Pakistan

Re: Webservice issue

Unread postby eventoteam » Thu Feb 08, 2018 8:12 am

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.

amosbatto
Posts: 5834
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz
Contact:

Re: Webservice issue

Unread postby amosbatto » Thu Feb 08, 2018 11:51 pm

Here is the old documentation for version 1:
http://web.archive.org/web/20140701234717/http://1x.wiki.processmaker.com/index.php/1x_Documentation

When we migrated from MediaWiki to Drupal, we didn't copy the documentation for version 1.
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)


Return to “Installation & Configuration”

Who is online

Users browsing this forum: Google [Bot] and 2 guests