You can translate the question and the replies:

Error Creating the Base View

I tried testing Json data source from SAP using HTTP method 'GET', but it responded below error message when creating base view Unable to obtain the data structure: com.denodo.util.exceptions.InternalErrorException: Error retrieving data from 'http://<host>:<port>/sap/opu/odata/sap/API_WORK_CENTERS/A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')?sap-client=XXX&&sap-language=EN'. HTTP error code: 401. The above URL is correct because of connection tested successfuly. Tried again, the error messages become: Unable to obtain the data structure: com.denodo.util.exceptions.InternalErrorException: No content to map due to end-of-input at [Source: (InputStreamReader); line: 1, column: 0] Expectation responsed data is kind of below data : <entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" m:etag="W/"datetimeoffset'2018-10-09T12%3A00%3A00.0000000Z'"" xml:base="http://<host>:<port>/sap/opu/odata/sap/API_WORK_CENTERS/"> <id>http://<host>:<port>/sap/opu/odata/sap/API_WORK_CENTERS/A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')</id> <title type="text">A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')</title> <updated>2021-01-26T08:35:50Z</updated> <category term="API_WORK_CENTERS.A_WorkCentersType" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')" rel="edit" title="A_WorkCentersType"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_Capacity" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_Capacity" type="application/atom+xml;type=entry" title="to_Capacity"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterAllCapacity" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterAllCapacity" type="application/atom+xml;type=feed" title="to_WorkCenterAllCapacity"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterCapacity" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterCapacity" type="application/atom+xml;type=feed" title="to_WorkCenterCapacity"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterCostCenter" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterCostCenter" type="application/atom+xml;type=feed" title="to_WorkCenterCostCenter"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterDescription" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterDescription" type="application/atom+xml;type=feed" title="to_WorkCenterDescription"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterQueuingOp" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterQueuingOp" type="application/atom+xml;type=feed" title="to_WorkCenterQueuingOp"/> <link href="A_WorkCenters(WorkCenterInternalID='10000048',WorkCenterTypeCode='A')/to_WorkCenterTodayOp" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/to_WorkCenterTodayOp" type="application/atom+xml;type=feed" title="to_WorkCenterTodayOp"/> <content type="application/xml"> <m:properties> <d:WorkCenterInternalID>10000048</d:WorkCenterInternalID> <d:WorkCenterTypeCode>A</d:WorkCenterTypeCode> <d:WorkCenter>ASSEMBLE</d:WorkCenter> <d:WorkCenterDesc>ASSEMBLE</d:WorkCenterDesc> <d:Plant>1710</d:Plant> <d:WorkCenterCategoryCode>0001</d:WorkCenterCategoryCode> <d:WorkCenterResponsible>001</d:WorkCenterResponsible> <d:WorkCenterResponsibleName>Work center supervisor</d:WorkCenterResponsibleName> <d:SupplyArea/> <d:WorkCenterUsage>009</d:WorkCenterUsage> <d:CapacityInternalID>10000066</d:CapacityInternalID> <d:WorkCenterIsToBeDeleted>false</d:WorkCenterIsToBeDeleted> <d:ValidityStartDate>2018-10-09T00:00:00</d:ValidityStartDate> <d:ValidityEndDate>9999-12-31T00:00:00</d:ValidityEndDate>
user
26-01-2021 02:03:31 -0500

1 Answer

Hi, In general, this error occurs when your request does not return any valid data. Besides, since the expected response is in XML format, you could create a [**XML datasource**](https://community.denodo.com/docs/html/browse/8.0/vdp/administration/creating_data_sources_and_base_views/xml_sources/xml_sources#xml-sources) instead of a **JSON datasource** from the mentioned URL. You could also try accessing the web service from an external REST client such as POSTMAN to make sure the web service returns accurate results. You can take a look at the [**IDU Requests**](https://community.denodo.com/docs/html/browse/latest/vdp/administration/restful_architecture/restful_web_service/idu_requests#idu-requests) section of Virtual DataPort Administration Guide and a similar community at [**Cannot create base view on JSON data source**](https://community.denodo.com/answers/question/details?questionId=90670000000fyo8AAA&title=Cannot+create+base+view+on+JSON+data+source) for more information. Additionally, if you still need help and if you are a user with valid support access then you can raise a support case in [**Denodo Support Site**](https://support.denodo.com/) so that our support team can help you. Hope this helps!
Denodo Team
27-01-2021 05:51:43 -0500
You must sign in to add an answer. If you do not have an account, you can register here