Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors using this repository alongside the FIXTradingCommunity/orchestrations repository #17

Open
aligirayhanozbay-abex opened this issue Jul 17, 2023 · 1 comment

Comments

@aligirayhanozbay-abex
Copy link

Hi, I'm experimenting with using this repository alongside the FIX standard orchestration files in the orchestrations repository to generate proto3 files. When I try to run for instance

java -jar target/orchestra2proto-jar-with-dependencies.jar  -lang proto3 ~/orchestrations/FIX\ Standard/OrchestraFIXLatest.xml

I get the following error:

Exception in thread "main" java.lang.RuntimeException: XML Validation Exception: unexpected element (uri:"http://fixprotocol.io/2022/orchestra/appinfo/fixml", local:"FIXMLencodingType"). Expected elements are <{}text> at row: 20 column: 62
        at io.fixprotocol.orchestra2proto.JAXBValidator.handleEvent(JAXBValidator.java:30)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:704)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:232)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:227)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:94)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:75)
        at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:238)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:544)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:526)
        at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:138)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:228)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:199)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:170)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:209)
        at io.fixprotocol.orchestra2proto.ProtoGen.generateProtos(ProtoGen.java:55)
        at io.fixprotocol.orchestra2proto.ProtoGen.main(ProtoGen.java:165)

Are there some other steps I need to follow for this to work?

@kleihan
Copy link
Member

kleihan commented Jul 17, 2023

You can try to remove the appinfo elements for FIXML with a script. They are only needed internally by FIX to create the FIXML schemas from an Orchestra XML files. It seems that the protobuf converter does not ignore them (yet). There is no schema for the appinfo content to validate against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants