1
我已經實現了一些休息web服務與NetBeans IDE,但在測試後要求時,我得到一些例外情況如下所示:POST請求錯誤解析媒體類型「應用程序/ XML」與NetBeans
POST RequestFailed RequestFailed --> Status: (500)
Response: { ......
javax.ws.rs.WebApplicationException: java.lang.IllegalArgumentException: Error parsing media type ', application/xml'
Content may not have Container-Containee Relationship.
和代碼關聯後的方法是
@POST
@Override
@Consumes({"application/xml", "application/json"})
public void create(Mobilereading entity) {
super.create(entity);
}
通常一切似乎都是正確的,但我不知道問題出在哪裏?任何解決方案PLZ *