Package with uri 'null' not found [message #1724957] |
Sat, 27 February 2016 22:26 |
Lenny Glassmann 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 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03198 seconds