Hi
I do have a project which which has been using jre1.5.0_06 from the past few years. But now i would like to upgrade it to jre1.6.0_20. When i do the upgradation, i do get an error for the Class MarshallableObject ( i didnt get any error when i was using jre1.5.0_06 ).
Now MarshallableObject class has two methods as shown below
marshal(Marshaller m)
unmarshal(Unmarshaller u)
Detail usage of the above methods in my project is as below:
public void marshal(Marshaller m) throws IOException { XMLWriter w = m.writer(); w.start("AT"); w.attribute("N", _N.toString()); w.attribute("V", _V.toString()); w.end("AT"); } public void unmarshal(Unmarshaller u) throws UnmarshalException { XMLScanner xs = u.scanner(); Validator v = u.validator(); xs.takeStart("AT"); while (xs.atAttribute()) { String an = xs.takeAttributeName(); if (an.equals("N")) { if (_N != null) { throw new DuplicateAttributeException(an); } _N = xs.takeAttributeValue(); continue; } if (an.equals("V")) { if (_V != null) { throw new DuplicateAttributeException(an); } _V = xs.takeAttributeValue(); continue; } throw new InvalidAttributeException(an); } xs.takeEnd("AT"); }
Now the following piece of code
1) XMLWriter w = m.writer();
2) XMLScanner xs = u.scanner();
3) Validator v = u.validator();
doesnt pose a problem with jre1.5.0_06 , but when i use jre1.6.0_20, the method writer, scanner, validator doesnt seem to exists for Marshaller and UnMarshaller class.
I checked the api documentation. The methods do exists for both the classes.
Is it that the respective methods are not included in java 6?? Is there any replacement methods for these???Couldnt find any related matter.
any help would be appreciated.