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.

REST APi and JSON as a target - problem Options · View
Pawel
Posted: Saturday, November 9, 2019 6:23:28 PM
Rank: Member

Joined: 10/30/2019
Posts: 15
Location: Poland
Hello all,

I would like to get some help on the problem that I am experiencing when trying to get and then map an json output/answer from a web REST API.
The problem is that when I get an answer from API using "decode -mime-entity function" I get a json answer as a correct json answer from service please see below. But when I want to provide a json schema to the response with 200 status I don't get any data (like an empty json file). At this point I don't know what I am missing, is the json structure provided a problem?

The REST API service returns data in JSON format. Plsae see also below a sample correct json answer from the service which I want then map to some xls or text file as a source

I will also include a json schema file that I am using as a structure for rest API answer with 200 status and for structure to the output file.

Any help would be much appreciated.

File Attachment(s):
test09112019v2.schema.json (2kb) downloaded 50 time(s).

Pawel attached the following image(s):
webservice call settings from mapforce.JPG
answer REST API from postman software.JPG
answer decode mime entity function.JPG
mapforce project view.JPG
empty result from json schema attached.JPG

that
Posted: Wednesday, November 13, 2019 4:23:28 PM
Rank: Advanced Member

Joined: 6/16/2006
Posts: 486
Location: AT
This happens because the received reply is not valid against the provided schema. Some of the properties are null, however the schema doesn't allow null values.
Pawel
Posted: Friday, November 15, 2019 6:56:49 PM
Rank: Member

Joined: 10/30/2019
Posts: 15
Location: Poland
Hello that,

Thank you, for your answer. It works now thanks to you, I have added missing "type":"null" to the json schema.


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