Login and Cookie format

 2 Replies
 0 Subscribed to this topic
 16 Subscribed to this forum
Sort:
Author
Messages
Russ
New Member Send Private Message
Posts: 3
New Member


I can open a url in IE constructed like this to login, access /servlet/Router/Transaction/Erp, and get valid xml returned:

http://lawson-server:port...r/Transaction/Erp... with proper params.


This does not work the same from an asp, for remote login, using Msxml2.ServerXMLHTTP.4.0:
code sample:
Set objSvrHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")

objSvrHttp.open "GET", "http://lawprod:9082/sso/SSOServlet?_action=LOGIN&_ssoUser=myid&_ssoPass=mypa55wd&_ssoOrigUrl=http://lawprod:9082/servlet/Router/Transaction/Erp...."

objSvrHttp.send

cookie = objSvrHttp.getResponseHeader("Set-Cookie")

...

objSvrHttp.Open "GET", "http://lawprod:9082/sso/SSOServlet?_action=LOGIN&_ssoUser=myid&_ssoPass=mypa55wd&_ssoOrigUrl=http://lawprod:9082/servlet/Router/Transaction/Erp...."
objSvrHttp.setRequestHeader "COOKIE", left(cookie,instr(1,cookie,";")-1)

How can I do this programmatically, in a manner like it works when pasted into the browser (and valid xml is returned)?
Is the cookie in Response Header - and can it be sent in the Request Header?


John Henley
Send Private Message
Posts: 3351
See this post:
https://www.lawsonguru.co...w/topic/Default.aspx
John Polito has already done the groundwork..and we all owe him a beer (or other beverage of his !
Thanks for using the LawsonGuru.com forums!
John
Russ
New Member Send Private Message
Posts: 3
New Member
Thanks for the help - but is there any info on using the Msxml2.ServerXMLHTTP "server" component to login to LSF9? - not in the .NET world (i.e. legagy .asp vs .aspx). Will Msxml2.ServerXMLHTTP work like it has w/ older Lawson releases... anyone implementing it w/ asp or VB6 and LSF9 back-end? The cookie seem to be part of this challenge, w/ LSF9. The groundwork in the link is using .Net, not Msxml2.ServerXMLHTTP. Thanks.