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
http://1.2.3.4:10010/web/services/RT0200S 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> /
As an Amazon Associate we earn from qualifying purchases.