פתרון בעיות שקשורות לפריסת מדיניות של XSL Transform

אתם צופים במסמכי התיעוד של Apigee ושל Apigee Hybrid.
לעיון במסמכי התיעוד של Apigee Edge.

XSLEmptyResourceUrl

הודעת השגיאה

פריסת ה-proxy ל-API דרך ממשק המשתמש או ה-API של Apigee נכשלת ומוצגת הודעת השגיאה הבאה:

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 Transform שגורמת לשגיאה הוא xslt:

Error Saving Revision 1
Error occurred while validation of bean xslt.xml. Reason: - Non null value
expected for element ResourceURL in XSL

דוגמה לצילום מסך

בממשק המשתמש של Apigee תופיע שגיאה שדומה לזו:

נדרש ערך שאינו null לרכיב ResourceURL ב-XSL.

מטרה

אם הרכיב <ResourceURL> במדיניות XSL Transform ריק, פריסת ה-proxy ל-API נכשלת.

אבחון

בודקים את הרכיב <ResourceURL> במדיניות XSL Transform ששמה מופיע בהודעת השגיאה. אם לא צוינה כתובת URL של משאב ברכיב <ResourceURL>, זו הסיבה לשגיאה. לדוגמה, למדיניות XSL Transform הבאה יש רכיב <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>

הפריסה של ה-proxy ל-API נכשלת כי רכיב ה-<ResourceURL> ריק.

רזולוציה

מוודאים שלרכיב <ResourceURL> במדיניות XSL Transform יש כתובת 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

הודעת השגיאה

פריסת ה-proxy ל-API דרך ממשק המשתמש או ה-API של Apigee נכשלת ומוצגת הודעת השגיאה הבאה:

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 Transform שגורמת לשגיאה הוא xslt:

Error Deploying Revision 1 to test
XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform;
Organization:jdoe-test;Environment:test.

דוגמה לצילום מסך

בממשק המשתמש של Apigee תופיע שגיאה שדומה לזו:

סוג המשאב חייב להיות xsl.

מטרה

אם סוג המשאב שצוין ברכיב <ResourceURL> של מדיניות XSL Transform הוא לא מסוג xsl, הפריסה של proxy ל-API תיכשל.

הפורמט הנכון לציון הערך הזה הוא כמו שמוצג בהמשך:

<ResourceURL>xsl://<file_name>.xsl</ResourceURL>

לדוגמה, אם סוג המשאב מוגדר כ-jsc ברכיב <ResourceURL> של מדיניות XSL Transform, כמו שמוצג בהמשך, הפריסה של proxy ל-API תיכשל:

<ResourceURL>jsc://my_transform.xsl</ResourceURL>

אבחון

  1. מזהים את השם של מדיניות XSL Transform שבה התרחשה השגיאה. המידע הזה מופיע בהודעת השגיאה. לדוגמה, בשגיאה הבאה, שם המדיניות הוא xslt.

    XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform;
    Organization:jdoe-test;Environment:test.
    
  2. בקובץ ה-XML של מדיניות XSL Transform שנכשל, מוודאים שהסוג של המשאב שצוין ברכיב <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 Proxy נכשלת עם השגיאה:

    XSL xslt: Resource type must be xsl. Context Revision:1;APIProxy:XSLTransform;
    Organization:jdoe-test;Environment:test.
    

רזולוציה

מוודאים שסוג המשאב שצוין ברכיב <ResourceURL> של מדיניות XSL Transform הוא תמיד מסוג 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>