--- Begin Message ---
Hey,
 
I've fixed it by instantiating the Unmarshalling with the class I'm 
unmarshalling to..
 
new Unmarshaller( TestSuite.class );
 
Not quite sure why this works though? Is it because the Unmarshaller 
classloader has no idea about outside objects?

________________________________

From: Matthew Shaw [mailto:[EMAIL PROTECTED]
Sent: Thu 2/8/2007 10:05 PM
To: [email protected]
Subject: [castor-user] RE: unmarhsalling query


Hi Werner,
 
it's a standalone application.
 
Yes I've tried setting the classloader on the unmarshaller this is the code:
 
FileEditorInput fileEditorInput = ((FileEditorInput)getEditorInput());

BufferedReader br = new BufferedReader(new 
FileReader(fileEditorInput.getFile().getName()));

Unmarshaller unmarshaller = new Unmarshaller();

unmarshaller.setClassLoader(this.getClass().getClassLoader());

testSuite = (TestSuite) unmarshaller.unmarshal(br);

 

Am I doing this right?

This correspondence is for the named persons only. 
It may contain confidential or privileged information or both. 
No confidentiality or privilege is waived or lost by any mis transmission. 
If you receive this correspondence in error please delete it from your system 
immediately and notify the sender. 
You must not disclose, copy or relay on any part of this correspondence, if you 
are not the intended recipient. 
Any opinions expressed in this message are those of the individual sender 
except where the sender expressly, 
and with the authority, states them to be the opinions of the Department of 
Emergency Services, Queensland.
        

<<winmail.dat>>


--- End Message ---
This correspondence is for the named persons only. 
It may contain confidential or privileged information or both. 
No confidentiality or privilege is waived or lost by any mis transmission. 
If you receive this correspondence in error please delete it from your system 
immediately and notify the sender. 
You must not disclose, copy or relay on any part of this correspondence, if you 
are not the intended recipient. 
Any opinions expressed in this message are those of the individual sender 
except where the sender expressly, 
and with the authority, states them to be the opinions of the Department of 
Emergency Services, Queensland.
---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to