Hi Peter,

One more suggestion in case it's causing issues is that when you specify a regex for a parameter I believe it's supposed to be separated from the parameter name with a colon, so in your example...

URI path template for method: /email/{email}/casenbr/{casenbr :^[0-9]+$}

Regards,

Mark.

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: 14 January 2019 19:36
To: web400@xxxxxxxxxxxxxxxxxx
Subject: Re: [WEB400] Using REST service created with IWS

Thanks Nadir and Tim! I was confused about how to specify parameters.
I've only ever used the query parameters; I didn't realize you could
pass parameters as path data.

Now things are making a bit more sense. In the IWS "Deploy New Service"
configuration, when it gets to "Specify resource method information" for
unwrapped parameters, has a drop-down list to select a parameter's
"Input Source"; the list contains

*QUERY_PARAM
*PATH_PARAM
*FORM_PARAM
*COOKIE_PARAM
*HEADER_PARAM
*MATRIX_PARAM
*NONE

What you guys just pointed out is the difference between *QUERY_PARAM
and *PATH_PARAM. If I've got this right, this tells the web service
server where to get the parameter value from so it can pass it in as a
parameter to my service program procedure, so I don't have to do that
work. Is that correct?

So I started over with IWS. Now I have

Base resource URL: http://1.2.3.4:10010/web/services/RT0200S

Procedure name: GETCASESTATUS
HTTP request method: GET
URI path template for method: /email/{email}/casenbr/{casenbr ^[0-9]+$}
HTTP response code output parameter: *NONE
HTTP header array output parameter: *NONE
Allowed input media types: *ALL
Returned output media types: *XML
Input parameter mappings:
Parameter name Data type Input source Identifier Default
Value
PEMAIL char *PATH_PARAM email *NONE
PCASENBR packed *PATH_PARAM casenbr ^[0-9]+$ *NONE

Which as I understand it, means my URL for this should be

http://1.2.3.4:10010/web/services/RT0200S/email/test@xxxxxxxxxxx/casenbr/12345

Is that correct? I'm guessing not, because it returns "HTTP 404 - Not
found".

It would be helpful if IWS showed what it expects the composite URL for
a given method to look like.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /
--
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://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.


________________________________

Consider the environment and think before you print this email.

________________________________

Proud partner of The Ageas Bowl.


This email has been sent by and on behalf of one or more of Ageas (UK) Limited (registered no: 1093301 ), Ageas Insurance Limited (registered no: 354568), Ageas Retail Limited (registered no: 1324965), or a subsidiary of Ageas (UK) Limited (together “Ageas UK”). Ageas UK companies are registered in England and Wales, and each entity’s registered office is Ageas House, Hampshire Corporate Park, Templars Way, Eastleigh SO53 3YA.

Ageas Retail Limited is authorised and regulated by the Financial Conduct Authority. Financial Services Register Number: 312468.

Ageas Insurance Limited is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority. Financial Services Register Number: 202039

This e-mail together with any attachments are intended for the addressee only and may be private and confidential. If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, you must not open any attachments, or copy, disclose, distribute, retain or use this e-mail, including any attachments, in any way whatsoever; please return it to us immediately using the reply facility on e-mail.

Consider the environment and think before you print this email.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.