users@jaxb.java.net

Re: javax.xml.bind.UnmarshalException

From: Kirill Grouchnikov <kirillcool_at_yahoo.com>
Date: Thu, 17 May 2007 10:42:12 -0700 (PDT)

Should that come from the catalogoconcreto object that you just fetched from the list?

----- Original Message ----
From: William Saxton <saxton_at_gmail.com>
To: users_at_jaxb.dev.java.net
Sent: Thursday, May 17, 2007 10:39:13 AM
Subject: Re: javax.xml.bind.UnmarshalException

Your problems is here:

CatalogoTypeImpl prod = new CatalogoTypeImpl();
List producto = prod.getProducto();

You are creating a new CatalogoTypeImpl, prod, then trying to getProducto from prod.

Since prod is "new", it isn't going to contain any producto. You need to get prod from somewhere else.


On 5/17/07, lissette <glorianchu18_at_hotmail.com> wrote:

Hello!!
I have another doubt I like to list products of I catalog but not like doing
it:

for (int i = 0; i < numero; i++) {
        Catalogo catalogoconcreto = (Catalogo)catalogo.get(i);
        
System.out.println(catalogoconcreto.getNombre());
        //CatalogoTypeImpl prod = (CatalogoTypeImpl)getProducto();
        //No se como obtener los productos de un catalogo
        CatalogoTypeImpl prod = new CatalogoTypeImpl();

        List producto = prod.getProducto();
        int numero2 = producto.size();
        System.out.println("El numero de productos que tiene el catalogo es: "
+numero2);
        for (int j = 0; i < numero2; j++) {

                Producto p=(Producto)producto.get(j);
                System.out.println(p.getNombre() +" cuyo precio es: "+p.getPrecio());
        }//for
}//for

it does not find any product. could you help me??

thanks
--
View this message in context: http://www.nabble.com/javax.xml.bind.UnmarshalException-tf3772675.html#a10668768
Sent from the java.net - jaxb users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/