Hi jangins101,
I have written a VB.Net application that creates a number of Personnel Actions and connects to Lawson to apply them. It is tricky to do so if need any help let me know.
John P.
Ok, explain to me what your trying to do, and what you have gotten to work so far.
OK here is how i am connecting,
Public Overridable Function SubmitPAtoLawson(ByVal http As String)Dim mainReq, LoginReq As HttpWebRequestDim cred As NetworkCredentialDim mainResp, LoginResp As HttpWebResponseDim qryReturn As String
loginStream =
mainResp =
mainStream =
cred =
LoginReq = WebRequest.Create(
LoginReq.Method =
LoginReq.UserAgent =
LoginResp = LoginReq.GetResponse
cookies =
LoginReq.CookieContainer = cookies
LoginResp.Cookies = LoginReq.CookieContainer.GetCookies(LoginReq.RequestUri)
qryReturn = loginStream.ReadToEnd
mainReq = WebRequest.Create(
mainReq.Method =
mainReq.ContentType =
mainReq.Credentials = cred
mainReq.PreAuthenticate =
mainReq.Headers.Add(HttpRequestHeader.AcceptLanguage,
mainReq.UserAgent =
postData =
System.Web.HttpUtility.UrlEncode(http)
mainReq.CookieContainer = cookies
mainReq.ContentLength = Len(postData)
postStream =
postStream.Write(postData.ToString)
postStream.Close()
mainResp = mainReq.GetResponse()
qryReturn = mainStream.ReadToEnd()
xmlDoc =
xmlDoc.LoadXml(qryReturn.ToString)
ActionReturnMsg =
ActionReturnCode =
End
Let me know if this makes sense.
John, Thank you very much for posting your sample code. We are upgrading from 8.02 to LSF9 and we have around 10 applications that used to use the Lawson COM+ along with VB6 in 8.02 and your code example has given us an excellent starting point for converting all of these applications. You have saved us a lot of research and otherwise wasted time.
Thank you again, Shawn