I've managed to solve the problem and am posting it here in case
anyone else runs into this issue however I would still be really
interested if anyone could tell me how to ignore the default namespace
specified in the root element.

I had previously tried setting the namespace on the root entity
annotation but what was missing was putting the xml elements into the
same namespace. Below is my annotated entity that is working fine.


@XmlRootElement(name = "profile", namespace =
"http://site.com/1.0-SNAPSHOT/GuestProfile.xsd";)
@XmlType(name = "", propOrder = {

})
public class ProfileEntity {

       @XmlElement(namespace =
"http://site.com/1.0-SNAPSHOT/GuestProfile.xsd";, required = true)
       private String title;
       @XmlElement(namespace =
"http://site.com/1.0-SNAPSHOT/GuestProfile.xsd";, required = true)
       private String firstName;
       @XmlElement(namespace =
"http://site.com/1.0-SNAPSHOT/GuestProfile.xsd";, required = true)
       private String middleName;

//Getters and Setters without annotations

}


On Sun, Jul 18, 2010 at 10:00 AM, Ian Petzer <[email protected]> wrote:
> Oh sorry, that was just a typo on my behalf. I'm not actually
> connecting to web services at site.com. The fundamental problem still
> remains however.
>
> On Sun, Jul 18, 2010 at 1:32 AM, ironman77 <[email protected]> wrote:
>>
>> I am not sure if it makes a difference but shouldn't it be "site" instead of
>> "nsite"?
>>
>> uri:"http://nsite.com/1.0-SNAPSHOT/GuestProfile.xsd";,
>>
>> Thanks,
>> J
>>
>> --
>> View this message in context: 
>> http://cxf.547215.n5.nabble.com/Error-unmarshalling-xml-tp1376218p1376234.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>

Reply via email to