Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance


* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jul 09, 2017 5:10 pm 
Offline

Joined: Fri Oct 28, 2011 3:39 pm
Posts: 41
Running 10.6.2 Community Edition on Ubuntu 16.04 with php 7.0 and mysql

Have tried both API examples for SOAP and JSON and confirmed the username and password are valid by logging in through html interface successfully.

JSON here is response:
Posting data to URL: https://xxxxcorp.dynu.net:444/xxxxTT/ap ... thod=Login POST Data: json=%7B%22user_name%22%3A%22admin%22%2C%22password%22%3A%226666666%22%7D -------------------------------------------------------------- Login Failed!

When I put URL in directly I get: {"api_retval":false,"api_details":{"code":"EXCEPTION","description":"Method Login POST Data: json={"user_name":"admin","password":"666666"} does not exist.","record_details":{"total":0,"valid":0,"invalid":0},"user_generic_status_batch_id":false,"details":false}}

SOAP I added some echo to the api scripts and get:
LOGGING IN
FAULT SOAP Fault: (Code: HTTP, String: Could not connect to host) - Request: Response: Login Failed!

In both scripts using:
$TIMETREX_USERNAME = 'admin';
$TIMETREX_PASSWORD = '666666';

For JSON
$TIMETREX_URL = 'https://xxxxcorp.dynu.net:444/xxxxTT/api/json/api.php'

For SOAP
$TIMETREX_URL = 'https://xxxxcorp.dynu.net:444/xxxxTT/api/soap/api.php'

Does anything in timetrex.ini.php affect this?

Have Log Enabled at verbosity 10 and Production FALSE, but nothing showing up in log

Thanks in advance,

Gregory


Top
 Profile  
 
PostPosted: Mon Jul 10, 2017 7:31 am 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 7280
Quote:
FAULT SOAP Fault: (Code: HTTP, String: Could not connect to host) - Request: Response: Login Failed!


That is likely your problem there, your script isn't able to communicate with the TimeTrex web server at all. Are you 100% certain the URL is correct? Is the URL using SSL?


Top
 Profile  
 
PostPosted: Mon Jul 10, 2017 7:07 pm 
Offline

Joined: Fri Oct 28, 2011 3:39 pm
Posts: 41
Shaun thanks.

When you say URL which exactly are you referring to? I am sure http://xxxxcorp.dynu.net/xxxxTT/ is correct HTTP URL from outside our office and https://xxxxcorp.dynu.net:444/xxxxTT is correct HTTP URL from outside office as through either I get interface to come up.

I have tried both above followed by /soap_punchtest.php see attached and get:

For HTTP:
LOGGING IN
FAULT SOAP Fault: (Code: HTTP, String: Could not connect to host) - Request: Response: Login Failed!

FOR HTTPS with http version for the $TIMETREX_URL global in soap_punchtest.php:
LOGGING IN
FAULT SOAP Fault: (Code: HTTP, String: Could not connect to host) - Request: Response: Login Failed!

Does $TIMETREX_URL need to be relative or local?

Thanks,

Gregory


Attachments:
soap_punchtest.txt [1.24 KiB]
Downloaded 2 times
Top
 Profile  
 
PostPosted: Tue Jul 11, 2017 7:24 am 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 7280
The URL should be a fully qualified URL that is accessible from whatever device you are running the script from. Just because you use one URL from outside the office, doesn't mean the same URL will work from inside the office though, it all depends on how you have your network setup.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron


Time and Attendance




Powered by phpBB® Forum Software © phpBB Group