users@jaxb.java.net

Re: AXIS2, JAXB & Unmarshalling

From: waymirec <chris_at_waymire.net>
Date: Tue, 22 Dec 2009 04:56:12 -0800 (PST)

Validation is indeed working correctly as doing anything to break the schema
(adding an unknown element or attribute) causes the appropriate error. I am
able to create an object and marshal it into well-formed/proper XML without
any issues. It is only the unmarshalling that is giving me an object with
null members. I have debugged the process intensively and can see no issues
at any step of the code. Something somewhere seems to be quietly failing.



Wolfgang Laun-2 wrote:
>
> To exclude some possibilities:
> - Is a validation error reported when you pass an invalid document?
> - No matter what the unmarshalled document looks like: Can you add some
> code to the web service that creates and marshals a document (to a file)
> and
> is this correct?
>
> -W
>
>
> On Fri, Dec 18, 2009 at 7:46 PM, waymirec <chris_at_waymire.net> wrote:
>
>>
>> I can confirm that the classes and data are indeed the same in both
>> scenarios
>> and I am validating it against the schema with no errors to be found. I
>> am
>> at a complete loss.
>>
>>
>>
>> Wolfgang Laun-2 wrote:
>> >
>> > What you report is strange, and offhand I'd guess that you aren't using
>> > the
>> > same classes or data in both scenarios.
>> >
>> > Note that unmarshalling of invalid content may indeed produce empty or
>> > null
>> > components, silently. JAXB's philosophy is to unmarshal as much as
>> > possible.
>> > To learn what goes wrong, request validation against the XML Schema.
>> >
>> > -W
>> >
>> >
>> >
>> > On Fri, Dec 18, 2009 at 7:11 PM, waymirec <chris_at_waymire.net> wrote:
>> >
>> >>
>> >> I am having an odd issue with JAXB within AXIS2. The code in question
>> can
>> >> be
>> >> ran successfully as a "standalone" java app and everything works as
>> >> expected. Running it from within the AXIS2 web service presents an odd
>> >> issue
>> >> where the call to unmarshal returns a non-null object of the proper
>> class
>> >> but all of its members are null. There are no exceptions of any kind
>> >> thrown
>> >> and I can confirm that the data being passed to unmarshal is correct
>> and
>> >> valid. According to the docs unmarshal should either suceed or toss an
>> >> exception, but should never quietly fail. Has anyone else experienced
>> an
>> >> issue like this?
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/AXIS2%2C-JAXB---Unmarshalling-tp26847419p26847419.html
>> >> Sent from the java.net - jaxb users mailing list archive at
>> Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> >> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AXIS2%2C-JAXB---Unmarshalling-tp26847419p26847907.html
>> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
>

-- 
View this message in context: http://old.nabble.com/AXIS2%2C-JAXB---Unmarshalling-tp26847419p26887898.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.