highsource / highsource/jsonix
Could not be unmarshalled
- Lenguaje dominante
- JavaScript
- Estrellas
- 369
- Forks
- 85
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello,
I tried the jsonix PO example, it works fine with marshalling and unmarshalling.
When I try to implement it in my use case I am getting the following error
`Error: Element [{http://www.w3.org/2001/XMLSchema}xsd:schema] could not be unmarshalled as is not known in this context and the property does not allow DOM content.`
Steps:
1. created INVOICE.js in mappings folder using below command
`java -jar \lib\jsonix-schema-compiler-full-2.3.9.jar -d mappings -p INVOICE https://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd`
2. stored the same xsd (https://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd) as an example in invoice.xml
```
const Jsonix = require('jsonix').Jsonix,
INVOICE = require('../mappings/INVOICE'),
context = new Jsonix.Context([INVOICE]),
unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalFile('../mappings/invoice.xml',
function (unmarshalled) {
console.log(unmarshalled.value.cac:InvoicePeriod.cbc:StartDate);
});
```
Any help will be highly appreciated. Thanks
PS: code [jsonixInvoice](https://github.com/dishantindept/jsonixInvoice) for reference
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con mappings/INVOICE.js y mappings/invoice.xml y, a continuación, reproduce el fallo mediante context.createUnmarshaller() y unmarshalFile(). Compara este caso con el ejemplo funcional de JSONix PO y el repositorio de referencia jsonixInvoice. El trabajo estará terminado cuando la invoice.xml proporcionada se deserialice sin el error de elemento desconocido y el callback pueda acceder a los datos de la factura.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100