wood burning stoves 2.0*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "MarshallableObject for java 6 version" Watch "MarshallableObject for java 6 version" New topic
Author

MarshallableObject for java 6 version

Allan Kuruvila
Greenhorn

Joined: Mar 16, 2010
Posts: 4
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:



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: http://aspose.com/file-tools
 
subject: MarshallableObject for java 6 version