|
I find Postman much easier to use than SOAPUI which is cluttered up with all the SOAP junk that you don't need.
https://www.getpostman.com/
[https://www.getpostman.com/img/v2/logo-glyph.png]<https://www.getpostman.com/>
Postman | API Development Environment<https://www.getpostman.com/>
Postman is the only complete API development environment, for API developers, used by more than 5 million developers and 100,000 companies worldwide. Postman makes working with APIs faster and easier by supporting developers at every stage of their workflow, and is available for Mac OS X, Windows, and Linux users.
www.getpostman.com
________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Peter Dow <petercdow@xxxxxxxxx>
Sent: 16 January 2019 23:31
To: web400@xxxxxxxxxxxxxxxxxx
Subject: Re: [WEB400] IWS REST POST request message body to input parameter
That test facility seems to have disappeared at some point. I see it in
the IWS wizard on 5.4, but not on 7.3. That's why I've been using
SOAPUI for the testing. Which is another thing I'm not too familiar with.
On 1/16/2019 2:26 PM, Jon Paris wrote:
Mea culpa - I read it the wrong way round.--
Have you tried using the test facility built into the wizard? That might help you narrow down the point of failure.
Jon Paris
https://nam05.safelinks.protection.outlook.com/?url=www.partner400.com&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=vSnJhVaizVXkL3HnvxIQga7Viy990zezltsLVj2MhP4%3D&reserved=0
https://nam05.safelinks.protection.outlook.com/?url=www.SystemiDeveloper.com&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=XQXtq0PGWU%2F6eNtBympwjUbgMmQ0OS2ivN9HiBa0xXU%3D&reserved=0
On Jan 16, 2019, at 5:18 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:
The way I understand it, the web service created by IWS receives the POST request from SOAPUI (running on a Win7 VM). The POST request has a message body that contains the XML shown below. The web service then calls the ADDCASE procedure in my service program, passing it the message body. That should be the XML noted below.
However, when ADDCASE gets control, that parameter is blank. The const means ADDCASE cannot expect any changes to that parameter to be returned to the caller, and it doesn't. The pCaseNbr parameter is used to return data to the caller.
I should also mention that the other procedure, GETCASE, has the same const on its input parameter and it works as expected. In that case, the data is not coming from the HTTP GET message body, but from the path parameters of the URL used to invoke the request.
I tried to follow the java created by IWS but I failed to see where the message body is actually placed in the parameter that is passed to ADDCASE. Presumably in the Apache web server that actually receives the request.
On 1/16/2019 1:29 PM, Jon Paris wrote:
I'm confused. That parm is defined as Const - so input only. If IWS is honouring that it would be expected to be blank.--
Jon Paris
https://nam05.safelinks.protection.outlook.com/?url=www.partner400.com&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=vSnJhVaizVXkL3HnvxIQga7Viy990zezltsLVj2MhP4%3D&reserved=0
https://nam05.safelinks.protection.outlook.com/?url=www.SystemiDeveloper.com&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=XQXtq0PGWU%2F6eNtBympwjUbgMmQ0OS2ivN9HiBa0xXU%3D&reserved=0
On Jan 16, 2019, at 2:17 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:
I'm on v7r3, trying to configure an IWS (Integrated Web Server) service for an HTTP POST request.
The IWS configuration looks like this:
Procedure name: ADDCASE
HTTP request method: POST
URI path template for method: *NONE
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: Wrap input parameters
The raw request looks like this:
POST https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2F1.2.3.4%3A10010%2Fweb%2Fservices%2FRT0200S&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=26eKYFpf7nTIiWeiatS5pNUQBAQ4oRDmD4gjZAeNDFA%3D&reserved=0 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Content-Length: 343
Host: 1.2.3.4:10010
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<ADDCASEInput>
<name>Peter Dow</name>
<addr1>9379 Salina Way</addr1>
<addr2>25 char max</addr2>
<addr3>25 char max</addr3>
<city>Sacramento</city>
<state>CA</state>
<zip>95827</zip>
<email>petercdow@xxxxxxxxx</email>
<sku>abcdef</sku>
<proddesc>30 char max</proddesc>
<phone>9097939050</phone>
</ADDCASEInput>
My procedure (in a service program) has this:
p AddCase b export
d pi
d pCaseXML 1024a const input
d pCaseNbr 256a output
The problem is, pCaseXML is always blank. I ran a TCP app trace on the HTTP server, and it appears to be reading the message body from the POST, although it doesn't show the contents:
0002DBEE:256048 mod_was_ap22_http: cb_read_body: Entry
0002DBEE:256072 ap_setup_client_block()
0002DBEE:256080 ap_should_client_block()
0002DBEE:256088 ap_get_client_block(), length requested = 343.
0002DBEE:256088 ap_http_filter()
0002DBEE:256104 core_input_filter, mode = AP_MODE_READBYTES or AP_MODE_SPECULATIVE.
0002DBEE:256120 Collection services: r_IUO->bytes_received = 562
0002DBEE:256120 mod_was_ap22_http: cb_read_body: Exit
Am I configuring the IWS service incorrectly? Or am I supposed to get the message body in some other way?
--
*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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=pb6CkDwSvN6psJ9IRVbp0BH1ob5VpYfdDpTE2rhdgS0%3D&reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=OUYn%2FRvKaXvNgByf79tQmHJj2WkD5AMQJ%2FJ58UzBfTE%3D&reserved=0.
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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=pb6CkDwSvN6psJ9IRVbp0BH1ob5VpYfdDpTE2rhdgS0%3D&reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=OUYn%2FRvKaXvNgByf79tQmHJj2WkD5AMQJ%2FJ58UzBfTE%3D&reserved=0.
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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=pb6CkDwSvN6psJ9IRVbp0BH1ob5VpYfdDpTE2rhdgS0%3D&reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Ccccc432181c34b8cefb908d67c02633d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636832747025186554&sdata=OUYn%2FRvKaXvNgByf79tQmHJj2WkD5AMQJ%2FJ58UzBfTE%3D&reserved=0.
As an Amazon Associate we earn from qualifying purchases.
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.