I have the following binding file in a folder called example 24
<binding xmlns:tns="ns" package="example24" name="binding"
trim-whitespace="true">
<namespace uri="ns" default="elements" prefix="tns"/>
<mapping abstract="true" type-name="tns:item" class="example24.Item">
<value style="attribute" name="id" get-method="getId"
set-method="setId"/>
<value style="attribute" name="quantity" get-method="getQuantity"
set-method="setQuantity"/>
<value style="attribute" name="price" get-method="getPrice"
set-method="setPrice"/>
</mapping>
</binding>
and the code for Item (Item.java) is placed next to binding.xml
package example24;
public class Item
{
private String id;
private int quantity;
private Float price;
public String getId()
{ return id; }
public void setId(String id)
{ this.id = id; }
public int getQuantity()
{ return quantity; }
public void setQuantity(int quantity)
{ this.quantity = quantity; }
public Float getPrice()
{ return price; }
public void setPrice(Float price)
{ this.price = price; }
}
And to generate the binding here is what i do and the output i get
C:\jibx\tutorial>java -jar C:\jibx\lib\jibx-bind.jar example24\binding.xml
Error: Cannot find information for class example24.Item; on mapping element
at (
line 4, col 71, 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)
Any suggestions ??
------------------------------------------------------------------------------
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