2016年6月24日金曜日

Resteasyメモ

org.jboss.resteasy.pl
ugins.providers.jaxb.JAXBUnmarshalException: Could not find JAXBContextFinder for media type: application/x-www-form-urlencoded;charset="UTF-8"

content-typeが受け付けてもらえてない様子。
jqueryでcontent-typeを下記のように設定する。

$.ajax({
  type: 'POST',
  url: 'http://localhost/post',
  data: '<hoge>aa</hoge>',
  dataType: "xml",
  contentType : "application/xml",
  success: function(value){
    alert("ok");
  },
  error:function(value){
    alert("fail");
  }

});