cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Data Services Calling REST Web Services without parameters always returns one record

Hi

I am facing an issue with calling REST Web services having a JSON output format without a parameters.

The web service is created to return location information for all locations of the organization but I end up getting only one location. I am passing a ''(NULL string) to the web service call to return all the results.However I get only one record. I tried modifying the WADL in many different ways but without any luck.

Any help in this area is much appreciated.

More information

I have used the following blog to create the DS Job.

https://blogs.sap.com/2016/06/07/consuming-rest-web-service-in-sap-data-services-using-web-service-r...

wadl is shown below

ALso the rest call with the response is shown below

Let me know if you guys have faced similar issue.

Thanks,

Prem

former_member965650
Discoverer
0 Kudos

Anyone had any luck with this? Please help share the info. We are stuck on this. We cannot even use the salesforce Adapter as SAP does not support latest version.

mynynachau
Community Advocate
Community Advocate
0 Kudos

Hi there,

You have a question and need help by the community? You might want to consider posting your own question. Here is how to get started:

  1. Learn about asking and answering questions in SAP Community with this tutorial: https://developers.sap.com/tutorials/community-qa.html
  2. Ask your detailed question here: https://answers.sap.com/questions/ask.html
  3. Wait for a response.

That's it. Thank you!

Best regards

Your SAP Community moderator

Accepted Solutions (0)

Answers (6)

Answers (6)

Change to <xs:sequence minOccurs="0" maxOccurs="unbounded"> maybe works?

horoshko_ruslan
Explorer
0 Kudos

I have the same problem. I open the indecent few day ago. SAP support confirm this problem and redirect incident to the development team.

I am awaiting a decision.

After I have got decision from support I write It here.

P.S. You can use User_Defined element from BODS and python package (json, urllib3) for tasks related with API

0 Kudos

Thank you Ruslan. We have submitted a ticket to SAP support too and waiting on them.

horoshko_ruslan
Explorer
0 Kudos

It was a my problem

The element "sequence" under "root" in the WADL file should be "repeatable". Adding maxOccurs="unbounded" to the "sequence" resolved the problem.

0 Kudos

Thank you, SAP responded with same answer few minutes ago. And it works now. I am unsure of how to keep in touch with you Ruslan, i will follow you for now.

0 Kudos

I have reported an issue with SAP today. Awaiting feedback from them.

former_member686845
Discoverer

Hey Merwyn,

Was your job able to return multiple rows instead single row.

0 Kudos

Any update on this issue? I have the same issue, see the records on log but output is single last record.

former_member466847
Active Participant
0 Kudos

Dirk, Merwyn, as this behavior has been seen a few times with limited success of resolution. Please consider logging a Product Enhancement request so the support can be added in later releases.

See attached kba 1515837 - How To: Enhancement Request Process using the Customer Influence and Adopt site
Thank you

Jessica

former_member466847
Active Participant
0 Kudos

Thank you for utilizing the SoapUI and testing the response.
Normally if the same response is not returned in Designer and the job doesnt fail it means that the response xsd generated for the json call is not configured for the multi level response.
To workaround this the schema generated in Soapui would be used instead.

Again as this can take a some time to work through i suggest you make a ticket and a support engineer will assist you it confirming the xsd response file.

former_member187605
Active Contributor

If anybody has a real solution for this type of issue, please post it here.

I have reported exactly the same problem to SAP Support, more than 4 months ago, still not solved :-(.

former_member466847
Active Participant
0 Kudos

Hello,
have you confirm the results in SoapUI with the same WADL, are there multiple records returned?
Only kba i have found that had similar behavior is generating a Webservice with a social media url and unformatted JSON response

2442791 - SAP Data Services returns only last record from Twitter feed - SAP Data Services 14.2

I would suggest that due to the complexity of webservices that you create an incidnet and attach the following:
- WADL
- Authentication if the webservice requires it.
- Enable the Rest Debug trace options and execution the job with Execution Trace : Trace Transform = Yes.
Please see KBA 2334506 - How to enable tracing for Web service REST data store function call from a Data Services job
- Output from SoapUI
former_member605272
Discoverer
0 Kudos

Hi Jessica,

Thanks for your response.

The Soap UI returns multiple records as shown below

Also after enabling the trace I was able to get the records in the trace log. However for some reason these dont flow into the structure defined in the query transform of the dataflow.

Thanks in Advance.

Prem