× 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 Stefan
We had te same problem happen to us a couple of years ago
The way we circumvented it was to save the payload to a file in the ifs (the same program is used to process either XML or JSON)
This same program then reads that ifs file
Depending upon the first character of the string decides if its XML or JSON
For example
when %subst(%trim(RtvData): 1: 1) = '{';
JSON_string = *on;
when %subst(%trim(RtvData): 1: 1) = '[';
JSON_string = *on;
when %subst(%trim(RtvData): 1: 1) = '<';
XML_string = *on;

Depending upon what is set – the data is processed by the appropriate program

Hope this helps
Contact me if you need any further help

Alan Shore
Solutions Architect
IT Supply Chain Execution

[cid:image001.png@01D9266F.65FA0610]

60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx

‘If you're going through hell, keep going.’
Winston Churchill

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of stefan@xxxxxxxxxx
Sent: Thursday, January 12, 2023 9:44 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Apache Http/Https reverse proxy based on content?

Hi,



V7R4 soon to be V7R5.

A customer of mine has a bunch of Apache http-server instances running that are providing XML-data based on XML-requests from the outside world.

Now they want to serve json requests/responses as well from another set of Apache server instances.

Preferably they would like to use the existing external endpoints and route the incoming requests to different apache instances based on content type.



All incoming requests points at service.company.com

<me thinking out loud> If content ( payload ) is xml forward to xml.company.com

If content ( payload ) is json forward to json.company.com



I’ve been looking at ProxyPass and ProxyPassReverse but that seems to route based on endpoint hostname only.



Is anything like this possible?



All the best




Stefan Tageson













--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l<https://lists.midrange.com/mailman/listinfo/midrange-l>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l<https://archive.midrange.com/midrange-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

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.