× 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.



Bradley,

Thanks for tip. Yes, I am using Scott's YAJL port. I hadn't looked at all of the sub-procedures available in the YAJL service program just yet. You are correct that I don't need much of CGIDEV2 to accomplish this. I was playing around with returning XML in addition to JSON, so I was using the CGIDEV2 procedures to create the XML response.

Dean Eshleman
Software Development Architect
Everence

1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
everence.com<http://www.everence.com/>



On 9/8/2017 7:19 AM, Bradley Stone wrote:
If you're using Scott's YAJL port it's ok to come in not translated.
Otherwise you'll need to convert it to start working with it because, as
mentioned, application/json tells the apace server to not convert it.

In fact, you shouldn't need much of any CGIDEV2 for this application if
it's simply parsing JSON.

Here's what I like to do:

content_type = getHTTPHeader('CONTENT_TYPE');

if (content_type <> 'application/json');
//error
endif;

docNode = yajl_stdin_load_tree(*ON:yajl_error);

Now, you could use the content-type to change the switch on
yajl_stdin_load_tree but I prefer this method to make sure the proper
content-type is always passed.


Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #2 <https://www.bvstools.com/mailtool.html>: The ability
to specify a "From" and/or "Reply To" email address!

On Thu, Sep 7, 2017 at 4:07 PM, Dean Eshleman <Dean.Eshleman-d3hNrR/acMxWk0Htik3J/w@xxxxxxxxxxxxxxxx>
wrote:

Since I was using SOAPUI, they had a drop down list for the content-type
values and text/json wasn't an option. It did have an option for text/xml,
so I used that and it worked like a charm. Then, I discovered I can type
in the content-type field in SOAPUI and I changed it to text/json. Now, it
is working as expected. Thanks for your help.

Dean Eshleman
Software Development Architect
Everence

1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
everence.com<http://www.everence.com/>


On 9/7/2017 4:50 PM, Slanina, John wrote:
Dean,

text/json will work fine. it's just the "application" that does it.
There has been a lot of talk about it but I never heard of a ways to
change it. I think it is hard coded in Apache.
But if you can change to ContentType = text/json then you don't have to
translate.

Thanks
John Slanina



______________________________________________________________________
Confidentiality Notice: This information is intended only for the
individual or entity named. If you are not the intended recipient, do not
use or disclose this information. If you received this e-mail in error,
please delete or otherwise destroy it and contact us at (800) 348-7468 so
we can take steps to avoid such transmission errors in the future. Thank
you.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400-Zwy7GipZuJhWk0Htik3J/w@xxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request-Zwy7GipZuJhWk0Htik3J/w@xxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


______________________________________________________________________
Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmission errors in the future. Thank you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.