|
From: Peter Dow <petercdow@xxxxxxxxx>parameter
To: web400@xxxxxxxxxxxxxxxxxx
Date: 01/16/2019 04:18 PM
Subject: Re: [WEB400] IWS REST POST request message body to input
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>
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 pathC802JSoJVCSDFRDJFcbW8SkuQ&s=if921hoIHqQ7ow21_tvcdoqxMT-uTGK6AMNdXyek1jU&e=
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. IfIWS is honouring that it would be expected to be blank.
service for an HTTP POST request.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
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)
4-3A10010_web_services_RT0200S&d=DwIGaQ&c=jf_iaSHvJObTbx-
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 INVALID URI REMOVED.
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=2oaZLi44dhP0ojXID-
HTTP/1.1u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwIGaQ&c=jf_iaSHvJObTbx-
on the HTTP server, and it appears to be reading the message bodyAccept-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
from the POST, although it doesn't show the contents:
AP_MODE_SPECULATIVE.
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
to get the message body in some other way?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
mailing list
--
*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)
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: INVALID URI REMOVED
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=2oaZLi44dhP0ojXID-C802JSoJVCSDFRDJFcbW8SkuQ&s=NcvEAABluqmcLsjGo1b3ZElP3KlwpMZRuL-b3XZscvo&e=
C802JSoJVCSDFRDJFcbW8SkuQ&s=8dAi7X_3i2dQM77OrNbDhGEfVItN6bgvRH9Utq50B2M&e=.u=https-3A__archive.midrange.com_web400&d=DwIGaQ&c=jf_iaSHvJObTbx-or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at INVALID URI REMOVED
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=2oaZLi44dhP0ojXID-
list
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxxxxxxxxu=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwIGaQ&c=jf_iaSHvJObTbx-
To subscribe, unsubscribe, or change list options,
visit: INVALID URI REMOVED
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=2oaZLi44dhP0ojXID-C802JSoJVCSDFRDJFcbW8SkuQ&s=NcvEAABluqmcLsjGo1b3ZElP3KlwpMZRuL-b3XZscvo&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxxC802JSoJVCSDFRDJFcbW8SkuQ&s=8dAi7X_3i2dQM77OrNbDhGEfVItN6bgvRH9Utq50B2M&e=.
Before posting, please take a moment to review the archives
at INVALID URI REMOVED
u=https-3A__archive.midrange.com_web400&d=DwIGaQ&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=2oaZLi44dhP0ojXID-
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.