Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

Are the default ATTP oData $metadata entities intended to be usable?

$
0
0

Apologies if this belongs in another group, but I dont see Advanced Track and Trace for Pharma available and the problem is illustrated via the Gateway Service Builder (SEGW).

 

 

The /STTP/ATTP_COCKPIT service that comes with the ATTP package exposes access to data via oData. The problem is that the ComplexType HierObjData is being exposed directly and is marked with the attribute [Abstract=True] , which causes failures in common oData tools.


An abstract class by definition cannot have an instance of itself created, it can only have derived classes create instances. In this case specifically the service's "out of the box" (OOB) definition exposes it  as a property of the HierItem and HierParent, and that denotes it needs to have an instance created.

 

There is very little documentation available for the ATTP module in general, so I am not sure if this is intended to be modified for each implementation (and HierObjData is serving as the interface or contract between systems), or if this is really just broken.

 

Can someone review this and let me know what could be wrong here?

 

 

Errors

 

From linqpad

error from linqpad.png

 

From Visual Studio 2015

error from vs 2015 via CSDL import.png

 

 

Depiction of OOB entities

 

definitions for Entity Type "HierItem"

def for HierItem.png

 

def for complex type "HierObjData"

def for objresult.png

 

 

Example in xml fragment from the $metadata endpoint (http://server:8000/sap/opu/odata/STTP/ATT_COCKPIT_SRV/$metadata)

 

<EntityType sap:content-version="1" Name="HierItem">

  <Key>

  <PropertyRef Name="Nr"/>

  </Key>

  <Property Name="ObjData" Nullable="false" Type="ATT_COCKPIT_SRV.HierObjData"/>

  <Property Name="Nr" Nullable="false" Type="Edm.Int32" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:label="Number"/>

</EntityType>

<ComplexType Name="HierObjData" Abstract="true">

     <Property Name="Objid" Nullable="false" Type="Edm.String" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false"      sap:label="Object ID" MaxLength="32"/>

     <Property Name="Gs1EsB" Nullable="false" Type="Edm.String" sap:filterable="false" sap:sortable="false" sap:updatable="false"      sap:creatable="false" sap:label="GS1 Elem String" MaxLength="128"/>

     <Property Name="Objtype" Nullable="false" Type="Edm.Byte" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false"      sap:label="Object Type"/>

.... more properties

 

What it probably ought to look like

 

<EntityType sap:content-version="1" Name="HierItem" BaseType="HeirObjData">

  <Property Name="Nr" Nullable="false" Type="Edm.Int32" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:label="Number"/>

</EntityType>


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>