Hi,
Take a look at this example provided by IBM
https://www.ibm.com/developerworks/ibmi/library/i-rest-web-services-server1
Just download the resources, compile and deploy as described in the doc (multiple parts)
Take a good look at the screens.
Your examples of the path are missing the regex part defining the variable.
As an example you can use {datein:\d+}
Where datein: defines the id that is used and \d+ defines the parm as a multiple digits field.
If you want a character field then you can use {datain:\{1,10}}
This defines a char field with length of 1 to 10 chars.
Hope this helps,
-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxx> On Behalf Of Booth Martin
Sent: woensdag 21 november 2018 2:35
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] Setting up a web services server, and services
I can find no information about *PATH_PARM beyond the Help page, and frankly I couldn't figure out that section. Let me ask specifically....
Web service is WEEKDAY, an SQLRPGLE *PGM. The program has two parms, DATEIN and DAYOUT, both 10/char.
I put a default date in the IWS Wizard for the service with *QUERY_PARM. That, using a browser, returns the correct day-name as JSON. So the service works. It just doesn't recognize DATEIN.
However I can't figure out how to use *PATH_PARM. What is the correct URI path template?
I tried
* /{DateIn}
* /{DATEIN}
* /DATEIN/{DateIn}
* /WEEKDAY/{DATEIN}
and a few more permutations but none work.
On 11/19/2018 1:41 PM, Kevin Bucknum wrote:
Step 2-5 figure 10 shows the config for the web service where the it sets the input source. The screens look a little different on my box, but all the relevant fields are there.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.