如何在wso2 ESB中创建默认端点

时间:2014-10-28 05:30:56

标签: wso2 wso2esb wso2dss

我的WSO2 DSS中有不同的服务和各自的端点,如

http://localhost:9764/services/Get_details/ 

http://localhost:9764/services/muser_DataService/ 

所以,当我在WSO2 ESB中创建代理服务时,我希望在我的代理中提供默认端点,而不是在DSS中提供特定端点

对于这种方法,我使用了如下所示的收件人列表组

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="Endpoint">

  <endpoint name="null_value">
     <address uri="http://localhost:9764/services/null_value/">
        <suspendOnFailure>
           <progressionFactor>1.0</progressionFactor>
        </suspendOnFailure>
        <markForSuspension>
           <retriesBeforeSuspension>0</retriesBeforeSuspension>
           <retryDelay>0</retryDelay>
        </markForSuspension>
     </address>
  </endpoint>
  <endpoint name="Get_details">
     <address uri="http://localhost:9764/services/Get_details/">
        <suspendOnFailure>
           <progressionFactor>1.0</progressionFactor>
        </suspendOnFailure>
        <markForSuspension>
           <retriesBeforeSuspension>0</retriesBeforeSuspension>
           <retryDelay>0</retryDelay>
        </markForSuspension>
     </address>
  </endpoint>
  <endpoint name="Get_geodetails">
     <address uri="http://localhost:9764/services/Get_geodetails/">
        <suspendOnFailure>
           <progressionFactor>1.0</progressionFactor>
        </suspendOnFailure>
        <markForSuspension>
           <retriesBeforeSuspension>0</retriesBeforeSuspension>
           <retryDelay>0</retryDelay>
        </markForSuspension>
     </address>
  </endpoint>
  <endpoint name="muser_DataService">
     <address uri="http://localhost:9764/services/muser_DataService/">
        <suspendOnFailure>
           <progressionFactor>1.0</progressionFactor>
        </suspendOnFailure>
        <markForSuspension>
           <retriesBeforeSuspension>0</retriesBeforeSuspension>
           <retryDelay>0</retryDelay>
        </markForSuspension>
     </address>
  </endpoint>

但是当我在我的代理中使用此端点时,进程无法在创建的收件人列表组中找到所需的端点并抛出错误,如下所示

"Fault":{"faultcode":"axis2ns2:Client","faultstring":"The endpoint reference (EPR) for the Operation not found is \/services\/Get_details\/ and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.","detail":""}

成功执行可以做些什么......

1 个答案:

答案 0 :(得分:0)

收件人端点用于不同目的。如果后端服务URL不同,则应具有不同的端点定义。然后在代理中使用适当的端点。