You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2015/04/07 14:00:14 UTC

[jira] [Commented] (OLINGO-621) How to override type and src in for Entity

    [ https://issues.apache.org/jira/browse/OLINGO-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14483069#comment-14483069 ] 

Christian Amend commented on OLINGO-621:
----------------------------------------

Hi Alex,

you can do that by adding the content type string you want to have written into the data map. The key for this must then be registered at your entity type mapping so we can call entityTypeMapping.getMediaResourceMimeTypeKey();

So if your key is "~mimetype" and your type is "application/zip" you would put that into your map data e.g. data.put("~mimetype",  "application/zip");

If you still have issues please reopen again.

Best Regards,
Christian

> How to override type and src in <content> for Entity
> ----------------------------------------------------
>
>                 Key: OLINGO-621
>                 URL: https://issues.apache.org/jira/browse/OLINGO-621
>             Project: Olingo
>          Issue Type: Question
>          Components: odata2-core
>    Affects Versions: V2 2.0.3
>            Reporter: Alex
>            Assignee: Christian Amend
>
> We have to override the default content-type (which is octet-stream) to "application/zip" and reference src to another URL
> http://localhost/api/bundle(1)
> <entry xml:base="http://localhost/bundle">
>    <id>.....
> <content type="application/octet-stream" src="Bundles(1)/$value"/>
> <m:properties>
> <d:Version>1.0.0.0</d:Version>
> ...
> <m:properties>
> how to get access to <content> node and set it to something like this
> <content type="application/zip" src="http://storage/bundles/1"/>
> Thanks in advance



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)