Before using regular expressions, just do it without first just to ensure things are working. Regular expressions are tricky. Then issue request and if successful then redeploy by adding the regular expression. You will get 404 if the URL does not match the regular expression.
-----------------------------------------------
Nadir Amra
e-mail: amra@xxxxxxxxxx
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of (WalzCraft) Jerry Forss <JForss@xxxxxxxxxxxxx>
Date: Wednesday, January 15, 2025 at 12:36 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] RE: External Re: IWS
Here is the entire swagger. Would a parameter issue cause the 404?
Again, here is the URL I am using.
http://IBMi IP:10010/web/services/CustAdrBal/AA/780
{
"swagger": "2.0",
"info": {
"title": "CustAdrBal APIs",
"description": "APIs available for CustAdrBal",
"version": "1.0.0"
},
"host": "IBMi IP:10010",
"schemes": [
"http"
],
"basePath": "/web/services/CustAdrBal",
"tags": [
{
"name": "CustAdrBal APIs",
"description": "APIs available for CustAdrBal"
}
],
"definitions": {
"WOMADRBALRResult": {
"type": "object",
"properties": {
"ENTCUSTNO": {
"type": "number"
},
"ENTBILLNAME": {
"type": "string",
"maxLength": 35
},
"ENTBILLALTNAME": {
"type": "string",
"maxLength": 35
},
"ENTBILLADDR1": {
"type": "string",
"maxLength": 35
},
"ENTBILLADDR2": {
"type": "string",
"maxLength": 35
},
"ENTBILLADDR3": {
"type": "string",
"maxLength": 35
},
"ENTBILLCITY": {
"type": "string",
"maxLength": 35
},
"ENTBILLSTATE": {
"type": "string",
"maxLength": 2
},
"ENTBILLZIP": {
"type": "string",
"maxLength": 10
},
"ENTBILLCOUNTRY": {
"type": "string",
"maxLength": 2
},
"ENTSHIPADDR1": {
"type": "string",
"maxLength": 35
},
"ENTSHIPADDR2": {
"type": "string",
"maxLength": 35
},
"ENTSHIPADDR3": {
"type": "string",
"maxLength": 35
},
"ENTSHIPCITY": {
"type": "string",
"maxLength": 35
},
"ENTSHIPSTATE": {
"type": "string",
"maxLength": 2
},
"ENTSHIPZIP": {
"type": "string",
"maxLength": 10
},
"ENTSHIPCOUNTRY": {
"type": "string",
"maxLength": 2
},
"ENTCURRENTBALANCE": {
"type": "number"
},
"ENTPASTDUE": {
"type": "number"
},
"ENTFAIL": {
"type": "string",
"maxLength": 100
}
}
}
},
"paths": {
"/{Envir}/{CustNo}": {
"get": {
"tags": [
"CustAdrBal APIs"
],
"operationId": "WOMADRBALR",
"consumes": [
"*/*"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "Envir",
"in": "path",
"required": true,
"type": "string",
"pattern": "\\w+",
"maxLength": 2
},
{
"name": "Envir",
"in": "path",
"required": true,
"type": "number",
"pattern": "\\w+"
},
{
"name": "CustNo",
"in": "path",
"required": true,
"type": "string",
"pattern": "\\d+"
}
],
"responses": {
"200": {
"description": "Successful operation",
"schema": {
"$ref": "#/definitions/WOMADRBALRResult"
}
},
"500": {
"description": "Unexpected exception"
}
}
}
}
}
}
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Charles Wilt
Sent: Wednesday, January 15, 2025 12:19 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: External Re: IWS
To clarify, when I say you can use both, I mean a web service that uses path variables can also have query variables.
So something like
/customer/ABC123/currentbalance?includeDetails=true
vs query only parms
/customer/currentbalance?custId=ABC123&includeDetails=true
The backend code would expect at least 2 parameters custId and includeDetails
HTH,
Charles
On Wed, Jan 15, 2025 at 11:10 AM Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:
Web services can have two types of parameters, and you can use either
or both at the same time.
"path" /customer/ABC123/currentbalance "query"
/customer/currenbalance?custId=ABC123
The backend RPG code would be the same...but the way you define it to
IWS would be different.
HTH,
Charles
On Wed, Jan 15, 2025 at 11:02 AM (WalzCraft) Jerry Forss <
JForss@xxxxxxxxxxxxx> wrote:
From the example in Scott's doc the parameters are separated by /, not ?
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Gavin Inman
Sent: Wednesday, January 15, 2025 10:15 AM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: External Re: IWS
Are you sending any parameters?
Those should be at the end of the resource
example:
/web/services/CustAdrBal?var=something
On 1/15/2025 10:41 AM, (WalzCraft) Jerry Forss wrote:
It is a Rest.
From Swagger
"swagger": "2.0",
"info": {
"title": "CustAdrBal APIs",
"description": "APIs available for CustAdrBal",
"version": "1.0.0"
},
"host": "IBMi IP:10010",
"schemes": [
"http"
],
"basePath": "/web/services/CustAdrBal",
"tags": [
{
"name": "CustAdrBal APIs",
"description": "APIs available for CustAdrBal"
}
],
-----Original Message-----
From: MIDRANGE-L<midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Gavin Inman
Sent: Wednesday, January 15, 2025 9:36 AM
To: Midrange Systems Technical
Discussion<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: External Re: IWS
CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.
Is the service SOAP or Rest. I've found REST are easier to work with.
Download the WSDL file and import it into SOAPUI and it will set
everything up for you automagicly
Gavin.
On 1/15/2025 9:29 AM, (WalzCraft) Jerry Forss wrote:
Hi All
I am trying to set up a web service that will be for internal
communications only between the IBMi and the network.
Currently I use Stored Procedures that are called from the network
side and I return parameters or result sets.
We have a new application on the server where I want them to use the
IWS to request info.
I went through Scotts handout Providing RPG Web Services (Thank You
Scott!!!) and set up the server (WCIService) and deployed a new
service (CustAdrBal).
My problem is that I can't seem to get the URL right for trying it.
I am SURE it's something basic.
I am using SoupUI to test it.
URL ishttp://IP of IBMi:10010/web/services/CustAdrBal/AA/780
What the heck am I doing wrong?
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<
http://www.walzcraft.com > Phone: 1-800-237-1326
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.