Skip to Content
0

Data Services 4.2 - RESTful Web Service json

Oct 05, 2017 at 01:58 PM

722

avatar image

Former Member wrote an excellent blog about consuming RWS in Data Services here: https://blogs.sap.com/2016/06/07/consuming-rest-web-service-in-sap-data-services-using-web-service-rest-datastore

In short: he shows how to call Google's geocoding API with Data Services to retrieve geolocation data in an XML format. I've had no issues whatsoever replicating the demo.

Now I'm trying to do basically the same thing, with 1 change: I want to retrieve the response in a JSON format. (http://maps.googleapis.com/maps/api/geocode/json?address=1600%20Amphitheatre%20Parkway,%20Mountain%20View,%20CA&sensor=false)
I'v attached the .wadl & .xsd used to create the Web Service datastore (had to rename both files to upload them here).

Creating the datastore and importing the json function works fine. I'm also able to call the json function from a query transform without an issue. I'm having trouble unnesting the result of the function. The query isn't validating, as shown here:

I'm not sure what the problem is exactly. When adding another query transform after the "unnesting" query, I can clearly see all output columns:

Am I missing something?

unnest-output.jpg (75.3 kB)
wadl.txt (972 B)
xsd.txt (3.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pedro Soares May 10 at 04:06 PM
0

Hi, did you get any solution for your issue?

Thank you

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I'm also looking for this solution.

0