从注册表在WSO2 ESB中使用已定义的端点时出错

时间:2015-10-21 05:23:07

标签: wso2 wso2esb wso2greg

我使用WSO2 GREG创建了一个端点,然后将其从注册表添加到ESB ProxyService,但尝试此服务时给了我这个错误:

TID: [-1234] [] [2015-10-21 08:12:49,178]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: /services/TestProxyReg, MessageID: urn:uuid:a1c1994a-56b9-44e2-b567-f290a3411275, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Invalid endpoint configuration., Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="TestProxyReg"
   transports="https,http"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
   <target endpoint="gov:/trunk/endpoints/ep-myUrl.wso2.services-test-testEndpoint">
      <outSequence>
         <log level="custom">
            <property name="text" value="A test"/>
         </log>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

这里有什么问题?

修改

另外一件事:我注意到在G-Reg中创建的端点与ESB服务器中的端点不同,例如:

在G-Reg中:

<metadata xmlns="http://www.wso2.org/governance/metadata">
  <overview>
  <name>testEndpoint</name>
  <version>1.0.0</version>
  <address>https://localhost:8245/services/test</address>
  </overview>
</metadata>

在ESB中:

<?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="gov/testEndpointA">
   <address uri="localhost:9443/services/Persons_DataService/select_all_Persons_operation">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
   </address>
</endpoint>

所以我想我知道为什么会出现这样的错误 - 我应该通过ESB创建我需要的端点,而不是使用G-Reg?

1 个答案:

答案 0 :(得分:1)

使用WSO2 ESB管理控制台创建端点并将其保存在治理注册表中。您可以按照official doc.根据文档创建端点,最后一步将其保存在注册表中(单击保存在注册表中)。

然后将该端点引用到您的代理服务。