File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes MarshallableObject for java 6 version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "MarshallableObject for java 6 version" Watch "MarshallableObject for java 6 version" New topic

MarshallableObject for java 6 version

Allan Kuruvila

Joined: Mar 16, 2010
Posts: 4

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:

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.

The error mesage that i am getting is " the method scanner is undefined for the type Unmarshaller" and similarly for others.

In java 6, Marshaller is an interface, but i went through a site, which showed Marshaller as a class. Here the link for both

Marshaller Class= (Marshaller Class)

Marshaller interface - (Interface Marshaller)

Heres the link for MarshallableObject which has both marshal and Unmarshal Methods

MarshallableObject Class : Class MarshallableObject

I agree. Here's the link:
subject: MarshallableObject for java 6 version
It's not a secret anymore!