Binding in JIBX

priguecig

New Member
Hi I just started using JIBX and I am having difficulty grasping the Binding concept. I have generated the JAVA classes from an XSD FileI am using windows and here is how my folders are structuresd:\Libraries\This folder contains the jibx folder downloaded so the rar libraries like jibx-tools.jar are ind:\Libraries\jibx\lib.....Now the Libraries folder also contains a folder called dwcode2I have an XSD File called starter.xsd inD:\Libraries\jibx\dwcode2\I generated the JAVA files using the command in DOSD:\Libraries\jibx\dwcode2>java -cp ..\lib\jibx-tools.jar org.jibx.schema.codegen.CodeGen -t gen\src -w starter.xsdas a result JAVA files were generated inD:\Libraries\jibx\dwcode2\gen\src\org\jibx\and the binding.xml was generated inD:\Libraries\jibx\dwcode2\gen\srcNow 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 followingD:\Libraries\jibx\dwcode2\gen\src>java -jar "D:\Java Libraries"\jibx\lib\jibx-bind.jar binding.xml\[code\]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 validation 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)\[/code\]Could anyone please tell me what i am doing wrong ?? How can i fix this problem ? and why do we have to bind ??
 
Back
Top