users@jaxb.java.net

"unexpected character literal " Validation Exception

From: Sam Cheung <sylcheung_at_hotmail.com>
Date: Mon, 23 Feb 2004 22:33:02 +0000

I get an "unexpected character literal " Validation Exception during
unmarshalling.
But I dump out the content I sent to the unmarshaller, it looks valid. And
the exception does not say which node has problem.

  u.setEventHandler(new MyDefaultValidationEventHandler());
  System.out.println ("content:" + new String(baos.toByteArray()));

  Object obj = u.unmarshal(new ByteArrayInputStream(baos
                                        .toByteArray()));

Here is the content I sent to unmarshaller:
content:<Rsp
xmlns="url of schema"> <Version>1.0.0</Version> <Status>
     <StatusCode>3</StatusCode> <StatusText>Unsupported
Operation</StatusText> <Details>No valid recipients</Details>
    </Status> </Rsp>

Here is the Validation error (Notice the Location is EMPTY STRING):
DefaultValidationEventHandler: [ERROR]: unexpected character literal
     Location:

Thank for any help in this matter.

_________________________________________________________________
Dream of owning a home? Find out how in the First-time Home Buying Guide.
http://special.msn.com/home/firsthome.armx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net