web stats
Sending JSON from Oracle DB to HTTP Sender - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2019, 10:28 PM
johnson979 johnson979 is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 2
johnson979 is on a distinguished road
Lightbulb Sending JSON from Oracle DB to HTTP Sender

Dear Support,

I am little new in Mirth Connect and have query on below situation in order to configure mirth:


We are having Oracle Database Connection and web services from 3rd party with a POST requires on HTTP Interface.

Web Interface requires JSON Data input using POST Method, So I was wondering If I add all my Oracle SQL Queries, will Mirth form JSON output data elements in one message and automatically send to web service using Destination as HTTP Sender?

Also i have noticed that when mirth is forming JSON data, it add extra html tags in message like <result> I dont know why mirth is adding this extra tags?
For e.g. below message formed by Json: -
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<result>
<cprno>999995372</cprno>
<bdate>2018-10-01</bdate>
<natlycd>null</natlycd>
<roadtypecd>null</roadtypecd>
<bldgtypecd>null</bldgtypecd>
<maritstatscd>003</maritstatscd>
<flatno>1234</flatno>
<bldgno>1234</bldgno>
<areacd>null</areacd>
<addrtypecd>3</addrtypecd>
<langcd>AR</langcd>
<facillicno>1234567</facillicno>
<engnm>Mrs. Alpha Bravo Delta Epsilon Charlie</engnm>
<relgncd>001</relgncd>
<patntphoneno>12223333</patntphoneno>
</result>


Any support/tutorial specifically on JSON implementation using Oracle DB to HTTP Sender will be highly appreciated.

Also do i need to code like javascript or something in order to achive above?

Kindly guide me.
Reply With Quote
  #2  
Old 02-01-2019, 12:48 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 954
agermano is on a distinguished road
Default

A Database Reader generates an XML message, which is what you have shared in your question. "Result" is your query result, and it contains elements for the db columns you selected.

You will have to transform this to JSON. The web service you are sending this to likely requires the JSON to be formatted in a specific way. You should find out what that needs to look like.
Reply With Quote
  #3  
Old 02-02-2019, 10:15 PM
johnson979 johnson979 is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 2
johnson979 is on a distinguished road
Exclamation transform this to JSON?

Dear, yes mirth add additional element <result> in generated message. How can I convert XML to JSON and use trasforming feature of Mirth.

Any tutorial or steps to achieve will be highly appreciated.
Reply With Quote
Reply

Tags
http sender, json, mirth 3.6.1, oracle 11g

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation