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