SAP Service返回415 Unsupported Media Type

时间:2013-08-29 18:57:06

标签: odata sap

我尝试通过他们提供的Odata服务向SAP发布一个新项目,但是当我通过Firefox中的RESTClient加载项尝试它时出现以下错误:

Status Code: 415 Unsupported Media Type
Content-Length: 291
Content-Type: application/xml
Server: SAP NetWeaver Application Server / ABAP 731
dataserviceversion: 1.0

这是我用来发布数据的xml:

<?xml version="1.0" encoding="utf-8"?>
<entry>
<content type="application/xml">
<m:properties>
<d:zz_region>E</d:zz_region>
<d:pf_changed_by>FDK538</d:pf_changed_by>
<d:pf_hier_explanation/>
<d:fiw_uname/>
<d:pf_period_type>00</d:pf_period_type>
<d:zzhouse_num/>
<d:fcw_g/>
</m:properties>
</content>
</entry>

知道可能导致此错误的原因是什么?

1 个答案:

答案 0 :(得分:0)

尝试将标头Content-Type: text/xml添加到您的请求中。

相关问题