Single standalone webpage on System i

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
User avatar
HMJust
Posts: 53
Joined: Wed May 11, 2016 7:23 pm
Contact:

Single standalone webpage on System i

Post by HMJust »

Hi again

I need to make a single webpage hosted on our System i. I have tried to get my head around the Webevent and have made a test that at least gets some sort of response - though it is mostly control codes.

As far as I have found out, I should be able to call it as for example http://DOMAIN:PORT/cgi-bin/lansaweb?procfun+PROCESS+FUNCTION+PARTION+LANGUAGE+FUNCPARMS+DUMMY(A0010):b and I get the strange response mentioned above.

The response will be consumed by a client service someone else is making, so I don't need any interaction or design - I basically just need to output some text.

I have some trouble figuring out the documentation and the samples, so is there anyone who can point me to a sample I could use?
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Single standalone webpage on System i

Post by Stewart Marshall »

When you say you "just need to output text", do you mean in the JSON/XML web service sense, or just a simple web page that displays a message to the user?

For the latter, a Webpage will solve the problem easily. It's a bit of a sledgehammer to crack a nut, but it will certainly do the job.

If you need to expose a webservice, you'll need to use Integrator.

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
User avatar
HMJust
Posts: 53
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: Single standalone webpage on System i

Post by HMJust »

The response would probably be either XML or JSON, but the other service (out of my control) would prefer not to use SOAP.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Single standalone webpage on System i

Post by MarkD »

Speaking of SOAP reminded of this interesting 5 year old take on its status - http://readwrite.com/2011/05/26/soap-is ... ts-undead/
User avatar
HMJust
Posts: 53
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: Single standalone webpage on System i

Post by HMJust »

Yeah, well, my feelings towards SOAP aside, I have tried to work myself through the tutorial at http://docs.lansa.com/14/en/lansa093/in ... _00500.htm and I must say that there are significant difference between the steps shown there and the UI in Lansa Integrator 14.0 on our development server.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:
User avatar
HMJust
Posts: 53
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: Single standalone webpage on System i

Post by HMJust »

Granted, I got a bit confused there and see that the mismatch between the UI and the documentation isn't as big as I thought. And I am getting a response, so that's something.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: Single standalone webpage on System i

Post by soa »

If you want to call a LANSA WEB function that returns text (json, XML or plain text) the easiest and fastest way is to create a WAM WEbroutine with a Response type of *json or (#http). The routine will automatically map in posted variables via Web_map for(*input) and if *json is selected WEB_MAP for(*output) fields and lists will be automatically returned as LANSA json. If #http return is selected then any string built in the function or IFS file will be returned with full control over the content type. These functions are much faster than Integrator functions and much simpler to write and maintain.
User avatar
HMJust
Posts: 53
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: Single standalone webpage on System i

Post by HMJust »

Thank you. I think you understood what I was trying to say - right now I am a bit committed on this task but I will look into that way later.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:
Post Reply