highsource / highsource/jsonix
Could not be unmarshalled
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 369
- フォーク
- 85
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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:
-
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 -
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 for reference
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず mappings/INVOICE.js と mappings/invoice.xml から始め、context.createUnmarshaller() と unmarshalFile() を通じて失敗を再現します。このケースを、動作する JSONix PO の例および jsonixInvoice リファレンスリポジトリと比較します。提供された invoice.xml が unknown-element エラーなしでアンマーシャルされ、callback から請求書データにアクセスできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100