Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Package with uri 'null' not found
Package with uri 'null' not found [message #1724957] Sat, 27 February 2016 22:26 Go to next message
Lenny Glassmann is currently offline Lenny GlassmannFriend
Messages: 2
Registered: February 2016
Junior Member
I know this question has been asked and answered before, but none of the suggestions are working for me.

Let my start by describing the problem I'm trying to solve:

I need to transform messages that are in a protocol called FIX to another protocol. The package QuickFIX/J comes with an XML file that is referred to as a data dictionary, which partially describes FIX messages. It describes the valid fields and values that can be transmitted. There are actually multiple data dictionary files, each of which describes slight variations on the FIX protocol.

The data dictionary file does not have an XSD, and does not use namespaces. I can't change that.

So I thought I could use EMF and ATL to help me with the message transformation. My first step was to build a meta model in EMF, describing the XML data dictionaries. Then I generated the model using genmodel.

I've written a small main program that's trying to read an XML data dictionary, and I'm getting "Package with uri 'null' not found" when trying to parse the first tag. I'm assuming that this is because the XML file does not use namespaces. I've associated XMLResourceFactoryImpl with the "xml" extension. I also tried running the generated example main and got the same error.

My first question, is whether I'm trying to do something reasonable. Is EMF capable of loading this file?

The second question, of course, is how to get past this namespace issue.

Thanks
Re: Package with uri 'null' not found [message #1724965 is a reply to message #1724957] Sun, 28 February 2016 08:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Lenny,

I would suggest writing a XML Schema for the XML and converting that to
an Ecore model. Then you'll see exactly what the generated resource
factory looks like for an schema without a namespace and what
annotations are on the Ecore model for it. A hand written Ecore model
will need exactly those same annotations, and will need a resource
factory exactly like that.


On 28.02.2016 05:27, Lenny Glassmann wrote:
> I know this question has been asked and answered before, but none of
> the suggestions are working for me.
>
> Let my start by describing the problem I'm trying to solve:
>
> I need to transform messages that are in a protocol called FIX to
> another protocol. The package QuickFIX/J comes with an XML file that
> is referred to as a data dictionary, which partially describes FIX
> messages. It describes the valid fields and values that can be
> transmitted. There are actually multiple data dictionary files, each
> of which describes slight variations on the FIX protocol.
>
> The data dictionary file does not have an XSD, and does not use
> namespaces. I can't change that.
>
> So I thought I could use EMF and ATL to help me with the message
> transformation. My first step was to build a meta model in EMF,
> describing the XML data dictionaries. Then I generated the model
> using genmodel.
>
> I've written a small main program that's trying to read an XML data
> dictionary, and I'm getting "Package with uri 'null' not found" when
> trying to parse the first tag. I'm assuming that this is because the
> XML file does not use namespaces. I've associated
> XMLResourceFactoryImpl with the "xml" extension. I also tried running
> the generated example main and got the same error.
> My first question, is whether I'm trying to do something reasonable.
> Is EMF capable of loading this file?
>
> The second question, of course, is how to get past this namespace issue.
>
> Thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package with uri 'null' not found [message #1724987 is a reply to message #1724957] Sun, 28 February 2016 17:37 Go to previous message
Lenny Glassmann is currently offline Lenny GlassmannFriend
Messages: 2
Registered: February 2016
Junior Member
I was avoiding that because I thought I'd have to hand-write the xsd, which sounded like a lot of work. Then I realized that there are XML-to-XSD generators. I used the one that comes with MS Visual Studio because I already had it installed.

That seems to have done the trick. The generated model is able to parse my XML file. There are a lot of annotations on the Ecore model that I never would have figured out on my own.
Previous Topic:[CDO] Support for XMI files?
Next Topic:Using EObject.eGet to retrieve the value of EReference feature
Goto Forum:
  


Current Time: Thu Apr 25 15:00:04 GMT 2024

Powered by FUDForum. Page generated in 0.03198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top