Cisco Unified Presence APIs Developer Forums

« Back to SOAP API

RE: application user issue experienced with presence-service on CUP 8.6.3

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
I'm trying to test the CUP SOAP web service using soapUI. However when I attempt to send me login request I get back a "ensure the login data is valid" message.
On inspection of CUP logs using the CLI I see the following:
admin:file tail activelog epas/trace/esp/sdi/esp00000012.txt
08:23:09.519 |PID(1881) tpi_sip.c(1279) tpi_login_request(): User is no an App User
08:23:09.519 |PID(1811) tpi_soap.c(229) __cup__login(): Login failed. Invalid username: axltest
 
However "axltest" definitely is an application user (in the standard CUP Super Users group), and works with the AXL admin API for SQL queries. Is this not the correct setup for an application user for the soap-service?
 
The only mention of which group to use I found in the CUP developer guide was "Admin 3rd party API" but I tried this and got the same result (I also noticed that this group did not add any roles).
Any advice on the correct configuration or further troubleshooting steps would be appreciated.
Thanks,
Matt

Hi Matt,

Are you able to login with an end user's credentials? Is this problem only with logging in as an application user?

Are you using the following soap envelope in your request?
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"

Are you using the WSDL from the CUP 8.6.3 server? Do not use an old WSDL if you've updated CUP server.

Thanks,
Adrienne

Hi Matt,
Check if the application user is assigned to the right group from the CUP administration GUI which I think you have, I dont think there are any special roles for that group.

The only other think which you should be aware is the use of the appropriate client type within the login requst, do look at the logs which would give you more detailed info abt the error. The log you should be looking at is.

file tail activelog tomcat/logs/epassoap/log4j/*.log

Make sure you have Cisco UP Client Profile Agent service in debug mode.

As Adrienne commented, can you login end users ?

Regards,
Jose

Hi guys,

I get the same result when the log in request uses an enduser's credentials.

The SOAP envelope is correct and I loaded the WSDL from http://cupstest1:8082/presence-service/soap?wsdl

Full request/response:

<?xml version="1.0" encoding="http://www.w3.org/2003/05/soap-envelope"
standalone="no"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<login xmlns="urn:cisco:cup:presence:soap" force='1'>
<username>axltest</username>
<password>axltest</password>
</login>
</soapenv:Body>
</soapenv:Envelope>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cup="urn:cisco:cup:presence:soap">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<SOAP-ENV:Code>
<SOAP-ENVemoticonalue>SOAP-ENV:Sender</SOAP-ENVemoticonalue>
</SOAP-ENV:Code>
<SOAP-ENV:Reason>
<SOAP-ENV:Text>Failed to login user</SOAP-ENV:Text>
</SOAP-ENV:Reason>
<SOAP-ENVemoticonetail>
<description xmlns="urn:cisco:cup:presence:soap">
<code>114</code>
<message>Failed to login user</message>
<fix>Ensure the login data is valid</fix>
</description>
</SOAP-ENVemoticonetail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Check if the application user is assigned to the right group from the CUP administration GUI which I think you have, I dont think there are any special roles for that group.


Per my original post I have tried using both "CUP Super Users" and "Admin 3rd Party API" which of these is correct? In my testing both yielded the same result.

file tail activelog tomcat/logs/epassoap/log4j/*.log


I don't see any activity in these logs when submitting my request, only the the errors in:

admin:file tail activelog epas/trace/esp/sdi/esp00000012.txt

Thanks,
Matt

So you are using the Presence Web service. Try running the following command from admin cli

run pe sql ttlogin select * from validappusers
run pe sql ttlogin select * from validendusers


Let me know. Most likely, you probably need to raise a support case.

Regards,
Jose

Looks like I may be set here for now!

The validappusers query only returned one result which was the account which belonged to "Admin 3rd Party API" (and not the other account in CUP super users). I reset the password for this account, resubmitted the request and got a session key back.

I would also note FTR that application user accounts don't appear to become valid on changing to the correct group. I moved the account which had been in "CUP super users" into "Admin 3rd Party API" and re-ran the sql query and found it was still not listed as valid. I then reset the password, re-ran the sql query and saw it appear.

Thanks both for your help.

Super user account holders are not listed in validappusers (validappusers is an inmemory database which hold only users of Admin-3rd party API/ Admin CUMA user types), so you wont expected to see all app users there. But reg your problem with app user not being valid when moved to 3rd party API group, we had an internal defect (not visible in bug tool kit) which may be fixed in 8.6.4 & 9.0 (both are not released).

Regards,
Jose

Thanks again for your help Jose, the detail is much appreciated.

Jose Sebastian:
So you are using the Presence Web service. Try running the following command from admin cli

run pe sql ttlogin select * from validappusers
run pe sql ttlogin select * from validendusers


Let me know. Most likely, you probably need to raise a support case.

Regards,
Jose

Hi Jose,
I have a similar problem of not able to login the application user, but it is using the REST API. I succeeded logging in about a month back but not this week. Getting error code 114 Failed to login user. When I tried the above sql command, I get
 
admin:run pe sql ttlogin select * from validappusers
sqlRv(t) sqlstmt(select * from validappusers;)
***result set start***
ERROR: result failed errmsg(statement failed to parse)
***result set end***
 
What could be the issue?
 
Regards,
Kelvin
 
 

Hi Kelvin,
Those queries are related to the inmemory datastores which has changed slightly with CUP release 8.6.4 & above. If using 8.6.4 & above try the following.
run pe sql ttroute select * from validappusers
run pe sql ttroute select * from validendusers
Regards,
Jose

Thanks Jose, the commands worked.
The query showed that I have 0 validappusers. I have added new app users, change their passwords and added and remove access groups. However the query still returns 0 validappusers. I'm puzzled as I have managed to login an app user previously, as detailed in another post http://developer.cisco.com/web/cupapi/forums/-/message_boards/view_message/12336149
We are using CUPS 9.0.1.10000-21 in our test environment and has not changed anything in our app user settings. Is the internal defect you've mentioned fixed in this version?
 
Thanks.
 

Do refer developer guide. Has the app user been added to 'Admin 3rd Party API" group? 

Hi Jose,
 
Yes, I've been using the Developer Guide for CU CM IM and Presence 9.0. The app user in question has also been added to 'Admin-3rd Party API'. In addition, I've tried the steps highlighted by Matthew Penn of resetting passwords and also checking the logs by doing: file tail activelog epas/trace/esp/sdi/esp00000026.txt
 
I still get
11:49:52.965 |PID(30506) tpi_sip.c(1277) tpi_login_request(): User is not an App User 
11:49:52.965 |ID(30506) tpi_http.c(695) tpiLoginHandler(): tpiLoginHandler: Failed to login 
 
and the validappusers query still return count(0), success(t)
 
Is there any way of manually inserting the app user in the in-memory table using sql?
 

Looks like there could be a problem. PLease raise a TAC case for further investigation.