- cvc-enumeration-valid: значение ‘2’ не является фасетно-допустимым по отношению к перечислению ‘[1]’. Это должно быть значение из перечисления
- Ошибка
- 2 ответа
- Почему файл может не соответствовать XSD-схеме СЗВ-М?
- Что такое XSD-схема файла и ошибка в ней?
- Что означает «неправильное имя файла» или «имя не соответствует утвержденному формату 00042»?
- Портал поддержки федеральных систем в сфере образования
- Непонятные ошибки при валидации
- XML validation
- validation failure for TrackRequest Error:cvc-enumeration-valid: Value ‘1’ is not facet-valid with respect to enumeration
- 2 Answers 2
- Not the answer you’re looking for? Browse other questions tagged fedex or ask your own question.
- Related
- Hot Network Questions
- Subscribe to RSS
cvc-enumeration-valid: значение ‘2’ не является фасетно-допустимым по отношению к перечислению ‘[1]’. Это должно быть значение из перечисления
Я получаю сообщение об ошибке при проверке этого XML:
Ошибка
cvc-enumeration-valid: значение ‘2’ не является фасетно-допустимым по отношению к перечислению ‘[1]’. Это должно быть значение из перечисления.
Может ли кто-нибудь помочь мне разобраться в проблеме? Как это решить?
2 ответа
Сообщение об ошибке,
cvc-enumeration-valid: значение ‘2’ недействительно по отношению к перечисление ‘ [1] ‘. Это должно быть значение из перечисления.
И simpleType из вашего вопроса не согласны.
Сообщение об ошибке подразумевает, что разрешено только 1 , но обнаружено 2 ; ваше определение типа действительно допускает как 1 , так и 2 .
Чтобы вызвать фактическое сообщение об ошибке, относящееся к вашему xs:simpleType , ваш XML должен использовать недопустимое значение, скажем 3 . Тогда вы получите такое сообщение об ошибке:
cvc-enumeration-valid: значение ‘3’ недействительно по отношению к перечисление ‘ [1, 2] ‘. Это должно быть значение из перечисления.
Следовательно, ваша (первая, может быть, единственная?) Ошибка состоит в том, что вы полагаете, что опубликованное определение xs:simpleType имеет какое-либо отношение к этому сообщению об ошибке.
У меня это работает, я думаю, что он отвечает на ваш вопрос, но, как указывает KJ без примера, мы на самом деле просто догадываемся.
Вот образец XML
И образец схемы
При значении 3 (недействительно) возникает следующее исключение.
Источник
Почему файл может не соответствовать XSD-схеме СЗВ-М?
Что такое XSD-схема файла и ошибка в ней?
XSD — это программный язык. С помощью XSD описывается структура XML-документа:
- разделы, содержащие информацию;
- модель (параметры) содержания;
- тип и вид данных;
- синтаксис данных.
То есть XSD-схема СЗВ-М — это выполненное программным языком описание структуры отчета СЗВ-М. Если во внесенной в СЗВ-М информации содержатся ошибки или неточности, то при контроле файла тоже средствами XSD информация является нечитаемой. Поэтому система формирует пользователю предупреждение: «отчет СЗВ-М не соответствует XSD-схеме». Это означает, что программное обеспечение не может воспринять данные из отчета, т. к. они некорректные с точки зрения языка XSD.
ОБРАТИТЕ ВНИМАНИЕ! Ошибка XSD может быть как в самих введенных данных (например, в ИНН или регистрационном номере организации), так и в том, как именно эти данные введены (например, указаны лишние нули, или пробелы, или дефисы). То есть для установления и устранения ошибки нужно в каждом конкретном случае проверять конкретный файл!
Больше об ошибках в файле СЗВ-М — в статье «Отрицательный протокол по СЗВ-М (нюансы)».
Начиная с отчетности за май 2021 года СЗВ-М сдается по новой форме. Актуальный образец отчета можно скачать в КонсультантПлюс. Пробный доступ к правовой системе предоставляется бесплатно.
Что означает «неправильное имя файла» или «имя не соответствует утвержденному формату 00042»?
Как должно выглядеть правильное имя файла отчета СЗВ-М (формат 00042), установлено постановлением правления ПФР «Об утверждении формата сведений для ведения индивидуального (персонифицированного) учета (форма СЗВ-М)» от 07.12.2016 № 1077п. Корректное имя должно содержать следующие разделы:
- 1 — орган, куда представляется отчет;
- 2 — регистрационный номер страхователя;
- 3 — код территориального органа ПФР, принимающего сведения, содержащиеся в файле (по классификатору территориальных органов ПФР);
- 4 — вид представляемого отчета;
- 5 — дата отчета в формате ГГГГММДД;
- 6 — уникальный идентификатор электронного документа (должен формироваться программой). Значение GUID должно быть идентично значению GUID документа, содержащегося в файле;
- 7 — расширение файла отчета (только xml).
Корректное имя должно выглядеть следующим образом:
Источник
Портал поддержки федеральных
систем в сфере образования
Непонятные ошибки при валидации
В версии 3 появились новые ошибки которых раньше не было:
1. Ошибка валидации XSD. Строка:33, cvc-enumeration-valid: Value ‘1.1’ is not facet-valid with respect to enumeration ‘[1, 2, 3, 4, 4.1, 4.2, 5, 6, 7, 7.1, 7.2, 7.3, 7.4, 8, 9, 9.1, 10, 11, 12, 12.1, 13, 13.1, 14, 15, 16, 17, 17.1, 18, 18.1, 18.2, 18.3, 19, 19.1, 19.2, 19.3, 20, 20.1, 20.2, 20.3, 20.4, 21, 22, 23, 24, 25, 26, 29, 30, 30.1, 30.2, 31, 31.2, 31.3, 31.4, 32, 33]’. It must be a value from the enumeration.
(такая же история с показателями 27, 28, 31.1) как это так оказалось что в метод. рекомендациях эти показатели есть, а ваша система говорит что они лишние и необходимо предоставлять только показатели из списка (1, 2, 3, 4, 4.1, 4.2, 5, 6, 7, 7.1, 7.2, 7.3, 7.4, 8, 9, 9.1, 10, 11, 12, 12.1, 13, 13.1, 14, 15, 16, 17, 17.1, 18, 18.1, 18.2, 18.3, 19, 19.1, 19.2, 19.3, 20, 20.1, 20.2, 20.3, 20.4, 21, 22, 23, 24, 25, 26, 29, 30, 30.1, 30.2, 31, 31.2, 31.3, 31.4, 32, 33)
2. Ошибка валидации XSD. Строка:14, cvc-complex-type.4: Attribute ‘features’ must appear on element ‘organization’.
согласно методических рекомендаций атрибута features не существует, есть тэг feature.
Атрибут всегда находится внутри тэга, например: вот age_from, age_to, name и т.д. являются атрибутами тэга group, в связи с этим прошу исправить отображение ошибок.
3. В справочнике ФИАС очень много отсутствует значений для houseguid, в связи с этим мы его не передаем, измените либо проверку либо метод рекомендации, разрешите передавать aoguid улицы и просто текстом номер дома
Источник
XML validation
Failed to validate the configuration file: cvc-elt.1: Cannot find the declaration of element ‘test’.
Root element is not mapping.
Add a root element mapping.
Failed to validate the configuration file: cvc-complex-type.2.4.b: The content of element ‘mapping’ is not complete. One of ‘
No module element in the mapping element.
Add a module element in the mapping root element.
Failed to validate the configuration file: cvc-complex-type.2.4.d: Invalid content was found starting with element ‘
More than two module elements in the mapping file.
Make sure the mapping element has only one or two module elements.
Failed to validate the configuration file: cvc-enumeration-valid: Value ‘others’ is not facet-valid with respect to enumeration ‘[change, problem]’. It must be a value from the enumeration.
cvc-attribute.3: The value ‘others’ of attribute ‘name’ on element ‘module’ is not valid with respect to its type, ‘ModuleName’.
Name of a module is not problem or change.
The name attribute of a module element should be change or problem.
Failed to validate the configuration file: cvc-complex-type.2.4.b: The content of element ‘module’ is not complete. One of ‘
No field element in the module element.
Define field elements in each module element.
Failed to validate the configuration file: cvc-enumeration-valid: Value ‘Unknown’ is not facet-valid with respect to enumeration ‘[String, Number, Date, Attachment, Single_Value_List, Multi_Value_List]’. It must be a value from the enumeration. cvc-attribute.3: The value ‘Unknown’ of attribute ‘type’ on element ‘field’ is not valid with respect to its type, ‘FieldType’.
The field element has a wrong type attribute.
The type attribute of a field element must be enumeration ‘[String, Number, Date, Attachment, Single_Value_List, Multi_Value_List]’
Failed to validate the configuration file: cvc-datatype-valid.1.2.1: ‘wrong’ is not a valid value for ‘boolean’. cvc-attribute.3: The value ‘wrong’ of attribute ‘readonly’ on element ‘field’ is not valid with respect to its type, ‘boolean’.
The field element has a wrong readonly attribute.
The readonly attribute of a field element should be true or false.
Failed to validate the configuration file: cvc-enumeration-valid: Value ‘wrong’ is not facet-valid with respect to enumeration ‘[mandatory, optional, recommended]’. It must be a value from the enumeration. cvc-attribute.3: The value ‘wrong’ of attribute ‘required’ on element ‘field’ is not valid with respect to its type, ‘FieldRequired’.
The field element has a wrong required attribute.
The required attribute of a field element should be mandatory, optional or recommended.
Failed to validate the configuration file: cvc-complex-type.4: Attribute ‘type’ must appear on element ‘field’.
The field element has no type attribute.
The type attribute must be defined in each field element.
Failed to validate the configuration file: cvc-complex-type.4: Attribute ‘name’ must appear on element ‘field’.
The field element has no name attribute.
Define a name attribute in the field element.
Failed to validate the configuration file: cvc-complex-type.2.4.d: Invalid content was found starting with element ‘items’. No child element is expected at this point.
The field element has more than one child element items.
Define only one items element in each field element.
Failed to validate the configuration file: cvc-complex-type.2.4.b: The content of element ‘items’ is not complete. One of ‘
The items element has no child element item.
Add item elements in each items element.
Failed to validate the configuration file: cvc-complex-type.4: Attribute ‘value’ must appear on element ‘item’.
The item element has no value attribute.
Define a value attribute for each item element.
Failed to validate the configuration file: cvc-minLength-valid: Value » with length = ‘0’ is not facet-valid with respect to minLength ‘1’ for type ‘Item’. cvc-complex-type.2.2: Element ‘item’ must have no element [children], and the value must be valid.
The item element has no text value.
Define a text value for each item element.
cvc-minLength-valid: Value » with length = ‘0’ is not facet-valid with respect to minLength ‘1’ for type ‘NonEmptyString’. cvc-attribute.3: The value » of attribute ‘value’ on element ‘item’ is not valid with respect to its type, ‘NonEmptyString’.
The value attribute has an empty value.
Define a value for the value attribute in each item element.
cvc-minLength-valid: Value » with length = ‘0’ is not facet-valid with respect to minLength ‘1’ for type ‘NonEmptyString’. cvc-attribute.3: The value » of attribute ‘name’ on element ‘field’ is not valid with respect to its type, ‘NonEmptyString’.
The name attribute has an empty value.
Define a value for the name attribute of each item element.
cvc-enumeration-valid: Value ‘Attachment’ is not facet-valid with respect to enumeration ‘[String, Number, Date, Single_Value_List, Multi_Value_List]’. It must be a value from the enumeration. cvc-attribute.3: The value ‘Attachment’ of attribute ‘type’ on element ‘field’ is not valid with respect to its type, ‘FieldType’.
The field element has a type of Attachment.
Remove the Attachment type element.
Fail to validate the configuration file: cvc-datatype-valid.1.2.1: ‘xxx’ is not a valid value for ‘integer’. cvc-attribute.3: The value ‘xxx’ of attribute ‘length’ on element ‘field’ is not valid with respect to its type, ‘positiveInteger’.
The field element has an incorrect length attribute value.
Correct the value of the field element.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Источник
validation failure for TrackRequest Error:cvc-enumeration-valid: Value ‘1’ is not facet-valid with respect to enumeration
Am trying to integrate the Fedex shipping API with my website. For this am using SOAP + XML features. But am getting an error that «SOAP-ENV:ServerFaultUnrecoverableClientErrorSchemaErrorvalidation failure for TrackRequest Error:cvc-enumeration-valid: Value » is not facet-valid with respect to enumeration». Anyone can help will be appreciated.
2 Answers 2
This error indicates that the SOAP/XML request you’re sending follows an invalid schema, e.g. contains invalid elements or wrong ordering. To further debug this, please post the full API request & response.
I’m working for a company called Shippo. You can use our API to connect with FedEx via client libraries in all major programming languages — maybe that’s helpful for you.
The error indicates that you are using an invalid value for an element — an acceptable list of values is already provided in an enumeration in the WSDL.
Example of the restriction:
The above means that I can only send ImageId as IMAGE_1 , IMAGE_2 up to IMAGE_5 . Anything beyond that would throw the error you mentioned.
Not the answer you’re looking for? Browse other questions tagged fedex or ask your own question.
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.12.20.41044
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Источник