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

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) 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> /

--
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://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.