Khắc phục sự cố khi triển khai chính sách Chú thích dịch vụ

Bạn đang xem tài liệu về Apigee Edge.
Truy cập vào tài liệu Apigee X.
thông tin

URLMissing

Thông báo lỗi

Việc triển khai proxy API thông qua giao diện người dùng Edge hoặc API quản lý Edge không thành công và xuất hiện thông báo lỗi sau:

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

Ví dụ về thông báo lỗi

Error Saving Revision 2
URL is missing in Step ExecuteGeocodingRequest.

Ảnh chụp màn hình ví dụ

Nguyên nhân

Nếu phần tử <URL> trong chính sách Chú thích dịch vụ bị thiếu hoặc bị bỏ trống, thì việc triển khai proxy API sẽ không thành công.

Chẩn đoán

Kiểm tra phần tử <URL> trong chính sách Chú thích về dịch vụ có tên trong thông báo lỗi. Nếu không có URL nào được khai báo trong phần tử, thì đó là nguyên nhân gây ra lỗi. Ví dụ: Chính sách về chú thích dịch vụ sau đây có một phần tử <URL> trống:

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

Vì phần tử <URL> trống nên việc triển khai proxy API không thành công.

Độ phân giải

Đảm bảo rằng phần tử <URL> trong chính sách Chú thích về dịch vụ có một URL hợp lệ. Ví dụ:

<?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

Thông báo lỗi

Việc triển khai proxy API thông qua giao diện người dùng Edge hoặc API quản lý Edge không thành công và xuất hiện thông báo lỗi sau:

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

Ví dụ về thông báo lỗi

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

Ảnh chụp màn hình ví dụ

Nguyên nhân

Nếu Chính sách chú thích dịch vụ không có phần tử <HTTPTargetConnection> hoặc <LocalTargetConnection>, thì việc triển khai proxy API sẽ không thành công.

Chẩn đoán

Xác định xem chính sách Chú thích về dịch vụ có phần tử <HTTPTargetConnection> hay <LocalTargetConnection> được xác định hay không. Ví dụ:

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

Xin lưu ý rằng không có phần tử <HTTPTargetConnection> hoặc <LocalTargetConnection> nào được xác định trong chính sách.

Độ phân giải

Đảm bảo rằng chính sách Chú thích dịch vụ có phần tử <HTTPTargetConnection> hoặc <LocalTargetConnection>. Ví dụ:

<?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

Thông báo lỗi

Việc triển khai proxy API thông qua giao diện người dùng Edge hoặc API quản lý Edge không thành công và xuất hiện thông báo lỗi sau:

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

Ví dụ về thông báo lỗi

Error Saving Revision 1
Invalid Timeout value -1.

Ảnh chụp màn hình ví dụ

Nguyên nhân

Nếu phần tử <Timeout> trong chính sách Chú thích dịch vụ có giá trị bằng 0 hoặc âm được chỉ định, thì việc triển khai proxy API sẽ không thành công.

Chẩn đoán

Kiểm tra phần tử <Timeout> trong chính sách Chú thích về dịch vụ. Nếu giá trị là 0 hoặc một số âm, thì đó là nguyên nhân gây ra lỗi. Ví dụ:

<?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>

Vì phần tử <Timeout> có giá trị bằng 0, nên proxy không triển khai được.

Độ phân giải

Đảm bảo rằng giá trị được chỉ định cho phần tử <Timeout> là một số khác 0 hoặc không âm. Ví dụ:

<?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>