|Re: EMF Serialization Problem [message #423897 is a reply to message #423891]
||Thu, 09 October 2008 10:34
| Ed Merks
Registered: July 2009
Kamesh Sampath wrote:
> Thanks for the reponse. I do understand your info with respect to
> creating and reading the EMF resource. I was trying to simulate the
> error I was getting when i was using EMF with OAW . My Model gets
> seralized as XML with custom metadata information, when that model is
> loaded using the OAW workflow, I get the same error , hence i tried to
> do the same with the *Example class generated by the EMF plugin and
> got the same error. Still wondering what I am missing which causes
> this error. I added the XSI and other schema information but still get
> the same error.
Is the workflow running as a stand alone process as opposed to started
as an OSGi application? In that case no plugin registration takes
places and hence registrations of which factories are associated with
which file extensions are likely to be missing.
> Any pointers in this regard will help me.
> Also whats the difference between the XMLResource. OPTION_SCHEMA_LOCATION
It tells it to write a schema location if the ePackage.nsURI() is
different from ePackage.eResource().getURI().
> and XMLResource.OPTION_SCHEMA_LOCATION_IMPLEMENTATION
Rather than write out the location URI, it writes out the name of the
EPackage's generated interface, e.g, java:org.example.XyzPackage (or
something like that).
> , when i used the former i dont see the schema location attached to
> the serailized model
By default for generated models, the package's nsURI and the package's
resource's URI are the same.
> but when I use the later then i could see the SCHEMA_LOCATION in my
> seralized file.
I don't think this will solve the problem. For a model based on an XML
Schema, it's important that an XMLResourceImpl configured with options
like what you see in your generated XyzResourceFactoryImpl as used.
> Will this help me in resolving the classnotfound error or anyother
> global change will resolve the error ?
No. Try to find out from the oAW folks how you're suppose to be able to
ensure that your resource factory registrations will be taken into
account. I'll try to ask about these issues when I get a chance to talk
with them next week...
Powered by FUDForum
. Page generated in 0.02057 seconds