IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Pass JSON data to mapping exposed as web service Options · View
cnuk
Posted: Wednesday, October 3, 2018 1:19:07 PM
Rank: Newbie

Joined: 9/20/2018
Posts: 7
Location: USA
Hi,

I created a simple mapping to convert JSON data to a csv file, similar to the one mentioned below.

https://manual.altova.com/mapforce/mapforceenterprise/index.html?mff_json_mapping_example1.htm

The web service set up is done but appears to be working with default or hard coded JSON file that was used during mapping creation.
How do we pass JSON data as String or other format when calling the web service from a browser?

The service URL will look like http://localhost:4646/service/jsontocsvws

and sample JSON data I am trying to post to above URL: { "name": "John3332", "age": 431, "city": "New Yorker" }

Thanks
island
Posted: Thursday, October 4, 2018 9:21:29 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
Hi,

right click on "File/String" in the JSON component and select "Parse Strings to JSON". Next insert an Input (FUNCTION | Insert Input) and connect this to "String:".
Then redeploy your mapping to Flowforce.


island attached the following image(s):
json_string.png

cnuk
Posted: Friday, October 5, 2018 7:52:40 PM
Rank: Newbie

Joined: 9/20/2018
Posts: 7
Location: USA
Island,

Thank you very much. I can now call the service by posting JSON data. It took some time to understand the credentials part, because by default it would ask for user id/pwd. Much better response than the production support updates.
cnuk
Posted: Tuesday, October 23, 2018 6:25:38 PM
Rank: Newbie

Joined: 9/20/2018
Posts: 7
Location: USA
island wrote:
Hi,

right click on "File/String" in the JSON component and select "Parse Strings to JSON". Next insert an Input (FUNCTION | Insert Input) and connect this to "String:".
Then redeploy your mapping to Flowforce.


Is it possible to configure Flowforce job to process data submitted in HTTP POST, without an input String configuration?
The 3rd party service is sending JSON data in HTTP POST to the exposed service, having issues since the mapping/job expects a parameter name.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.