users@jaxb.java.net

Re: javax.xml.bind.UnmarshalException

From: William Saxton <saxton_at_gmail.com>
Date: Thu, 17 May 2007 13:39:13 -0400

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
>
>