אתם צופים במסמכי התיעוד של Apigee ושל Apigee Hybrid.
לעיון במסמכי התיעוד של
Apigee Edge.
EitherOptionOrFormat
הודעת השגיאה
פריסת ה-proxy ל-API דרך ממשק המשתמש או ה-API של Apigee נכשלת ומוצגת הודעת השגיאה הבאה:
Error Saving Revision [revision_number] XMLToJSON[{0}]: Either Options or Format must be specified.
דוגמה לשגיאה
Error Saving Revision 1
XMLToJSON[{0}]: Either Options or Format must be specified.
דוגמה לצילום מסך

מטרה
אם אחד מהרכיבים <Options> או <Format> לא מוצהר במדיניות XML ל-JSON, ה-Deployment (פריסה) של proxy ל-API נכשל.
המאפיין <Options> הוא חובה אם לא משתמשים במאפיין <Format>.
אפשר להשתמש ברכיב <Format> או בקבוצת הרכיבים <Options>. אי אפשר להשתמש גם ב-<Format> וגם ב-<Options>. פורמטים מוגדרים מראש כוללים: xml.com, yahoo, google ו-badgerFish.
אבחון
בודקים את כל כללי המדיניות של XML ל-JSON ב-proxy ל-API הספציפי שבו התרחשה השגיאה. אם יש מדיניות XML ל-JSON שבה לא מוצהר על אחד מהרכיבים
<Options>או<Format>, זו הסיבה לשגיאה.לדוגמה, במדיניות הבאה לא מוצהר על אף אחד מהאלמנטים:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <XMLToJSON async="false" continueOnError="false" enabled="true" name="XMLToJSON"> <DisplayName>XMLToJSON</DisplayName> <Properties/> <OutputVariable>response</OutputVariable> <Source>response</Source> </XMLToJSON>
רזולוציה
מוודאים שקובץ ה-XML של מדיניות XML ל-JSON מכיל את אחד הרכיבים <Options> או <Format> שמוצהרים במדיניות.
דוגמה 1:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLToJSON async="false" continueOnError="false" enabled="true" name="XMLToJSON">
<DisplayName>XMLToJSON</DisplayName>
<Properties/>
<Format>google</Format>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
</XMLToJSON>
דוגמה 2:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLToJSON async="false" continueOnError="false" enabled="true" name="XMLToJSON">
<DisplayName>XMLToJSON</DisplayName>
<Properties/>
<Options>
<RecognizeNumber>true</RecognizeNumber>
<RecognizeBoolean>true</RecognizeBoolean>
<RecognizeNull>true</RecognizeNull>
</Options>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
</XMLToJSON>
UnknownFormat
הודעת השגיאה
פריסת ה-proxy ל-API דרך ממשק המשתמש או ה-API של Apigee נכשלת ומוצגת הודעת השגיאה הבאה:
Error Saving Revision [revision_number] XMLToJSON[policy_name]: Unknown Format [unknown_format].
דוגמה לשגיאה
Error Saving Revision 1
XMLToJSON[WithFormat]: Unknown Format google.com.
דוגמה לצילום מסך

מטרה
אם מוגדר פורמט לא ידוע לרכיב <Format> במדיניות XML ל-JSON, ה-Deployment (פריסה) של proxy ל-API ייכשל.
פורמטים מוגדרים מראש כוללים: xml.com, yahoo, google ו-badgerFish.
אבחון
מזהים את המדיניות של XML ל-JSON שבה אירעה השגיאה ואת הפורמט הלא ידוע. המידע הזה מופיע בהודעת השגיאה. לדוגמה, בשגיאה הבאה, שם המדיניות הוא
WithFormatוהפורמט הלא ידוע הואgoogle.com:Error Saving Revision 1 XMLToJSON[WithFormat]: Unknown Format google.com.מוודאים שהפורמט הלא מוכר שצוין במדיניות XML ל-JSON שנכשלה תואם לערך שזוהה בהודעת השגיאה (שלב 1 למעלה). לדוגמה, המדיניות הבאה מציינת את הפורמט
google.com, שזהה לפורמט שמופיע בהודעת השגיאה:<XMLToJSON async="false" continueOnError="false" enabled="true" name="WithFormat"> <DisplayName>WithFormat</DisplayName> <Properties/> <Format>google.com</Format> <OutputVariable>response</OutputVariable> <Source>response</Source> </XMLToJSON>אם הפורמט שצוין לא נכלל בפורמטים המוגדרים מראש
xml.com,yahoo,googleאוbadgerFish, זו הסיבה לשגיאה.בדוגמה של מדיניות XML ל-JSON שמוצגת למעלה, הפורמט הוא
google.com, שהוא לא תקין. לכן, פריסת ה-API Proxy נכשלת עם השגיאה:XMLToJSON[WithFormat]: Unknown Format google.com.
רזולוציה
מוודאים שהפורמט שצוין ברכיב <Format> של מדיניות XML ל-JSON
הוא תקין. לדוגמה:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLToJSON async="false" continueOnError="false" enabled="true" name="WithFormat">
<DisplayName>WithFormat</DisplayName>
<Properties/>
<Format>google</Format>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
</XMLToJSON>