基于gateway实现odata(7)–Media Resources

Media Resources,这里在那文档中说的好像主要是说图片的显示问题,就是在数据存了图片地址,然后转换为ODATA中显示出对应的URL图片地址来,

比如文档中的人员图片地址,应该还会有其它一些文件,比如文档什么的应该也算是这里的资源文件了,
由于暂时不太想测试这部份了,先放一放,以后需要再来找

ODATA学习(SAP Press – OData and SAP NetWeaver Gateway)第6.5.7章节,第303页
Media resources are used to expose different binary data, such as graphics
and videos, to consumers. A media resource is accessed via a media
link entry.
To let a regular entity type become a media link entity type, you have to Flag as media
flag it as media via the Service Builder using the M checkbox on the
entity type level. The same attribute can also be set manually via coding
in the MPC extension class by using the set_ i s_med i a ( ) method on the
entity type level. As a result, the HasStream attribute in the metadata
document of the entity type is set to true

如/sap/opu!odata/sap/ZEXAMPLE1 _SRV/ProductCollection(‘HT-1 000 ‘)/$value的方法,应该是要重定义/iwbep/if_mgw_appl_s rv_runtime-get_stream 的方法 .

留下一个回复

你的email不会被公开。

2 × 3 =