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?
Single standalone webpage on System i
Single standalone webpage on System i
I don't know what I am doing, nor how I did it. If it works, luck was involved 
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Single standalone webpage on System i
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
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
Re: Single standalone webpage on System i
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 
Re: Single standalone webpage on System i
Speaking of SOAP reminded of this interesting 5 year old take on its status - http://readwrite.com/2011/05/26/soap-is ... ts-undead/
Re: Single standalone webpage on System i
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 
Re: Single standalone webpage on System i
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 
Re: Single standalone webpage on System i
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.
Re: Single standalone webpage on System i
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 