Hi Senthil thanks for posting the snippets. Just a quick check : - I'm assuming that both Images and Image beans have @XmlRootElement with the namespace attribute ? - When you say 'multiple schemas', do you mean that you have say A.xsd importing B.xsd with xsd:import ?
cheers, Sergey On Thu, Nov 25, 2010 at 9:12 AM, senthil.arumugam <[email protected] > wrote: > > Hi Sergey, > > I have added the code snippet of Images and Image bean. The problem I am > facing is, when I have the input from single namespace, it works fine. When > I have the multiple namespaces, it fails at validation. > > Here goes the Images > > > > @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) > > @XmlRootElement(name = "images") > > public class Images { > > private Collection<Image> images; > > > > public Images() { > > } > > > > public Images(final Collection<Image> images) { > > this.images = images; > > } > > > > @XmlElement(name = "image") > > public Collection<Image> getImages() { > > return images; > > } > > > > public void setEntity(final Long entityId, final Long entityTypeId) { > > for (final Image image : this.images) { > > image.setEntityId(entityId); > > image.setEntityTypeId(entityTypeId); > > } > > } > > > > public void setImages(final Collection<Image> images) { > > this.images = images; > > } > > } > > > > Image bean: > > > > @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) > > @XmlRootElement(name = "image") > > public class Image { > > private Long entityId; > > private Long entityTypeId; > > private Integer height; > > private Long id; > > pirvate String absoluteUri; > > private Date lastModified; > > private ImageTypeEnum type; > > private Integer width; > > > > public Image() { > > } > > > > @XmlElement(name = "imageUri") > > public String getAbsoluteUri() { > > return absoluteUri; > > } > > > > @XmlTransient public Long getEntityId() { > > return entityId; > > } > > > > @XmlTransient public Long getEntityTypeId() { > > return entityTypeId; > > } > > > > public Integer getHeight() { > > return height; > > } > > > > public Long getId() { > > return id; > > } > > > > @XmlTransient public Date getLastModified() { > > return lastModified; > > } > > > > public ImageTypeEnum getType() { > > return type; > > } > > > > public Integer getWidth() { > > return width; > > } > > > > public void setEntityId(final Long entityId) { > > this.entityId = entityId; > > } > > > > public void setEntityTypeId(final Long entityTypeId) { > > this.entityTypeId = entityTypeId; > > } > > > > public void setHeight(final Integer height) { > > this.height = height; > > } > > > > public void setId(final Long id) { > > this.id = id; > > } > > > > public void setLastModified(final Date lastModified) { > > this.lastModified = lastModified; > > } > > > > public void setType(final ImageTypeEnum type) { > > this.type = type; > > } > > > > public void setWidth(final Integer width) { > > this.width = width; > > } > > } > > > > Thanks > Senthil Arumugam > >
