I am attempting to run AGS calls from outside the Lawson "environment" in 9.0. In 8.x it was a simple HTTP authenticate and passing the data in the URL to /ags.exe. However, in 9.0 with the session based management, things are a little trickier using /sso/SSOServlet. I have read the post for the ".Net 9.0 AGS call", but we are not using .Net and I feel something got lost in translation. I have attempted to send an HTTP POST to /sso/SSOServlet with the documented fields and faked cookies. Yet, all it returns is the login page HTML. I am either missing some key field or some trigger to bypass all of Lawson's JavaScript functionality.
Obviously a remote HTTP request will not run JavaScript. So is there another way? Has someone done this and can identify the common pitfalls?
Thanks,
Jason
I have tried this format. It will work if I paste it in the browser, but not programmatically (web service call). It is something to do with the JavaScript run in the browser that keeps it from working programmatically. If you disable JS in your browser and clear your cookies, try to run that link - it will not work.
There has to be a work around...?
I have tried passing the cookies for JSessionID and C.LWSN then POSTing the rest. We are using ColdFusion, which "is" Java. I would like to keep the solution in ColdFusion as that is what it was in the past. However, at this point I just want it to work.
Where would I download the Java classes to run a test?
Jason,
attached is a sample java servlet that authenticates and then executes a call. the call in this case is to a workunit form however the concepts should be the same. Please let me know if you have any questions.
Thanks. I will take a look. However, there is an example in the Lawson API Docs that uses Java and a SSOP object or something. This is not a native Java class. I was curious where this come from?
Still pretty interesting that you CAN NOT just post the 4 fields to the page and achieve a sucessful login.
This was a custom test servlet we wrote to work out the kinks with the new LSF9 architecture. My current client has a custom Applicant Self Service product which creates work units for approval etc.
We tried using the example in the manual... but had issues. So we wrote it as you see. You can ignore the code about trying the call a few times etc. We were having issues with AD as a result of the way the bind was initially done. I just haven't bothered to take out the unncessary code.
good luck
Jason Beard
617-548-5568
jabeard3@gmail.com
Yes, please. post more info. Ourselves also just got hit with such an 'opportunity to update code'.
Using web service calls to the AGS (exe or java) works just fine in the past with Apache. Now, with websphere, we can not get much past the front door yet. I am at the same stage as the earlier posts (basically, wrapping the url inside the login url).
No problem. The attached file is a Java class that wraps the Lawson API. It is a mix of corrected code from the Lawson Documentation example with some added error checking. There are a few comments, but it should be straightforward enough. The trick is getting the it to run. You will need the lhc.jar file from your Lawson environment, and it has dependencies on 3 Apache-commons JARs - HttpClient, Logging, Codec - which you can web search and download. With those it should run. Of course this is Lawson after all, so post any questions back.
Thanks, Jason