1
我已经暴露在WSO2 ESB使用<api>
REST服务。但答复并未到来。 REST服务是用Apache Wink编写的。WSO2 ESB - REST API - 响应不来
API
<api name="API_2" context="/hello" hostname="localhost" port="8080">
<resource url-mapping="/name" methods="GET">
<inSequence>
<log level="full"/>
<property name="messageType" value="text/plain" scope="transport" type="STRING"/>
<send>
<endpoint>
<address uri="http://localhost:8080/HelloService/rest/test/hello"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</resource>
</api>
ESB日志
[2013-12-11 12:28:24,643] INFO - API Initializing API: API_2
[2013-12-11 12:28:35,467] INFO - LogMediator To: /hello/name, MessageID: urn:uuid:52d2ddf1-301e-42e0-ac9d-ac4a57ac8c72, Direction: request
的 “http://本地主机:8080/HelloService的/ REST /测试/你好” 是实际的RESTful Web服务实现。当请求发送到“http:// localhost:8280/hello/name”时,它是否充当代理并将请求转发给实际实现? – user3049576
好,你的情况proxy会转发到您的地址请求(HTTP://本地主机:8080/HelloService的/ REST /测试/你好/),这是http://本地主机:8080/HelloService的/ REST /测试/你好/ name,因此请查看您是否在浏览器中获得此URL的响应。 –
jayalalk
此外,如果上述后端网址运作正常,请从API定义中删除主机名和端口,这是这里的问题。使用像我的示例,让我知道你的问题是否由此解决。它的工作原理是 –
jayalalk