cancel
Showing results for 
Search instead for 
Did you mean: 

External Object not found

Former Member
0 Kudos

Hello, i'm making some tests on my SAP Jam trial instance with business records and external objects.

By java code, i firstly create an external object and, as you can see below, the response code is 201 so i may think that it was created successfully. Furthermore, Json Response returns the External Object Key so i'm pretty sure it was created.


POST https://developer.sapjam.com/api/v1/OData/ExternalObjects

HTTP response code: 201

Response body: {"d":{"results":{"__metadata":{"uri":"ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')","type":"SAPJam.ExternalObject"},"Id":"nysjeU1EQNuwXNmJ2Ld4Kj","Exid":"http://benefitsjam.hana.ondemand.com/BenefitType(ObjectID=2L,ObjectType='BUS1006')","Name":"Nuovo record","Summary":null,"Permalink":"","ODataAnnotations":"https://benefitsjam.hana.ondemand.com/com.sap.hana.cloud.samples.benefits/common/annotations.xml","ODataMetadata":"\t","ODataLink":"http://benefitsjam.hana.ondemand.com/BenefitType(ObjectID=2L,ObjectType='BUS1006')","ObjectType":"https://benefitsjam.hana.ondemand.com/com.sap.hana.cloud.samples.benefits/OData.svc/$metadata#Benefi...","Groups":{"__deferred":{"uri":"ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')/Groups"}},"FeedEntries":{"__deferred":{"uri":"ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')/FeedEntries"}},"Templates":{"__deferred":{"uri":"ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')/Templates"}},"ExternalObjectType":{"__deferred":{"uri":"ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')/ExternalObjectType"}}}}}

Business Record Key: nysjeU1EQNuwXNmJ2Ld4Kj

Then, i try to access the external object just created by using its key (it is bold in the snippets i have posted), but unexpectedly it is not found.


GET https://developer.sapjam.com/api/v1/OData/ExternalObjects('nysjeU1EQNuwXNmJ2Ld4Kj')

Authorization: OAuth oauth_consumer_key="MxDTt9kA51JBmH6TC3o2", oauth_token="q6TdDqw0v7NavlxYQjkr4hEJAsy99OBQNXwLPPPJ", oauth_signature_method="HMAC-SHA1", oauth_signature="4RyECOACHbq3fYFLEM7T2K%2B0vJU%3D", oauth_timestamp="1443799455", oauth_nonce="06f9de35-3d1e-4fa3-bf39-c6df37fad7bc", oauth_version="1.0"

HTTP response code: 404

Response body: {"error":{"code":"","message":{"lang":"en","value":"External object not found"}}}

For this test we used the following class hosted on GitHub

We are pretty sure to have properly configured SAP JAM because we are able to read business records listed from backend (please have a look at the image below)

Any suggestions on this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok, i found myself the solution and i think that the code on GitHub must be updated.

The payload of the request to create (POST) and external object must be like this:

     payload.append("<entry>");

     payload.append("<content>");

     payload.append("<properties>");

     payload.append("<Name>"+ name +"</Name>");

     payload.append("<ODataLink>https://benefitsjam.hana.ondemand.com:443/com.sap.hana.cloud.samples.benefits/OData.svc/BenefitTypes...)</ODataLink>");

     payload.append("<ObjectType>https://benefitsjam.hana.ondemand.com/com.sap.hana.cloud.samples.benefits/OData.svc/$metadata#Benefi...</ObjectType>");

     payload.append("</properties></content>");

     payload.append("</entry>");


Answers (0)