I'm trying to do it quickly with java - get CopyBook file,
and generate xsd from this CopyBook.
(I know there are some open source projects to create xml from cb,
but unfortunately, thay generate xml with items and lot of tags and attributes, and it's not XSD as
well, unfortunately)
Any help will be appreciated.
Thanks.
This might fullfill your requirments:-
cobol to xml convertor
No personal experience with this tool though.
There is no open source, Java based project, that will do this for you, as far as I know. If you need to do this on a recurrent basis, then the solution would be for you to write some Java code to generate an XSD from the metadata you've collected with the XML (there's a good SourceForge cb2xml project, if I recall).
If this is for just one time, then I suggest you download the eval version of QTAssistant (I am associated with it); there's a COBOL to XML Schema tool which will do it for you (under the Tools tab, the Enterprise Toolbox group).
There may be a couple of things that could require tweaking your COBOL copybook, depending on how you've got it - nothing different than what you would need to do when using a tool like IBM's Rational Application Developer and such to generate Java beans from a COBOL copybook.
If you get stuck, please send an email to the support address on the site.
Related
Calling to some previous experience in taming text files. My requirements is to parse some unformatted text files.
I see older questions on these topics but didn't found one targeting my concern. I know it can be done in any of the tools I have mentioned, more or less easily , with pros and cons.
What I'm asking for, is recommendation from your experiences in the context of an deployed WAR so I will let the best tool do the job.
So what is to be done ? There it is :
In an plain JEE war app (java 8)
For all unformatted files under DIRTOPARSE
read the file until you enconter this < PARSE > tag (the only formatted contents [as -quite- well formed xml] in the files.
take everything between < PARSE > and < /PARSE >
bring it into a xml document
then from there there will be some processing to populate part of an plain JEE WAR application (can be jaxb or something like that, I didn't decided yet for that part as it will the easiest part of the job)
I'm calling to some experience because the files can be(quite) huge and I'm concerned about the most efficient ways to handle such requirements as Java is not with good reputation as a tool for large text handling... should I use another jvm dialect (Groovy?) or should I go and do all the text parts (steps 1 to 4) under some Linux tools (which really have the good reputation or such things) bash, grep, awk, perl?
Based on your help, I will test and pseudo-benchmark to select what seems to fit.
I am software written in Java which read an external XML file (let's call it "datasource.xml").
This file contains different information and this information are extracted using XPath queries.
The fact is that, according to what kind of information is extracted from that file (datasource.xml) a different work flow is needed. At the moment workflows are "hard coded" in my Java classes but I want to make my software indipedent so that it can work with any datasource.xml, no matter of its structure. But of course I have to specify somewhere how to deal with the extracted data. I was thinking to use (again) JAXB and specify inside the XML file (and from its XSD I will create JAXB classes) the kind of workflow is needed.
Could it be a good solution??
Thanks
have you checked out Drools (a project from JBoss) very easy to learn & is an excellent workflow tool.
building your own workflow engine is quite complex & there are a lot of considerations to be taken into account.
You can think of using activiti, Another workflow solution. It has APIs available and can be used as a workflow service layer in your application.
Like others, I think you will be better off using a higher-level tool for this rather than hand-coding the logic in Java. Take a look at XProc (for example the Calabash implementation), or Orbeon, or Cocoon. They all have a learning curve associated with them, but once mastered, you will have a much more flexible architecture than with hard-coded Java logic.
What are some ways to create PDF reports in a Java server environment without having to use Java code to do so. Or maybe minimal Java code?
We have used iText and various htmltopdf solutions. Those work, but they take a lot of Java code create the documents and you have to code the positioning of all the elements?
Is there a solution that has a a designer tool? You design a report template with the designer and then deploy the template on a server?
We could pay for an enterprise solution.
You might be interested in JasperReports and iReport (which is sort of a designer IDE for JasperReports).
You can use JCopist to generate PDFs using FreeMarker templates rather than writing Java code. Another option that is mostly suitable to JSF-based projects, is to use JBoss Seam's iText-based template-based PDF generation tools: http://docs.jboss.org/seam/1.1.1.GA/reference/en/html/itext.html
You don't say if you're prepared to pay for an enterprise solution. If you are, then Thunderhead may be an option. It provides the means for templates (as you've specified) and can generate documents off the back of these in a variety of formats. You can interface to it via a variety of means (JMS / WebService / COM - not sure about the COM, on reflection). It has ActiveX controls to allow users to edit templates (with appropriate and fine-grained permissioning) and the template editing resembles a Word-based editor. It's very powerful indeed.
You should look at Docmosis. It uses standard word or openoffice documents as templates - so you design your document in a normal word processor. Depending on what you want to do in your templates this can be an ideal way to build reports since most developers (and users) already know how to work with word processors. You can then have Docmosis manipulate the document, merge in data and produce various formats. Have a look at the demo on the website.
Does anybody know of GUIs for generating XMLs? This means the user will not be presented with an IDE with support for XML for him to type XML codes. This would be helpful for non-technical people using the system.
I know this sounds easy, given many libraries that can help in generating XMLs. The issue here is that the schema is really that flexible rather than being straightforward like representing books in a library with their properties.
Imagine HTML, where we can create font tags inside a body, a table, a div, or nested even within itself. The solution is a WYSIWYG application that allows user to generate html codes (XML). However, that is good for XML applied in webpages since they involve visual aspect and design. My application of XML would focus on representing some conceptual and computational definitions, much like sql-like syntax, but more than that.
I'm actually after the approach or previous works done or tried, although having a library/working framework for that would be better. Btw, I'm using Java for this project. Currently, I'm just thinking of presenting element tags where user will be able to drag and drop them and nest them with each other. And perhaps, assist them through forms in inputing values for XML attributes. I'm still hoping if there are better ideas from the community.
Thank you.
I think you need to separate the eventual representation (XML) from the abstraction presented to your users. Is your information presented to the user in tree form? If not, do what is convenient for the users and sweat the XML conversion yourself.
There are many tree-based editors that use "meaningful tiles and icons" instead of XML. For example, look at how Eclipse's plug-in editor does the extension of existing points. You get a tree view and can add properties (typically in a separate group box). But you could write a smarter editor that has everything in the tree.
On the other hand, sometimes the XML representation should really be hidden despite its flexibility. A good example is the plugin.xml for Eclipse-plugins. Look at how the editor for that file looks nothing like XML. It is structured logically for the needs of the user, and the code in the background generates the XML.
I looked for this exact thing a couple of months ago. The only one I found was at http://www.jaxfront.org/pages/. It is Java based.
Note that I ended up going with Actipro Software's SyntaxEditor for .NET WinForms which, although does not give me a GUI, gives the app good IntelliSense-like prompting (derived from an underlying XSD) when editing XML.
The W3C answer to your question is XForms. Unfortunately XForms is not directly supported by browsers, although there is a Mozilla plug-in (show and edit even local files, but only in Mozilla). Many XForms solutions are available, an interesting and free one is XSLTForms (http://sourceforge.net/projects/xsltforms/) which translates XForms into HTML Forms (works with every major browser, but local files can only be shown, not edited due to the limitations of Javascript).
Also take a look on Altova Authentic.
I know it is sometimes hard for non technical people to get familiar with a tool like eclipse, but it comes with very good and easy to use XML editors. Supporting auto-completion, validation, verification. I am not sure if there is a pre configured eclipse derivate which is focused on xml editing, but you could configure such a thing quite easily.
I'm trying to build a web portal in Java that supports incremental changes to an XML document. I really like the diffgram technology in .Net, but I must use Java for this project. Is there a Java library that can modify an XML document object using diffgrams? We will likely be using JAXB, but I can always marshal data to build the original XML document.
I don't know anything like this in Java, at least, not based on diffgram. Maybe have a look at Open Source XML Diff Written in Java for xml diff solutions in Java. Or Google for more alternatives.
Actually, this project looks interesting: fc-xmldiff (Fuego Core XML Diff and Patch Tool). Never tested personally though.