服務呼叫政策部署錯誤

您正在查看 Apigee Edge 說明文件。
查看 Apigee X 說明文件
資訊

URLMissing

錯誤訊息

無法透過 Edge UI 或 Edge Management API 部署 API Proxy,並顯示以下錯誤訊息:

Error Saving Revision [revision_number]
URL is missing in Step [policy_name]

錯誤訊息示例

Error Saving Revision 2
URL is missing in Step ExecuteGeocodingRequest.

螢幕截圖範例

原因

如果服務呼叫政策中的 <URL> 元素遺失或留空,API Proxy 部署就會失敗。

診斷

檢查錯誤訊息中指出的服務呼叫政策中的 <URL> 元素。如果元素中未宣告任何網址,則這就是錯誤的原因。舉例來說,下列服務摘要政策含有空白的 <URL> 元素:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
    <HTTPTargetConnection>
        <URL></URL>
    </HTTPTargetConnection>
</ServiceCallout>

由於 <URL> 元素為空白,因此 API Proxy 部署失敗。

解析度

確認服務摘要政策中的 <URL> 元素包含有效網址。例如:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
    <HTTPTargetConnection>
        <URL>http://maps.googleapis.com/maps/api/geocode/json</URL>
    </HTTPTargetConnection>
</ServiceCallout>

ConnectionInfoMissing

錯誤訊息

無法透過 Edge UI 或 Edge Management API 部署 API Proxy,並顯示以下錯誤訊息:

Error Saving Revision [revision_number]
Connection information is missing in Step [policy_name]

錯誤訊息示例

Error Saving Revision 1
Connection information is missing in Step ExecuteGeocodingRequest.

螢幕截圖範例

原因

如果服務呼叫政策沒有 <HTTPTargetConnection><LocalTargetConnection> 元素,API Proxy 的部署作業就會失敗。

診斷

判斷服務呼叫政策是否已定義 <HTTPTargetConnection><LocalTargetConnection> 元素。例如:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
</ServiceCallout>

請注意,政策中未定義任何 <HTTPTargetConnection><LocalTargetConnection> 元素。

解析度

請確認服務摘要政策具有 <HTTPTargetConnection><LocalTargetConnection> 元素。例如:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
    <HTTPTargetConnection>
        <URL>http://maps.googleapis.com/maps/api/geocode/json</URL>
    </HTTPTargetConnection>
</ServiceCallout>

InvalidTimeoutValue

錯誤訊息

無法透過 Edge UI 或 Edge Management API 部署 API Proxy,並顯示以下錯誤訊息:

Error Saving Revision [revision_number]
Invalid Timeout value [0 or negative_number].

錯誤訊息示例

Error Saving Revision 1
Invalid Timeout value -1.

螢幕截圖範例

原因

如果服務呼叫政策中的 <Timeout> 元素指定了零或負值,API Proxy 的部署作業就會失敗。

診斷

檢查服務呼叫政策中的 <Timeout> 元素。如果這個值為零或負數,就是錯誤的原因。例如:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
    <Timeout>0</Timeout>
    <HTTPTargetConnection>
        <URL>http://maps.googleapis.com/maps/api/geocode/json</URL>
    </HTTPTargetConnection>
</ServiceCallout>

由於 <Timeout> 元素的值為零,因此 Proxy 無法部署。

解析度

確認 <Timeout> 元素的指定值是非零或非負數。例如:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout name="ExecuteGeocodingRequest">
    <Request variable="GeocodingRequest"/>
    <Response>GeocodingResponse</Response>
    <Timeout>10</Timeout>
    <HTTPTargetConnection>
        <URL>http://maps.googleapis.com/maps/api/geocode/json</URL>
    </HTTPTargetConnection>
</ServiceCallout>