diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java index 59d9a2ac0..b9afddd39 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java @@ -506,8 +506,15 @@ public class TechnicalEntityProcessor extends TechnicalProcessor expand); expandHandler.applyExpandQueryOptions(entitySetSerialization, edmEntitySet, expand); final CountOption countOption = uriInfo.getCountOption(); + + String id; + if(edmEntitySet == null) { + // Used for functions, function imports etc. + id = request.getRawODataPath(); + } else { + id = request.getRawBaseUri() + edmEntitySet.getName(); + } - final String id = request.getRawBaseUri() + edmEntitySet.getName(); // Serialize final SerializerResult serializerResult = (isReference) ? serializeReferenceCollection(entitySetSerialization, edmEntitySet, requestedContentType, countOption) :