By using different URI templates for each one.

In this case you already differentiate the procedures by specifying

/GET3/{Key2}/{place}

/GET2/{Key2}



"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 06/17/2019 01:47:27
PM:

From: anshul narang <narang.anshul@xxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 06/17/2019 01:47 PM
Subject: [EXTERNAL] Re: [WEB400] 404 not found :URI Template for
different modules in Service Program
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

Thanks Nadir for clarification ,

My question is how do we access different procedures (GET/GET1/GET2)
using
URI template .

All three procedures are get operation.

GET1
https://urldefense.proofpoint.com/v2/url?

u=https-3A__xx_web_services_CUSDRIVER-3FKey-3D547-26File-3DHeadq&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=3vkQdxXadHa_Bn6Y_jWYGpt8B7ciMjnKcaXX2nv_N9E&e=

GET2
https://urldefense.proofpoint.com/v2/url?

u=https-3A__xx_web_services_CUSDRIVER_2345-28key2&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=OHxJ3Tbj3CQrzMp8mKB5qpvBQF1RLCSmBqsPxl_cm_k&e=
value) {Doesn't work}

GET3


On Mon, Jun 17, 2019 at 12:41 PM Nadir Amra <amra@xxxxxxxxxx> wrote:

The link would be whatever is specified in the service properties
general
tab...the base resource url. For example:


Base resource URL:
https://urldefense.proofpoint.com/v2/url?

u=http-3A__host-3A47000_web_services_QIWSSAMPLEtest&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=lp1UeTTpK-L8UScWHbY5RTcRfFujgH8yAPraNiwv3Y4&e=


"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 06/17/2019
08:25:24
AM:

From: anshul narang <narang.anshul@xxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 06/17/2019 08:25 AM
Subject: [EXTERNAL] [WEB400] 404 not found :URI Template for
different modules in Service Program
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

I have different modules in my SRVPGM after following Nadir's link
https://developer.ibm.com/tutorials/i-rest-web-services-server3/ .

There is something wrong about URI template
I have 3 get modules which have different parameters and length.

Procedure name: GET3
HTTP request method: GET
URI path template for method: /GET3/{Key2}/{place}
HTTP response code output parameter: httpStatus
HTTP header array output parameter: httpHeaders
Allowed input media types: *JSON
Returned output media types: *JSON
Input parameter mappings:
Parameter name Data type Input source Identifier Default Value
Key int *PATH_PARAM Key2 *NONE
Place int *PATH_PARAM Place *NONE



Procedure name: GET2
HTTP request method: GET
URI path template for method: /GET2/{Key2}
HTTP response code output parameter: httpStatus
HTTP header array output parameter: httpHeaders
Allowed input media types: *JSON
Returned output media types: *JSON
Input parameter mappings:
Parameter name Data type Input source Identifier Default Value
Key int *PATH_PARAM Key2 *NONE

Procedure name: GET1
HTTP request method: GET
URI path template for method: *NONE
HTTP response code output parameter: httpStatus
HTTP header array output parameter: httpHeaders
Allowed input media types: *JSON
Returned output media types: *JSON
Input parameter mappings:
Parameter name Data type Input source Identifier Default Value
Key int *QUERY_PARAM Key *NONE
File char *QUERY_PARAM File *NONE



URI Template is supposed to help us identify which procedure to be
called
for the Get operation.

GET1
https://urldefense.proofpoint.com/v2/url?




u=https-3A__xx_web_services_CUSDRIVER-3FKey-3D547-26File-3DHeadq&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=Cx_ZUeVjkbQ9BwPcqpkYcgM-
SYBspZTam-FA4_ts70Y&s=6RfRVgUOwPw4FR4drfon5GEzNlhihYaNQyVfiS-oG5s&e=

GET2
https://urldefense.proofpoint.com/v2/url?



u=https-3A__xx_web_services_CUSDRIVER_2345-28key2&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=Cx_ZUeVjkbQ9BwPcqpkYcgM-
SYBspZTam-FA4_ts70Y&s=NZgKFKNx3-dS4rVBYsNvZq8RCaAeI1T2KyXKXhgN9SM&e=
value) {Doesn't work}

GET3
What woudl be link for it ?
--



--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=dP3hsYgY7fQBlGiKMVAvIU65GgdhzVUnsu6GWaqBPkI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=5SvQM_XgLF3YdEi3vwoADYanEEJ1nCRAlMFHCd7ujjs&e= .



--

Thank You

Anshul Narang
715-921-4968
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=dP3hsYgY7fQBlGiKMVAvIU65GgdhzVUnsu6GWaqBPkI&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=7I83fNWIZ_pbegoaCB9t6wk-oCGTh-
Kr5KoZFMeE8ic&s=5SvQM_XgLF3YdEi3vwoADYanEEJ1nCRAlMFHCd7ujjs&e= .





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.