Login | Sign Up
 
  Search  



Site Map
 
HomeMy PagesMy ProfileMy MessagesMy FriendsMore MembersMy GroupsView GroupMore GroupsMy PurchasesAppsS3 AppsS3 FinancialsS3 HR/PayrollS3 ProcurementS3 Supply ChainM3 AppsEnterprise Asset Management Manufacturing OperationsFinancialsBPM/EPM/LBIDesign StudioEnterprise Reporting (Crystal)Microsoft Add-InsProcessFlow / BCISmart NotificationSmart OfficeTechDatabase ERDsData DictionaryApplication SecurityDevelopmentLawson 4GL Quick ReferenceDesign StudioDatabaseDB2OracleSQL ServerEnvironmentiSeriesUnixAIXWindowsLogan/IOSLSF 9M3 System Foundation PortalERDsDocumentationTips & TricksForumsJobsLawsonGuruLawsonGuru LetterLawsonGuru BlogWorthwhile ReadingLawson in the NewsUser RegistrationStoreStore AdminMy PurchasesStore FAQsSearchEngage Publish Search IndexerSearch ResultsSearch TipsArticlesAboutJohnContentUser ManagerBulk User ManagerBackupsMonitorVenexusVenexus Web ControlsViewArticleSignUp!LoginAdminSite SettingsTabsSecurity RolesUser AccountsVendorsSite LogBulk EmailFile ManagerRecycle BinLog ViewerSkinsLanguagesSite WizardAuthenticationSolutionsPageBlaster

Top 10 Posters
 
Tips on Using the LawsonGuru ForumsMaximize

LawsonGuru ForumsMinimize
SSO and AGS
Last Post 05/29/2008 02:20 PM by . 11 Replies.
Printer Friendly
Sort:
PrevPrevNextNext
To join the discussion you need to register first. (Registration is free!) If you are already a registered user please login to join the discussion.
AuthorMessages
Object reference not set to an instance of an object.

--
05/15/2008 12:00 PM  

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



Jason BeardUser is Offline
Private
Private
Basic Member (32 points)
Basic Member
Posts:17
Jason Beard

Send Message: Send Private Message

--
05/15/2008 12:08 PM  
if it is just a single call you are trying to make you should be able to execute something similar to the following:
http://servername/sso/SSOServlet?_action=LOGIN&_ssoUser=USERNAME&_ssoPass=PASSWORD&_ssoOrigUrl=http%3A%2F%2FSERVERNAME%2Fservlet%2FRouter%2FData%2FErp%3FPDL%3DPROD%26FILE%3DCUCODES&_serviceName=SSOP

Thanks,
Jason Beard
617-548-5568
jabeard3@gmail.com


Jason Beard
617-548-5568
jabeard3@gmail.com
Object reference not set to an instance of an object.

--
05/15/2008 12:12 PM  

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...?



John HenleyUser is Offline
Private
Private
Veteran Member (3333 points)
Veteran Member
Posts:1677
John Henley

Send Message: Send Private Message

--
05/15/2008 12:28 PM  
I think the primary point form the ".Net 9.0 AGS call" posting is that it's two steps. You have to get the cookie, and then pass the cookie. What programming environment are you using? If it's Java, you can also use the Lawson classes.



Thanks for using the LawsonGuru.com forums!

John
Object reference not set to an instance of an object.

--
05/15/2008 01:02 PM  

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 BeardUser is Offline
Private
Private
Basic Member (32 points)
Basic Member
Posts:17
Jason Beard

Send Message: Send Private Message

--
05/15/2008 01:53 PM  

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.


Attachment: 1515533167671.txt

Jason Beard
617-548-5568
jabeard3@gmail.com
Object reference not set to an instance of an object.

--
05/15/2008 02:10 PM  

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.



Object reference not set to an instance of an object.

--
05/15/2008 02:51 PM  
Are there any other solutions out there, what about the one in the documentation?


Jason BeardUser is Offline
Private
Private
Basic Member (32 points)
Basic Member
Posts:17
Jason Beard

Send Message: Send Private Message

--
05/15/2008 02:56 PM  

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



Jason Beard
617-548-5568
jabeard3@gmail.com
Object reference not set to an instance of an object.

--
05/22/2008 12:19 PM  
I reread the documentation and acquired the lhc.jar file from the server. With this, and dependencies on Apache-Commons HTTP, Logging, and Codec JARs, I was able to get the example code from the documentation to work. Of course, like any other example code it had several errors. But most were obvious. I wrote an additional wrapper in Java that leverages the native Lawson API within lhc.jar. This seems to be some "black magic" as far as Lawson is concerned as I wasn't able to find much support. If anyone needs help on this please post back, I'd be glad share the solution.

Thanks,
Jason


Object reference not set to an instance of an object.

--
05/28/2008 10:06 AM  

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).



Object reference not set to an instance of an object.

--
05/29/2008 02:20 PM  

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


Attachment: 152920544171.txt

To join the discussion you need to register first. (Registration is free!) If you are already a registered user please login to join the discussion.

Active Forums 4.1
Forum Postings...Minimize
RE: Modifying HTML in 9.0
07/03/2009 11:03 AM
I usually copy and paste the description of the pa

Security Administrator won't connect.
07/03/2009 10:36 AM
Once in a while, security administrator won't conn

RE: Two Questions:
07/03/2009 10:07 AM
what programs are doing this?

RE: Lawson Support - Staffing Question
07/02/2009 09:02 PM
The documentation library from Lawson, the support

RE: User 'lawson' SSO Password
07/02/2009 02:26 PM
Matt - thank you for the information. I'll change

ed810 not pulling tax
07/02/2009 12:40 PM
we are currently 8.03 sitting on 9.0lsf and use Gh

RE: Crystal for Financial Reporting
07/02/2009 11:17 AM
However, it is only for summary accounting units,

RE: Sarbox Compliance
07/02/2009 08:40 AM
John, We piloted the security dashboard with AV

RE: Work file paths
07/01/2009 05:04 PM
"We have deleted the job going to the wrong direct

RE: CSV Export
07/01/2009 02:00 PM
Are you using portal? If so run the wh130 to crea

Home  |  Tips & Tricks  |  Forums  |  Jobs  |  Store  |  About