× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Steve,

I am receiving input in JSON string, but while sending it back i will just
populate the data into an Data Structure and Web Service itself will
convert the data into JSON format while sending it to the Client. So i am
using http status code to send the response code to the Client.

But as Kevin replied,

https://developer.ibm.com/tutorials/i-rest-web-services-server1/

400 and 500 range error messages don't send the body it seems. So in my
case i don't have any other option it seems.

Regards,
Surender K


On Thu, Jul 25, 2019 at 10:26 AM Steve Richter <stephenrichter@xxxxxxxxx>
wrote:

are you using the httpstatus code to indicate an application error? If so
I kind of question why that is necessary. I would include the error code
and message in the JSON data.


On Wed, Jul 24, 2019 at 10:15 AM Suren K <suren7437@xxxxxxxxx> wrote:

Hello Everyone,

I started the Web Server in IBMi and configured a Export Procedure which
has 3 Parameters, Parameter 1 as Input (JSON String), Parameter 2 as
Output
Response (JSON String) and Parameter 3 as httpStatus code.

Now whenever i am returning httpstatus code as 200 or 201 i can see the
Output response JSON string in my Interface (I am using POSTMAN), but
when
i returning httpstatus code as 400 (Error) then the Output JSON string is
completely suppressed. I am not getting the Output string in Interface.

Is there is any configuration i need to enable to view the Output string
even when error code is not 200 or 201?

Regards,
Surender K
+1 7022091188
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.