English 中文(简体)
JAXB Unmarshall Created an Empty Object
原标题:JAXB Unmarshall Created an Empty Object

我正在利用日本宇宙航空研究开发机构将XML的档案整理成一个目标树。 原始物体为非核物,但即使XML档案中有数据,其所有成员都是无效的。 我的物体是用斜体生成的Axis2。 我有笔记本,即笔记本。 in

我的问题与本次讨论相同:

首先,我是否能够妥善填写数据?

如果不是的话,阿西斯2或日本宇宙航空研究开发机构是否有一个很好的替代图书馆,这样做是一样的,但相互之间会发挥ice的作用?

最佳回答

日本宇宙航空研究开发机构在缺席时无声地忽视错误。 我看不出任何原因,为什么这是缺省组合。 如果情况有误,则添加这一法典。

unmarshaller.setEventHandler(
    new ValidationEventHandler() {
        @Override
        public boolean handleEvent(ValidationEvent event ) {
            throw new RuntimeException(event.getMessage(),
                                       event.getLinkedException());
        }
});
问题回答

最近,我有类似的问题,可以确定如下:

1) Fixup the xsd file. In my case I ve ensured that all complex elements in xsd refering to their corresponding type using ref attribute, instead of declaring them with type attribute.

我先核实我XML Schema案卷宗在Eclipse中是否建立了Xml文档。

在固定之前,Xml档案中的根本要素是空的。 在确定了xsd之后,Xml的形成与一些样本值相适应。

2) clean and re-build It s mandatory to clean before re-generating the classes.

必须对包裹-资料进行汇编。 Eclipse必须找到所有java文档并加以汇编。 如果从指挥线上进行汇编,并允许对附属地进行javac搜索,NOT就会发现。 然后,当你跑时,就拿空物体。 Seems such as a bug in JAXB to not at minimum import that file some where. 错误应当告诉你,可以汇编这一档案。

当用于制定 Java法典的xsd文档提到不可渗透的ur时,我就谈到了这一问题。

很幸运的是,所有这些参考资料都出现在<条码>、包装-info.java文档中,因此我最终不得不增加一个<代码>antRun。 <代码>xjc后的任务删除。





相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签