Thanks,

I just posted my solution specifying the namespace in the annotations.

I am curious though if there is a way to ignore the default namespace
when consuming the xml?

On Sun, Jul 18, 2010 at 12:18 PM, Aleksei Valikov
<[email protected]> wrote:
> Hi,
>
>> I'm trying to use the JAX-RS WebClient to deserialise some xml but I'm
>> running into a problem with the namespace that is being specified by
>> the web service I'm consuming.
>>
>> I have an entity:
>>
>> @XmlRootElement(name = "profile")
>> @XmlType(propOrder = { "title", "firstName", "middleName" })
>> public class ProfileEntity {
>>
>>        private String title;
>>        private String firstName;
>>        private String middleName;
>>
>> //Getters and Setters without annotations
>>
>> }
>>
>> My code to consume this looks as follows:
>> WebClient client = WebClient.create(url);
>> ProfileEntity profileEntity = webClient.path(serviceURL).accept(
>> "application/xml").get(ProfileEntity.class);
>
> You class does not have namespace annotations. Either add namespace
> into your @Xml... annotations or @XmlSchema/@XmlNs in your
> package-info.
>
> Bye.
> /lexi
>

Reply via email to