Scott, you're right about that, my ScriptAliasMatch would only solve for
invoking a program, but nothing about REST. I was only picking up on the
part of his message where it looked like the program was not being found.

I have not looked at your presentation, so I didn't know he was getting the
regular expression from that.

So back to his question, why doesn't his ScriptAliasMatch work, assuming he
copied it correctly from your presentation?

Craig Pelkie

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Tuesday, June 30, 2015 4:45 PM
To: Midrange Systems Technical Discussion
Subject: Re: My First REST Web Service

Craig,

Why would you suggest that? That would only work if you did not use
the URL to identify the object working with. in a RESTful architecture, the
URL is supposed to identify something.

For example, this might identify invoice 12345:

http://yourserver/rest/INVOICE/12345

That won't work with the ScriptAliasMatch you've given, because it'll expect
the program to be namde 'INVOICE/12345.pgm' which isn't a valid object name.

Is there something wrong with the regular expression he got from me that
you'd like to comment on? I've been using it for years without problems,
but perhaps you see a flaw?

Or.. why are you suggesting a different one? (especially since it's one
that won't work, at least, with the requirements of the presentation he got
it from...)

-SK


On 6/30/2015 2:27 PM, Craig Pelkie wrote:
Try

ScriptAliasMatch ^/rest/(.*) /qsys.lib/EUR_2VAROB.lib/$1.pgm

Craig Pelkie

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
gio.cot
Sent: Tuesday, June 30, 2015 9:14 AM
To: midrange-l@xxxxxxxxxxxx
Subject: My First REST Web Service

Hi
following the Scott Klement's document (
<http://www.scottklement.com/presentations/Providing%20RPG%20Web%20Ser
vices% 20on%20IBM%20i.pdf>
http://www.scottklement.com/presenta...%20IBM%20i.pdf)
i'm try to write my first REST Web service

this is the configuration HTTP Server file :
1 LoadModule mod_ibm_lwi /QSYS.LIB/QHTTPSVR.LIB/QLWIIHSMOD.SRVPGM
2 HotBackup Off
3 KeepAlive Off
4 DocumentRoot /www/WSERVICE/htdocs
5 AddLanguage en .en
6 LogMaint logs/error_log 7 0
7 LogFormat "%h %T %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
8 Listen *:10066
9 AccessFileName .htaccess
10 DirectoryIndex index.html
11
12 order allow,deny
13 allow from all
14
15 LwiPluginConfig /www/WSERVICE/conf/lwi-plugin-cfg.xml
16
17 LwiAssignUserID myuser
18 LwiAutostartOption StartEnd
19 LwiStartJobQueue QHTTPSVR/QZHBHTTP HTTPWWW
20
21
22 # My RESTFULL webservices
23 ScriptAliasMatch /rest/([a-z0-9]*)/(.*)
/qsys.lib/EUR_2VAROB.lib/$1.pgm
24
25 Order Allow,Deny
26 Allow From All

my pgm TESTREST is located in EUR_2VAROB library

from browser i run <http://myiseries:10066/rest/testrest>
http://myiseries:10066/rest/testrest

i receive HTTP 404 impossible to find Web page

how can i find the error

Thanks

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.