Hi
im using jaxb to manipulate xml document.i created the schema classes from the xsd document.Im tring to run a program that's displaying the values in a xml document .my code goes like this:
public static void main(
String srgs[]){
try{
JAXBContext jContext = JAXBContext.newInstance("generated");
Unmarshaller unmarshaller = jContext.createUnmarshaller();
//unmarshaller.setValidating(true); //LINE 1
PurchaseOrder purchaseorder = (PurchaseOrder)unmarshaller.unmarshal(new File("PurchaseOrder.xml"));
BillToType billto = purchaseorder.getBillTo();
System.out.println("Name:"+billto.getName());
System.out.println("Street:"+billto.getStreet());
System.out.println("City:"+billto.getCity());
System.out.println("State:"+billto.getState());
ItemsType items = purchaseorder.getItems();
List itemsList=items.getItem();
for(int i=0;i<itemsList.size();i++){
Item item=(Item)itemsList.get(i);
System.out.println("productName:"+item.getProductName());
System.out.println("Quantity:"+item.getQuantity());
System.out.println("Price:"+item.getPrice());
}
}
when my line 1 is commented im getting a perfect result.but when i include the line 1 im getting "JAXBException:unable to extract the schema information".can anyone pls tell me how to overcome this problem?