Dean
Bicking, Dave B243 wrote:
Keith, Thank you so very much for the help. Turns out I was looking at it slightly skewed. I forgot to specify the class in the Unmarshaller constructor, so when I tried your suggestion the first time (long before I emailed this list), I got errors. It was only when I specified the class in the unmarshal() method that I was able to get it to run. Once I corrected that, and tried it again, I had no problem!I have more questions, though. I'll post them on separate threads. Thanks again! David Bicking-----Original Message----- From: Keith Visco [SMTP:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 12:32 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Problem saving and retrieving incomplete XML documents havingdat a from multiple HTML pages Hi Dave, When you call the unmarshaller make sure the "unmarshal()" method you call only takes one argument, like unm.unmarshal(reader). If it takes more than one argument, like unm.unmarshal(Foo.class, reader), then you are using a *static* method, which means the "unm.setValidate(false)" will have no effect. So make sure you are not invoking a static unmarshal method. Also you data still must be well formatted (syntactically correct XML) or the parser will be unable to parse it. However you should be able to unmarshalling missing data by disabling the validation as described above. --Keith "Bicking, Dave B243" wrote:All, First, thank you to all those who so quickly responded to my last post (Dean!) I have another question conserning Unmarshaller.setValidate(). I'mbuildingan application that collects many fields of input from the user. In the name of user-friendlyness, there are several different pages used tocollectthem. Additionally, I need to save the input from each page upon POST,incase there is an application/infrastructure failure, session times out,orthe user wishes to finish the work tomorrow. We're modelling the dataas asingle XML document (I hope we can continue to do that). I examined the API, and found setValidate() on both the Marshaller and Unmarshaller. I found that I can save partial data to XML. However, I cannot retrieve it with Unmarshaller.setValidate(false). Is this a bug,oram I misunderstanding the purpose of the property? I'm told thedocumentcannot be loaded because it is missing required data. Here's the errorIget on Unmarshall: Marshal error: ValidationException: A minimum of 1 scheduleId object(s)arerequired.; - location of error: XPATH: schedule{file: [not available]; line: 7; column: 12} Is there another technique I should use?-- David Bicking aCIGNA CPF Systems-------------------------------------------------------------------------- ----CONFIDENTIALITY NOTICE: If you have received this e-mail in error,please immediately notify the sender by e-mail at the address shown. This e-mail transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright (c) 2003 CIGNA++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev------------------------------------------------------------------------------ CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately notify the sender by e-mail at the address shown. This e-mail transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright (c) 2003 CIGNA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
