Hi I just started using JIBX and I am having difficulty grasping the
Binding concept. I have generated the JAVA classes from an XSD File
I am using windows and here is how my folders are structures
d:\Libraries\
This folder contains the jibx folder downloaded so the rar libraries like
jibx-tools.jar are in
d:\Libraries\\jibx\lib\.....
Now the Libraries folder also contains a folder called dwcode2
I have an XSD File called starter.xsd in
D:\Libraries\jibx\dwcode2\
I generated the JAVA files using the command in DOS
D:\Libraries\jibx\dwcode2>java -cp ..\lib\jibx-tools.jar
org.jibx.schema.codegen.CodeGen -t gen\src -w starter.xsd
as a result JAVA files were generated in
D:\Libraries\jibx\dwcode2\gen\src\org\jibx\
and the binding.xml was generated in
D:\Libraries\jibx\dwcode2\gen\src
Now I want to compile and bind the file (Could anyone also tell me why do
we have to compile and bind the XML )
So i did the following
D:\Libraries\jibx\dwcode2\gen\src>java -jar "D:\Java
Libraries"\jibx\lib\jibx-bind.jar binding.xml
Error: Unable to find type org.jibx.starter.Shipping; on format element at
(line 3, col 66, in binding.xml)
Error: Cannot find information for class org.jibx.starter.Item; on mapping
element at (line 4, col 79, in binding.xml)
Error: Cannot find information for class org.jibx.starter.Address; on
mapping element at (line 9, col 85, in binding.xml)
Error: Cannot find information for class org.jibx.starter.Customer; on
mapping element at (line 17, col 87, in binding.xml)
Error: Cannot find information for class org.jibx.starter.Order; on mapping
element at (line 22, col 81, in binding.xml)
Error: Cannot find information for class org.jibx.starter.Order; on mapping
element at (line 35, col 56, in binding.xml)
Error running binding compiler org.jibx.runtime.JiBXException: Binding
binding.xml is unusable because of valid
ation errors at
org.jibx.binding.Utility.loadBinding(Utility.java:358)
at
org.jibx.binding.Utility.loadFileBinding(Utility.java:420)
at
org.jibx.binding.Compile.compile(Compile.java:217)
at org.jibx.binding.Compile.main(Compile.java:384)
Could anyone please tell me what i am doing wrong ?? How can i fix this
problem ? and why do we have to bind ??
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users