Re: External Re: IWS Setup
Marco Facchinetti <marco.facchinetti-kthxv0ud/[email protected]> Thu, 16 Jan 2025 23:29:14 +0100
| Newsgroups | gmane.comp.systems.as400.web |
|---|---|
| Message-ID | <CAMsgu4pV3vzdEoa9CJiJJ8PpTcFf_0Obv-4wpJv8zaJXmH7i1Q@mail.gmail.com> |
This one seems wrong:
<data length="8" name="ENTCUSTNO" precision="0" restInPathParam="entenvir"
type="packed" usage="inputoutput"/>
The association between the RPG name and the parameter is wrong.
This is a short sample (2 parameters + a single field response):
<pcml restUriPathTemplate="/{type:\w+}/{code:\w+}" version="7.0">
<program errormessage="" httpheaders="*NONE" httpstatusonfailure="500"
httpstatusonsuccess="200"
inputWrapperIdentifier="TSTIWSInput" name="TSTIWS"
outputWrapperIdentifier="TSTIWSResult" parseorder="CUSTADDR"
path="/QSYS.LIB/MULTEST.LIB/TSTIWS.PGM"
restConsumes="application/json" restHttpRequestMethod="GET"
restProduces="application/json" threadsafe="false"
trimmode="*TRAILING" wrapInputParams="false" wrapOutputParam="true">
<data length="2" name="CUSTTYPE" restInPathParam="type" type="char"
usage="input"/>
<data length="5" name="CUSTCODE" restInPathParam="code" type="char"
usage="input"/>
<data length="100" name="CUSTADDR" type="char" usage="output"/>
</program>
</pcml>
{
"swagger": "2.0",
"info": {
"title": "TSTIWS APIs",
"description": "APIs available for TSTIWS",
"version": "1.0.0"
},
"basePath": "/web/services/TSTIWS",
"tags": [
{
"name": "TSTIWS APIs",
"description": "APIs available for TSTIWS"
}
],
"definitions": {
"TSTIWSResult": {
"type": "object",
"properties": {
"CUSTADDR": {
"type": "string",
"maxLength": 100
}
}
}
},
"paths": {
"/{type}/{code}": {
"get": {
"tags": [
"TSTIWS APIs"
],
"operationId": "TSTIWS",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"pattern": "\\w+",
"maxLength": 2
},
{
"name": "code",
"in": "path",
"required": true,
"type": "string",
"pattern": "\\w+",
"maxLength": 5
}
],
"responses": {
"200": {
"description": "Successful operation",
"schema": {
"$ref": "#/definitions/TSTIWSResult"
}
},
"500": {
"description": "Unexpected exception"
}
}
}
}
}
}
--
Marco Facchinetti
Mr S.r.l.
Tel. 035 962885
Cel. 393 9620498
Skype: facchinettimarco
Il giorno gio 16 gen 2025 alle ore 21:49 (WalzCraft) Jerry Forss <
[email protected]> ha scritto:
> Sorry.
>
> Brain thing today.
>
> <pcml restUriPathTemplate="/{entenvir:\w+}/{entcustno:\d+}" version="7.0">
> <program errormessage="" httpheaders="*NONE" httpstatusonfailure="500"
> httpstatusonsuccess="200"
> inputWrapperIdentifier="WOMADRBALRInput" name="WOMADRBALR"
> outputWrapperIdentifier="WOMADRBALRResult"
> parseorder="ENTCUSTNO ENTBILLNAME ENTBILLALTNAME ENTBILLADDR1
> ENTBILLADDR2 ENTBILLADDR3 ENTBILLCITY ENTBILLSTATE ENTBILLZIP
> ENTBILLCOUNTRY ENTSHIPADDR1 ENTSHIPADDR2 ENTSHIPADDR3 ENTSHIPCITY
> ENTSHIPSTATE ENTSHIPZIP ENTSHIPCOUNTRY ENTCURRENTBALANCE ENTPASTDUE ENTFAIL"
> path="/QSYS.LIB/UTILITIES.LIB/WOMADRBALR.PGM" restConsumes="*/*"
> restHttpRequestMethod="GET"
> restProduces="application/json" threadsafe="false"
> trimmode="*TRAILING" wrapInputParams="false" wrapOutputParam="true">
> <data length="2" name="ENTENVIR" restInPathParam="entenvir"
> type="char" usage="input"/>
> <data length="8" name="ENTCUSTNO" precision="0"
> restInPathParam="entenvir" type="packed" usage="inputoutput"/>
> <data length="35" name="ENTBILLNAME" type="char" usage="output"/>
> <data length="35" name="ENTBILLALTNAME" type="char"
> usage="output"/>
> <data length="35" name="ENTBILLADDR1" type="char" usage="output"/>
> <data length="35" name="ENTBILLADDR2" type="char" usage="output"/>
> <data length="35" name="ENTBILLADDR3" type="char" usage="output"/>
> <data length="35" name="ENTBILLCITY" type="char" usage="output"/>
> <data length="2" name="ENTBILLSTATE" type="char" usage="output"/>
> <data length="10" name="ENTBILLZIP" type="char" usage="output"/>
> <data length="2" name="ENTBILLCOUNTRY" type="char" usage="output"/>
> <data length="35" name="ENTSHIPADDR1" type="char" usage="output"/>
> <data length="35" name="ENTSHIPADDR2" type="char" usage="output"/>
> <data length="35" name="ENTSHIPADDR3" type="char" usage="output"/>
> <data length="35" name="ENTSHIPCITY" type="char" usage="output"/>
> <data length="2" name="ENTSHIPSTATE" type="char" usage="output"/>
> <data length="10" name="ENTSHIPZIP" type="char" usage="output"/>
> <data length="2" name="ENTSHIPCOUNTRY" type="char" usage="output"/>
> <data length="9" name="ENTCURRENTBALANCE" precision="2"
> type="packed" usage="output"/>
> <data length="9" name="ENTPASTDUE" precision="2" type="packed"
> usage="output"/>
> <data length="100" name="ENTFAIL" type="char" usage="output"/>
> </program>
> </pcml>
>
> -----Original Message-----
> From: WEB400 <[email protected]> On Behalf Of (WalzCraft)
> Jerry Forss
> Sent: Thursday, January 16, 2025 2:42 PM
> To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]
> >
> Subject: Re: [WEB400] External Re: IWS Setup
>
> I am sorry for being so dumb about this.
>
> Is that in the IFS?
> How do I get to that path, after I change the IP of course.
>
> -----Original Message-----
> From: WEB400 <[email protected]> On Behalf Of Marco
> Facchinetti
> Sent: Thursday, January 16, 2025 2:29 PM
> To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]
> >
> Subject: External Re: [WEB400] IWS Setup
>
> 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.
>
> Can you please post ADRBAL.pcml?
>
> /www/YOURIWSSERVER/webservices/services/ADRBAL/ADRBAL.pcml
>
> Best regards
> --
> Marco Facchinetti
>
> Mr S.r.l.
>
> Tel. 035 962885
> Cel. 393 9620498
>
> Skype: facchinettimarco
>
>
> Il giorno gio 16 gen 2025 alle ore 17:08 (WalzCraft) Jerry Forss <
> [email protected]> ha scritto:
>
> > Hi All
> >
> > I am trying to set a Web Server and Service for the first time and
> > it's not finding it when I test it.
> >
> > I am using SoapUI to test.
> >
> > Service Properties - General
> > Program /QSYS.LIB/UTILITIES.LIB/WOMADRBALR.PGM
> >
> > URL from Service Properties (IP changed to IBMi IP) http://IBMI
> > IP:10021/web/services/ADRBAL
> >
> >
> >
> >
> >
> > Parameters
> > ENTENVIR
> >
> > char
> >
> > *PATH_PARAM
> >
> > entenvir
> >
> > *NONE
> >
> > ENTCUSTNO
> >
> > packed
> >
> > *PATH_PARAM
> >
> > entenvir
> >
> > *NONE
> >
> >
> >
> >
> >
> > In SoupUI
> > Method Get
> > Endpoint http://IBMi IP:10021/
> > Resource /web/services/ADRBAL/AA/780
> >
> > Response
> > HTTP/1.1 404 Not Found
> > Date: Thu, 16 Jan 2025 14:44:47 GMT
> > Server: Apache
> > Content-Length: 0
> > Keep-Alive: timeout=300, max=99
> > Connection: Keep-Alive
> > Content-Language: en-US
> >
> > Parameters in RPG Pgm
> > Dcl-pi WOMAdrBalR;
> > EntEnvir Char(2);
> > EntCustNo Packed(8 : 0);
> > EntBillName Char(35);
> > EntBillAltName Char(35);
> > EntBillAddr1 Char(35);
> > EntBillAddr2 Char(35);
> > EntBillAddr3 Char(35);
> > EntBillCity Char(35);
> > EntBillState Char(2);
> > EntBillZip Char(10);
> > EntBillCountry Char(2);
> > EntShipAddr1 Char(35);
> > EntShipAddr2 Char(35);
> > EntShipAddr3 Char(35);
> > EntShipCity Char(35);
> > EntShipState Char(2);
> > EntShipZip Char(10);
> > EntShipCountry Char(2);
> > EntCurrentBalance Packed(9 : 2);
> > EntPastDue Packed(9 : 2);
> > EntFail Char(100);
> > End-pi;
> >
> >
> > What 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 Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
> > mailing list To post a message email: [email protected] To
> > subscribe, unsubscribe, or change list options,
> > visit: https://lists.midrange.com/mailman/listinfo/web400
> > or email: [email protected] Before posting, please
> > take a moment to review the archives at
> > https://archive.midrange.com/web400.
> >
> >
> --
> This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list To post a message email: [email protected] To subscribe,
> unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected] Before posting, please take a
> moment to review the archives at https://archive.midrange.com/web400.
>
>
>
>
> 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 Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list To post a message email: [email protected] To subscribe,
> unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected] Before posting, please take a
> moment to review the archives at https://archive.midrange.com/web400.
>
>
>
>
> 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 Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/web400.
>
>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.