开发者

java classes creating from xsd via xjc problem

开发者 https://www.devze.com 2023-03-11 06:14 出处:网络
i have t开发者_如何学运维he xsd file created and worced fine in VS. But now we need to create java classes corresponding to this. I tryed to use standard xjc tool from the JDK 1.6 but it give me an er

i have t开发者_如何学运维he xsd file created and worced fine in VS. But now we need to create java classes corresponding to this. I tryed to use standard xjc tool from the JDK 1.6 but it give me an error [ERROR] ct-props-correct.4: Error for type '#AnonType_BathRoomApartmentType'. Du plicate attribute uses with the same name and target namespace are specified. N ame of duplicate attribute use is 'Changed'. line 314 of file:/C:/Program%20Files/Java/jdk1.6.0_24/bin/temp/LogicalModelSch ema.xsd

even thoughts i was able to generate the XML files from this xsd in Eclipse with no problems.

Could someone give me any suggestion how i can handle this? I looked in the forum but didn't find any solution for now!

Thanks in advance, Mila


In some cases, XJC requires help from you because by default it wants to map two different things in the XSD to the same Java class or field. In this case, it's something about "Changed" in BathRoomApartment - there's another "Changed" that's colliding with it. You'll need to provide some binding customization, or change the schema (if possible) to fix it.

0

精彩评论

暂无评论...
验证码 换一张
取 消