You can add a namespace definition to this annotation:
@XmlRootElement(name = "DescribeVolumesResponse",namespace="
http://ec2.amazonaws.com/doc/2008-12-01/")
-W
On Wed, Jan 7, 2009 at 11:41 PM, Stephen More <stephen.more_at_gmail.com>wrote:
> I am able to unmarshal from XML to a java object when there is no
> xmlns element.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <DescribeVolumesResponse>
> </DescribeVolumesResult>
>
> Once the namespace gets added to the xml I am getting unexpected
> element exceptions:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
> </DescribeVolumesResult>
>
> The annotation in the java file looks like this:
> @XmlRootElement(name = "DescribeVolumesResponse")
>
>
> What do I need to do so the unexpected element exceptions stop occurring ?
>
> -Thanks
> Steve More
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>