คุณกำลังดูเอกสารประกอบ Apigee Edge
ไปที่
เอกสารประกอบเกี่ยวกับ Apigee X. ข้อมูล
XSLEmptyResourceUrl
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API ล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดนี้:
Error Saving Revision revision_number Error occurred while validation of bean policy_name.xml. Reason:- Non null value expected for element ResourceURL in XSL
ตัวอย่างข้อความแสดงข้อผิดพลาด
ในข้อความแสดงข้อผิดพลาดตัวอย่างต่อไปนี้ ชื่อของนโยบายการแปลง XSL ที่ทำให้เกิด
ข้อผิดพลาดคือ xslt
Error Saving Revision 1
Error occurred while validation of bean xslt.xml. Reason: - Non null value
expected for element ResourceURL in XSL
ตัวอย่างภาพหน้าจอ
ใน Edge UI คุณจะเห็นข้อผิดพลาดของป๊อปอัปในลักษณะต่อไปนี้
สาเหตุ
ถ้าองค์ประกอบ <ResourceURL>
ในนโยบายการแปลง XSL ว่างเปล่า ค่า
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว
การวินิจฉัย
ตรวจสอบองค์ประกอบ <ResourceURL>
ในนโยบายการเปลี่ยนรูปแบบ XSL ที่ระบุในข้อผิดพลาด
หากไม่มีการระบุ URL ของทรัพยากรในองค์ประกอบ <ResourceURL>
นั่นคือสาเหตุของข้อผิดพลาด ตัวอย่างเช่น การแปลง XSL ต่อไปนี้
นโยบายมีองค์ประกอบ <ResourceURL>
ที่ว่างเปล่า:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xslt">
<DisplayName>xslt</DisplayName>
<Properties/>
<ResourceURL></ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
<OutputVariable/>
</XSL>
เนื่องจากองค์ประกอบ <ResourceURL>
ว่างเปล่า การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลว
ความละเอียด
ตรวจสอบว่าองค์ประกอบ <ResourceURL>
ในนโยบายการเปลี่ยนรูปแบบ XSL มี
URL ที่ชี้ไปยังไฟล์ XSLT
เช่น
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xslt">
<DisplayName>xslt</DisplayName>
<Properties/>
<ResourceURL>xsl://my_transform.xsl</ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
<OutputVariable/>
</XSL>
XSLInvalidResourceType
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API ล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดนี้:
Error Deploying Revision revision_number to env_name XSL policy_name: Resource type must be xsl. Context Revision:revision_number; APIProxy:api_proxy_name;Organization:org_name;Environment:env_name.
ตัวอย่างข้อความแสดงข้อผิดพลาด
ในข้อความแสดงข้อผิดพลาดตัวอย่างต่อไปนี้ ชื่อของนโยบายการแปลง XSL
ทำให้เกิดข้อผิดพลาด xslt
:
Error Deploying Revision 1 to test
XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform;
Organization:jdoe-test;Environment:test.
ตัวอย่างภาพหน้าจอ
ใน Edge UI คุณจะเห็นข้อผิดพลาดของป๊อปอัปในลักษณะต่อไปนี้
สาเหตุ
หากประเภททรัพยากรที่ระบุในองค์ประกอบ <ResourceURL>
ของการแปลง XSL
นโยบายไม่ใช่ประเภท xsl
การทำให้พร็อกซี API ใช้งานได้ล้มเหลว
รูปแบบที่ถูกต้องในการระบุข้อมูลนี้มีดังนี้
<ResourceURL>xsl://<file_name>.xsl</ResourceURL>
เช่น หากระบุประเภททรัพยากรเป็น jsc
ใน <ResourceURL>
ของนโยบายการแปลง XSL ดังที่แสดงด้านล่าง จากนั้นจะทำให้ใช้งานได้ของ
พร็อกซี API ไม่ทำงาน:
<ResourceURL>jsc://my_transform.xsl</ResourceURL>
การวินิจฉัย
ระบุชื่อนโยบายการเปลี่ยนรูปแบบ XSL ที่เกิดข้อผิดพลาด คุณดูข้อมูลนี้ได้จากข้อความแสดงข้อผิดพลาด ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
xslt
XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform; Organization:jdoe-test;Environment:test.
ใน XML ของนโยบายการแปลง XSL ที่ล้มเหลว ให้ตรวจสอบว่าประเภทของทรัพยากรที่ระบุในองค์ประกอบ
<ResourceURL>
ไม่ใช่ประเภทxsl
หากไม่ใช่ประเภทxsl
แสดงว่านี่คือสาเหตุของข้อผิดพลาดตัวอย่างเช่น นโยบายต่อไปนี้ระบุประเภทที่ไม่ใช่
xsl
ในองค์ประกอบ<ResourceURL>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <XSL async="false" continueOnError="false" enabled="true" name="xslt"> <DisplayName>xslt</DisplayName> <Properties/> <ResourceURL>jsc://my_transform.xsl</ResourceURL> <Parameters ignoreUnresolvedVariables="true"/> <OutputVariable/> </XSL>
เนื่องจาก URL ของทรัพยากรระบุเป็น
jsc://my_transform.xsl
ซึ่งไม่ใช่ประเภทxsl
การทำให้พร็อกซี API ใช้งานได้จึงล้มเหลวโดยมีข้อผิดพลาด:XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform; Organization:jdoe-test;Environment:test.
ความละเอียด
ตรวจสอบว่าประเภททรัพยากรที่ระบุในองค์ประกอบ <ResourceURL>
ของ XSL
นโยบายการเปลี่ยนรูปแบบเป็นประเภท xsl
เสมอ เช่น
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xslt">
<DisplayName>xslt</DisplayName>
<Properties/>
<ResourceURL>xsl://my_transform.xsl</ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
<OutputVariable/>
</XSL>