- Topics: Active | Unanswered
Pages: 1
Topic closed
#1 2008-06-30 02:59:27
- **_uvnpsaradhi_**
Trouble With Web Services.
Team,
I am trying to integrate the XML web services in my ASP.NET application. I am sending the following series of XMLs to connect and create and find a user.
I am able to login, but i get a response of "no-AccessCode".
here is the series of XMLs I am sending.
Please help me in finding the actual issue.
Request:
<param name="action">common-info</param>
Response:
<?xml version="1.0" encoding="utf-8"?>
<results><status code="ok"/><common locale="en" time-zone-id="85"><cookie>breezyzwsqo2finzsvuer</cookie><date>2008-06-30T07:26:02.030+00:00</date><host>http://admin.beta.acrobat.com</host><local-host>p01brzpr46</local-host><admin-host>admin.beta.acrobat.com</admin-host><url>/api/xml?</url><version>connect_700_r706</version><user-agent>Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)</user-agent></common></results>
Login:
Request:
"<param name="session">breezyzwsqo2finzsvuer</param><param name="action">login</param><param name="login">pupadrasta@sumtotalsystems.com</param><param name="password">********</param>"
Response:
<?xml version="1.0" encoding="utf-8"?>
<results><status code="ok"/></results>"
Find User:
<?xml version="1.0" encoding="UTF-8"?><params><param name="session">breezyzwsqo2finzsvuer</param><param name="action">report-bulk-users</param><param name="filter-like-login">p1</param></params>
<?xml version="1.0" encoding="utf-8"?>
<results><status code="no-access" subcode="no-login"/></results>
Create User:
<?xml version="1.0" encoding="UTF-8"?><params><param name="session">breezyzwsqo2finzsvuer</param><param name="action">principal-update</param><param name="first-name">UVN2080427802</param><param name="last-name">Saradhi341851734</param><param name="login">UVN2080427802@sumtotalsystems.com</param><param name="password">UVN2080427802$123</param><param name="has-children">0</param><param name="type">user</param><param name="email">False</param></params>
<?xml version="1.0" encoding="utf-8"?>
<results><status code="no-access" subcode="no-login"/></results>
Offline
#2 2008-07-15 13:10:00
- **_jcooper9099_**
Re: Trouble With Web Services.
does that user name / password combo have the proper rights on the system to add users ( must be a member of the Admins group)
and if he does have permission do you grab the cookie before or after login has been OK'd? The cookie changes.
Offline
#3 2008-07-15 13:19:35
- **_uvnpsaradhi_**
Re: Trouble With Web Services.
1) The user has the rights to add users.
2) I am taking the session after I login, so its the current session only.
3) Interestingly if i just change to use the Quesry string rather than posting the XML string, the same code works. Only issuue is sending XMl request and gettign the proper XML response.
Offline
#4 2008-07-15 13:34:10
- **_jcooper9099_**
Re: Trouble With Web Services.
is it possible that you are using a XMLHTTP request that is grabbing another cokkie from the server and ignoring your paramater?
I have used your fix method from the beginning and it works great. I grab the cookie right after login and store it as a variable (PublicCookie) then just append all requests with "&session=" + PublicCookie.
Last edited by **_jcooper9099_** (2008-07-15 13:37:46)
Offline
#5 2008-07-15 13:37:10
- **_uvnpsaradhi_**
Re: Trouble With Web Services.
I have placed the XML REquest string just before the call of send() above in my post, as u see, the session cookie details r not changing, the change I made is in my APIrequest function, replaced the REquest as a query string instead of sending as XML Request and everything started working. So i am really missing the issue here.
Offline
#6 2008-07-15 14:03:58
- **_jcooper9099_**
Re: Trouble With Web Services.
You are right, the cookie no longer changes. I documented the changing cookie in Connect 6... I wonder if you don't include the cookie in the request if the server issues another cookie. It really shouldn't... That's strange.
Offline
#7 2008-07-15 14:08:18
- **_uvnpsaradhi_**
Re: Trouble With Web Services.
Interesting part is I used to have a VB dll earlier and It works even with XML request and Response. I converted it VB.NET and the trouble started. I am guessing somethign related to my Conversion, but couldnt figure out. If the XML request and XML response is OK, I dont know what more I should look for . :(
Offline
#8 2008-07-15 14:47:51
- **_jcooper9099_**
Re: Trouble With Web Services.
Do you have the webservices API documentation for connect 7?
Offline
#9 2008-07-15 14:51:58
- **_uvnpsaradhi_**
Re: Trouble With Web Services.
yes, I have
Offline
Pages: 1
Topic closed