您目前查看的是 Apigee 和 Apigee Hybrid 說明文件。
查看
Apigee Edge 說明文件。
URLMissing
錯誤訊息
透過 Apigee 使用者介面或 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 的部署作業就會失敗。
診斷
檢查錯誤訊息中提及的 Service Callout 政策中的 <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
錯誤訊息
透過 Apigee 使用者介面或 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 部署作業就會失敗。
診斷
判斷是否已定義 Service Callout 政策的 <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
錯誤訊息
透過 Apigee UI 或 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>