WSO2 ESB 中的自动部署 API 错误
Autodeploy API error in WSO2 ESB
我正在尝试在 WSO2 ESB 中自动部署 API。我把 .xml 文件和 de API 及其资源定义放在 {ESB_HOME}/repository/deployment/server/synapse-configs/default/api/ 中,ESB 的 API 工厂部署它。
但是我得到这个错误:
[2015-04-29 11:19:18,013] ERROR - APIFactory An API must contain at least one resource definition [2015-04-29 11:19:18,017] ERROR - APIDeployer API deployment from the file : /home/sergio/Escritorio/wso2esb-4.8.1/repository/deployment/server/synapse-configs/default/api/prueba.xml : Failed. org.apache.synapse.SynapseException: An API must contain at least one resource definition
xml定义是:
<?xml version="1.0" encoding="UTF-8"?><api name="apps" context="/services/services/app"><resource methods="GET" uri-template="/get/{codigoApp}"><inSequence><send><endpoint><http method="get" uri-template="http://localhost:8080/services/services/app"/></endpoint></send></inSequence></resource><resource methods="GET" uri-emplate="/getAll"><inSequence><send><endpoint><http method="get" uri-template="http://localhost:8080/"/></endpoint></send></inSequence> </resource></api>
我可以在 WSO2 ESB 的管理面板中部署这个 api 定义。
有什么想法吗?
谢谢,
塞尔吉奥.
使用 apps.xml 创建文件并将该文件放入 ESB_HOME/repository/deployment/server/synapse-configs/default/api
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse"
name="apps"
context="/services/services/app">
<resource methods="GET" uri-template="/get/{codigoApp}">
<inSequence>
<send>
<endpoint>
<http method="get" uri-template="http://localhost:8080/services/services/app"/>
</endpoint>
</send>
</inSequence>
</resource>
<resource methods="GET">
<inSequence>
<send>
<endpoint>
<http method="get" uri-template="http://localhost:8080/"/>
</endpoint>
</send>
</inSequence>
</resource>
</api>
我正在尝试在 WSO2 ESB 中自动部署 API。我把 .xml 文件和 de API 及其资源定义放在 {ESB_HOME}/repository/deployment/server/synapse-configs/default/api/ 中,ESB 的 API 工厂部署它。
但是我得到这个错误:
[2015-04-29 11:19:18,013] ERROR - APIFactory An API must contain at least one resource definition [2015-04-29 11:19:18,017] ERROR - APIDeployer API deployment from the file : /home/sergio/Escritorio/wso2esb-4.8.1/repository/deployment/server/synapse-configs/default/api/prueba.xml : Failed. org.apache.synapse.SynapseException: An API must contain at least one resource definition
xml定义是:
<?xml version="1.0" encoding="UTF-8"?><api name="apps" context="/services/services/app"><resource methods="GET" uri-template="/get/{codigoApp}"><inSequence><send><endpoint><http method="get" uri-template="http://localhost:8080/services/services/app"/></endpoint></send></inSequence></resource><resource methods="GET" uri-emplate="/getAll"><inSequence><send><endpoint><http method="get" uri-template="http://localhost:8080/"/></endpoint></send></inSequence> </resource></api>
我可以在 WSO2 ESB 的管理面板中部署这个 api 定义。
有什么想法吗?
谢谢, 塞尔吉奥.
使用 apps.xml 创建文件并将该文件放入 ESB_HOME/repository/deployment/server/synapse-configs/default/api
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse"
name="apps"
context="/services/services/app">
<resource methods="GET" uri-template="/get/{codigoApp}">
<inSequence>
<send>
<endpoint>
<http method="get" uri-template="http://localhost:8080/services/services/app"/>
</endpoint>
</send>
</inSequence>
</resource>
<resource methods="GET">
<inSequence>
<send>
<endpoint>
<http method="get" uri-template="http://localhost:8080/"/>
</endpoint>
</send>
</inSequence>
</resource>
</api>