I'm currently working on the a Flight API integration on my company platform and I'm facing some issues.
I need to use a data binding plugin in order to generate Java classes based on the provided XSD files. Nevertheless, I have tried many plugins such as ADB, CXF or JIBX and I got binding errors with all of them.
I have been able to fix these errors by modifying the XSDs in order to "eliminate" the errors but I think I'll get issues later due to these changes.
So my question is quite simple, has anybody of you been able to find a good plugin which is able to handle the XSDs ?
Thanks !
You need to use JAXB to generate java classes from XML schema ,please check this SO question .
If you want specific plugin for your IDE please check this for IntelliJ IDEA and Eclipse.
Related
I am trying to write a standalone Java application in IntelliJ using edu.stanford.nlp.trees.GrammaticalStructure. Therefore, I have imported the module:
import edu.stanford.nlp.trees.GrammaticalStructure;
Currently, Intellij doesn't recognize this and many others of the imported external libraries (cannot resolve the symbols) and is also not able to automatically download/import them.
Is there a way to use the GrammaticalStructure class without having to download the entire Stanford CoreNLP .jar and adding it to the project as a library? This question applies to other dependencies as well, since I want to use other external libraries but avoid including their .jar files as much as possible (to minimize the size of the final application, given that it will be standalone). Unfortunately, all the solutions I have found proposed exactly that.
Apologies if I have overlooked some basic setting or setup steps, it has been a while since I have worked with Java.
Any help is greatly appreciated.
If you want to use it means you want to execute the code in them. How is the runtime supposed to execute code that is does not have? How is the compiler supposed to know how the code is defined (e.g. what the classes look like)? This is simply impossible. If you want to use the code you have to provide it to the compiler as well as the runtime.
If you just dont want to include all of that code into your application, you need either access to the sources and just pick the class you need or you need some kind of JAR minimizer as #CrazyCoder suggested.
I originally was looking at this answer to create charts in Powerpoint and had an additional question as below:
Thanks for the above. Your example standalone works fine for me and I see the generated PPTX file ok. But when I try integrate it into my proper application I see the below exception at runtime.
Schemas (.xsb) for CTTable can't be loaded - usually this happens when
OSGI loading is used and the thread context classloader has no
reference to the xmlbeans classes - use
POIXMLTypeLoader.setClassLoader() to set the loader, e.g. with
CTTable.class.getClassLoader()*
When I googled I found mention of this issue: It shows in the code this comment:
// Pesky XmlBeans bug - see Bugzilla #49934
// it never happens when using the full ooxml-schemas jar but may happen with the abridged poi-ooxml-schemas
Did you have any similiar issues to this? Can you tell me what versions of "poi-ooxml" (I'm using v3.17) and "poi" (I'm using v3.17) your using, or indeed share your pom.xml would be great.
If anyone could give any guidance, that would be great.
Thanks - Ro
Hi I'm trying to find a way to create birt reports with datasets based on a hibernate data source. However, I downloaded eclipse report designer and related plugins, but can't seem to find an option for hibernate data source. Was this functionality taken out?
I have gone through a couple of links and either they are old libraries or the integration is done via seam. The only reasonable examples i found are using Scripted data source to access hibernate POJOs. But nothing on how to access hibernate entities directly from the report at least in the latest versions of birt.
Or is there something that I'm missing?
You can check my approach based on POJO data source (without using scripting data source). I finally found some time today to describe it here.
I tried to use CEDET to get auto completion in Emacs and that works fine for C/C++. But I cannot find anything about how to use CEDET with Java without the help of JDEE, which is thought out of date and not compatible to CEDET 1.1. I got a tags file using utility found here but I don't know how to integrate that into CEDET system. According to CEDET's website, that's possible. But they don't explain how to do it. Is there someone willing to answer this question?
Here is some sample of the tags file generated by that utility:
java.applet.Applet$AccessibleApplet
protected java.applet.Applet$AccessibleApplet(java.applet.Applet)
public java.applet.Applet$AccessibleApplet.getAccessibleRole() returns javax.accessibility.AccessibleRole
public java.applet.Applet$AccessibleApplet.getAccessibleStateSet() returns javax.accessibility.AccessibleStateSet
It is possible to have CEDET pull in tags from a .jar file. It works by using javap to extract the tags in text form, and then it parses that data.
It isn't very easy to set up since in CEDET, the concept of where to find your library files is part of EDE, the project management system, not the parser and smart completion system. The only Java based project supported in CEDET 1.1 is Android.
The basics is to first enable the javap database by loading it with (require 'semanticdb-javap) in CEDET 1.1, or (require 'semantic/db-javap) in the bzr version of CEDET.
Once you've done that, you can configure it via the cedet-java-classpath-extension. I'm a little fuzzy on the details of what happens next, but folks have reported success on the mailing list.
If you use CEDET from the bzr repository, there is the ede-java-root project, which is similar to the ede-cpp-root project. That project type lets you configure what your library path is. The doc for that is in the ede/java-root.el file with the project type, and shows you the basics of how to use it.
i am working on Jaxb 2.x and able to unmarshel XML doc in to Java component but when i am trying to create schema from my existing java classes its not working.
i have gone through the various site with the help of Google but till now not able to get success,if any one have used this functionality in the past or using it can help me how to achieve this.
Thanks in advance
Here is an example of generating an XML schema from Java classes:
http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JAXB/GenerateSchema
After long try i am able to generate XSD based on POJO using JAXB schemagen.In my main class based on which i was trying to generate XSD was refereeing some other classes which was in other packages and i was not able to figure it out how to set class path for these classes but on removing those references was able to get schemagen working will explore now how to set class path for schemagen