WSO2 ESB API资源中的内部服务器错误

时间:2015-05-05 09:48:47

标签: api rest wso2 wso2esb

我试图通过WSO2 ESB中的api资源在tomcat中调用Web服务。

资源是:

<resource methods="DELETE" url-mapping="/weight/delete">
<inSequence>
  <log level="custom">
    <property name="Access token value" expression="$trp:Authorization"/>
  </log>
  <oauthService remoteServiceUrl="https://host:port/services/" username="username" password="password"></oauthService>
  <header name="Authorization" scope="transport" action="remove"></header>
  <send>
    <endpoint>
      <address uri="http://host:8080/web-services/services/proyect1"></address>
    </endpoint>
  </send>
</inSequence>

它没有查询参数和路径参数。

但是我有500个内部服务器错误,并且tomcat抛出此异常:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input

请求是:

一切正确,直接向tomcat发送请求。

1 个答案:

答案 0 :(得分:0)

根据REST,HTTP中的delete方法不得内容有效负载。然后,http://host:8282/web-services/services/proyect1/weight/delete它不正确。

但是,要解决此问题,我可以使用WSO2中的PayLoadFactory介体将JSON发送到端点。

相关问题