Title: RE: Deserialization from a file

Hi,

Well its not a free library but we use jsx for serialisation and deserialisatin of
java objects to xml and reverse. Not in combination with axis, but we do for instance
to translate VO's to xml

Greetz
Leo

-----Oorspronkelijk bericht-----
Van: Yves Langisch [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag, januari 2004 14:20
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Deserialization from a file


I'm still trying to deserialize from a xml-file. What I have so far is:

     BeanDeserializer deser = (BeanDeserializer)
SalaryDeclarationRequestType.getDeserializer(null,
SalaryDeclarationRequestType.class, new
javax.xml.namespace.QName("http://www.abc.ch/schemas/20031204/SalaryDeclarationContainer",
"SalaryDeclarationRequestType"));

     SAXParserFactory parserFactory = SAXParserFactory.newInstance();

     parserFactory.setNamespaceAware(true);
//    parserFactory.setValidating(true);
//
parserFactory.setFeature("http://apache.org/xml/features/validation/schema",
true);
     SAXParser parser = parserFactory.newSAXParser();
     XMLReader xmlReader = parser.getXMLReader();
     xmlReader.setContentHandler(deser);
     xmlReader.setErrorHandler(new TestErrorHandler());
     xmlReader.parse(new InputSource(new
FileInputStream("/home/langisch/tmp/ICHAGCompany.xml")));

But after parsing the deser.getValue object is not filled with the
values from xml-file.

Any ideas why this code doesn't work??? Thanks

Yves



Yves Langisch wrote:
> Hi
>
> I have a document style web service and at the moment I'm writing some
> test cases for it. I now have created some testdata xml-files. These
> files contain exactly the body from the soap message. Now I'm looking
> for a way to 'deserialize' these files to get the object structure (the
> thing axis is doing in the skeleton when receiving a client request). Is
> there a way to force this manually with a file?
>
> Any ideas? Thanks
> Yves
>
>




De informatie verzonden met dit e-mail bericht is uitsluitend bestemd voor de 
geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking 
van deze informatie aan derden is niet toegestaan.  Indien dit bericht niet voor u 
bestemd is, verzoeken wij u vriendelijk dit bericht te retourneren zodat dit in de 
toekomst kan worden voorkomen. Ondanks het feit dat IZA Nederland al haar e-mail 
berichten controleert op virussen, staat zij niet in voor het virusvrij verzenden c.q. 
ontvangen van deze berichten.

Reply via email to