您正在查看 Apigee 和 Apigee Hybrid 說明文件。
查看
Apigee Edge 說明文件。
URLMissing
錯誤訊息
透過 Apigee UI 或 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
錯誤訊息
透過 Apigee UI 或 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
錯誤訊息
透過 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>