Search Results

Search found 252 results on 11 pages for 'jaxb'.

Page 1/11 | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • How to Customize JAXB Marshalling if generating JAXB beans from XML

    - by Charles O.
    Hello, I want to customize the marshalling of dates in JAXB. It's a variant of this already asked question. I would think I would use an XMLAdapter, as this answer questions specifies. But I can't do that exactly, because I'm going the other way around, generating the JAXB beans from an .XSD -- I can't add annotations to the JAXB beans because they are generated code. I've tried calling Marshaller.setAdapter(), but with no luck. final Marshaller marshaller = getJaxbContext().createMarshaller(); marshaller.setSchema(kniSchema); marshaller.setAdapter(new DateAdapter()); ... private static class DateAdapter extends XmlAdapter<String, XMLGregorianCalendar> { @Override public String marshal(XMLGregorianCalendar v) throws Exception { return "hello"; //Just a test to see if it's working } @Override public XMLGregorianCalendar unmarshal(String v) throws Exception { return null; // Don't care about this for now } } Where the relevant part of my generated JAXB bean looks like this: @XmlSchemaType(name = "date") protected XMLGregorianCalendar activeSince; When I do this, what the default date/XMLGregorianCalendar marshalling happens. It's as if I didn't do it all. Any help is appreciated. Thanks, Charles

    Read the article

  • Set the JAXB context factory initialization class to be used

    - by user1902288
    I have updated our projects (Java EE based running on Websphere 8.5) to use a new release of a company internal framework (and Ejb 3.x deployment descriptors rather than the 2.x ones). Since then my integration Tests fail with the following exception: [java.lang.ClassNotFoundException: com.ibm.xml.xlxp2.jaxb.JAXBContextFactory] I can build the application with the previous framework release and everything works fine. While debugging i noticed that within the ContextFinder (javax.xml.bind) there are two different behaviours: Previous Version (Everything works just fine): None of the different places brings up a factory class so the default factory class gets loaded which is com.sun.xml.internal.bind.v2.ContextFactory (defined as String constant within the class). Upgraded Version (ClassNotFound): There is a resource "META-INF/services/javax.xml.bind.JAXBContext" beeing loaded successfully and the first line read makes the ContextFinder attempt to load "com.ibm.xml.xlxp2.jaxb.JAXBContextFactory" which causes the error. I now have two questions: What sort is that resource? Because inside our EAR there is two WARs and none of those two contains a folder services in its META-INF directory. Where could that value be from otherwise? Because a filediff showed me no new or changed properties files. No need to say i am going to read all about the JAXB configuration possibilities but if you have first insights on what could have gone wrong or help me out with that resource (is it a real file i have to look for?) id appreciate a lot. Many Thanks! EDIT (according to comments Input/Questions): Out of curiosity, does your framework include JAXB JARs? Did the old version of your framework include jaxb.properties? Indeed (i am a bit surprised) the framework has a customized eclipselink-2.4.1-.jar inside the EAR that includes both a JAXB implementation and a jaxb.properties file that shows the following entry in both versions (the one that finds the factory as well as in the one that throws the exception): javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory I think this is has nothing to do with the current issue since the jar stayed exactly the same in both EARs (the one that runs/ the one with the expection) It's also not clear to me why the old version of the framework was ever selecting the com.sun implementation There is a class javax.xml.bind.ContextFinder which is responsible for initializing the JAXBContextFactory. This class searches various placess for the existance of a jaxb.properties file or a "javax.xml.bind.JAXBContext" resource. If ALL of those places dont show up which Context Factory to use there is a deault factory loaded which is hardcoded in the class itself: private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.internal.bind.v2.ContextFactory"; Now back to my problem: Building with the previous version of the framework (and EJB 2.x deployment descriptors) everything works fine). While debugging i can see that there is no configuration found and thatfore above mentioned default factory is loaded. Building with the new version of the framework (and EJB 3.x deployment descriptors so i can deploy) ONLY A TESTCASE fails but the rest of the functionality works (like i can send requests to our webservice and they dont trigger any errors). While debugging i can see that there is a configuration found. This resource is named "META-INF/services/javax.xml.bind.JAXBContext". Here are the most important lines of how this resource leads to the attempt to load 'com.ibm.xml.xlxp2.jaxb.JAXBContextFactory' which then throws the ClassNotFoundException. This is simplified source of the mentioned javax.xml.bind.ContextFinder class: URL resourceURL = ClassLoader.getSystemResource("META-INF/services/javax.xml.bind.JAXBContext"); BufferedReader r = new BufferedReader(new InputStreamReader(resourceURL.openStream(), "UTF-8")); String factoryClassName = r.readLine().trim(); The field factoryClassName now has the value 'com.ibm.xml.xlxp2.jaxb.JAXBContextFactory' (The day i understand how to format source code on stackoverflow will be my biggest step ahead.... sorry for the formatting after 20 mins it still looks the same :() Because this has become a super lager question i will also add a bounty :)

    Read the article

  • tomcat JAXB 1 and 2 linkageerror

    - by Alex
    Hi there, I'm running a tomcat 6, spring, apache cxf webservice, know it is a must to add one third party library to my webapp to fulfill an order. I have jaxb-impl-2.1.12.jar for apache cxf in WEB-INF/lib folder and the new library which contains the JAXB 1.0 runtime. JAXB 2 ist used by apache cxf for dynamic clients (i need them). So is there a possibility to run the webapps with both libraries? Best regards Alex Caused by: java.lang.LinkageError: You are trying to run JAXB 2.0 runtime but you have old JAXB 1.0 runtime earlier in the classpath. Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.

    Read the article

  • Tomcat JAXB 1 and 2 linkage error

    - by Alex
    I'm running a tomcat 6, spring, apache cxf webservice, know it is a must to add one third party library to my webapp to fulfill an order. I have jaxb-impl-2.1.12.jar for apache cxf in WEB-INF/lib folder and the new library which contains the JAXB 1.0 runtime. JAXB 2 ist used by apache cxf for dynamic clients (i need them). So is there a possibility to run the webapps with both libraries? Error: Caused by: java.lang.LinkageError: You are trying to run JAXB 2.0 runtime but you have old JAXB 1.0 runtime earlier in the classpath. Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.

    Read the article

  • Generating Java classes out of XMLSchema.xsd using JAXB

    - by Christian Schulz
    I'm using jaxb to generate java classes out of a xml schema. The schema imports XMLSchema.xsd and its content is used as an element in the document. If I remove the import and the reference to "xsd:schema" respectively then the binding compiler generates successfully the classes. If I do not then it would produce the following errors, which are the same if I would try to generate Java classes from the XMLSchema.xsd only! C:\Users\me"%JAXB%/xjc" -extension -d tmp/uisocketdesc -p uis.jaxb uisocketdesc.xsd -b xml_binding_test.xml -b xml_binding_test_2.xml -b xml_binding_test_3.xml parsing a schema... compiling a schema... [ERROR] A class/interface with the same name "uis.jaxb.ComplexType" is already in use. Use a class customization to resolve this conflict. line 612 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "ComplexType" is generated from here. line 440 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] A class/interface with the same name "uis.jaxb.Attribute" is already in use. Use a class customization to resolve this conflict. line 364 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "Attribute" is generated from here. line 1020 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] A class/interface with the same name "uis.jaxb.SimpleType" is already in use. Use a class customization to resolve this conflict. line 2278 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "SimpleType" is generated from here. line 2222 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] A class/interface with the same name "uis.jaxb.Group" is already in use. Use a class customization to resolve this conflict. line 930 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "Group" is generated from here. line 727 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] A class/interface with the same name "uis.jaxb.AttributeGroup" is already in use. Use a class customization to resolve this conflict. line 1062 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "AttributeGroup" is generated from here. line 1026 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] A class/interface with the same name "uis.jaxb.Element" is already in use. Use a class customization to resolve this conflict. line 721 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Relevant to above error) another "Element" is generated from here. line 647 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1020 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 364 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 2278 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 2222 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 930 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 727 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 440 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 612 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1026 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 1062 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] Two declarations cause a collision in the ObjectFactory class. line 647 of "http://www.w3.org/2001/XMLSchema.xsd" [ERROR] (Related to above error) This is the other declaration. line 721 of "http://www.w3.org/2001/XMLSchema.xsd" Failed to produce code.

    Read the article

  • Validation using JAXB and Stax to marshal XML document

    - by bajafresh4life
    I have created an XML schema (foo.xsd) and used xjc to create my binding classes for JAXB. Let's say the root element is "collection" and I am writing N "document" objects, which are complex types. Because I plan to write out large XML files, I am using Stax to write out the "collection" root element, and JAXB to marshal document subtrees using Marshaller.marshal(JAXBElement, XMLEventWriter). This is the approach recommended by jaxb's unofficial user's guide: https://jaxb.dev.java.net/guide/Different_ways_of_marshalling.html#Marshalling_into_a_subtree My question is, how can I validate the XML while it's being marshalled? If I bind a schema to the JAXB marshaller (using Marshaller.setSchema()), I get validation errors because I am only marshalling a subtree (it's complaining that it's not seeing the "collection" root element"). I suppose what I really want to do is bind a schema to the Stax XMLEventWriter or something like that. Any comments on this overall approach would be helpful. Basically I want to be able to use JAXB to marshal and unmarshal large XML documents without running out of memory, so if there's a better way to do this let me know.

    Read the article

  • Difference of maven jaxb plugins

    - by cuh
    I have determined that two jaxb plugin for maven2 exist, with some different configurations. The one is from Sun: http://jaxb.dev.java.net/jaxb-maven2-plugin/ the other from Mojo: http://mojo.codehaus.org/jaxb2-maven-plugin/ Has anybody experience with these two plugins, and give a recommendation? Thanks Matt. On my little research project, i found that there's quit another plugin comming from the sunners: <groupId>com.sun.tools.xjc.maven2</groupId> <artifactId>maven-jaxb-plugin</artifactId> and that one: <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> and still the one from Codehouse.

    Read the article

  • JAXB boolean handling oddities and JSF

    - by finrod
    There is a known bug in JAXB: https://jaxb.dev.java.net/issues/show_bug.cgi?id=733 JAXB does not properly generate boolean field getters and setters, this bug is left unfixed for backwards compatibility. A JAXB plugin exists and will ensure that the following getters and setters for boolean fields are generated: setXXX(Boolean value) is generated getXXX() is generated If the boolean attribute specifies default value in the XSD, then getXXX() returns boolean, If the boolean attribute does not specify default in the XSD, then getXXX() returns Boolean. Problem: trying to edit/view the XXX field in a JSF component (such as checkbox) does not work - the component is disabled. I have not traced this in depth but the assumption (backed by the workaround below) is that JSF EL resolver (or whathaveyou) looks for Boolean getXXX() method and since it does not find it, the component is disabled. Workaround: If I change the getXXX() method to always return Boolean, then everything goes. Questions: What are your ideas to address this problem? Have I missed some customization for the boolean-getter JAXB plugin? Is it possible (does it make sense) to alter JSF resolver (or whathaveyou) so that if Boolean getXXX() is not found, it will fall back to boolean getXXX()? I would prefer not to manually intervene and change all the generated getXXX() methods to return Boolean instead of boolean.

    Read the article

  • JAXB generate java class from xsd

    - by dell
    JAXB 1.5 installed under C:\Sun\jwsdp-1.5 J2SE 1.4.2 installed under C:\j2sdk1.4.2_08 copied sample.xsd file to C:\Sun\jwsdp-1.5\jaxb\bin went to C:\Sun\jwsdp-1.5\jaxb\bin and ran xjc.bat -p com.package sample.xsd got error message: Unrecognized option: -p Could not create the Java virtual machine. Please help me out, thanks a lot

    Read the article

  • JAXB - Beans to XSD or XSD to beans?

    - by bajafresh4life
    I have an existing data model. I would like to express this data model in terms of XML. It looks like I have two options if I'm to use JAXB: Create an XSD that mirrors my data model, and use xjc to create binding objects. Marshalling and unmarshalling will involve creating a "mapping" class that would take my existing data objects and map them to the objects that xjc created. For example, in my data model I have a Doc class, and JAXB would create another Doc class with basically the same exact fields, and I would have to map from my Doc class to xjc's Doc class. Annotate my existing data model with JAXB annotations, and use schemagen to generate an XSD from my annotated classes. I can see advantanges and disadvantages of both approaches. It seems that most people using JAXB start with the XSD file. It makes sense that the XSD should be the gold standard truth, since it expresses the data model in a truly cross-platform way. I'm inclined to start with the XSD first, but it seems icky that I have to write and maintain a separate mapping class that shuttles data in between my world and JAXB world. Any recommendations?

    Read the article

  • Should maven generate jaxb java code or just use java code from source control?

    - by Peter Turner
    We're trying to plan how to mash together a build server for our shiny new java backend. We use a lot of jaxb XSD code generation and I was getting into a heated argument with whoever cared that the build server should delete jaxb created structures that were checked in generate the code from XSD's use code generated from those XSD's Everyone else thought that it made more sense to just use the code they checked in (we check in the code generated from the XSD because Eclipse pretty much forces you to do this as far as I can tell). My only stale argument is in my reading of the Joel test is that making the build in one step means generating from the source code and the source code is not the java source, but the XSD's because if you're messing around with the generated code you're gonna get pinched eventually. So, given that we all agree (you may not agree) we should probably be checking in our generate java files, should we use them to generate our code or should we generate it using the XSD's?

    Read the article

  • Preventing Netbeans JAXB generation trashing classes

    - by Mac
    I'm developing a SOAP service using JAX-WS and JAXB under Netbeans 6.8, and getting a little frustrated with Netbeans trashing my work every time the XSD schema my JAXB bindings are based upon changes. To elaborate, the IDE automatically generates classes bound to the schema, which can then be (un)marshalled from/to XML using JAXB. To these classes I've added extra methods to (for example) convert to and from separate classes designed to be persisted to database with JPA. The problem is that whenever the schema changes and I rebuild, these classes are regenerated, and all my custom methods are deleted. I can manually replace them by copy-pasting from a backup file, but that is rather time-consuming and tedious. As I'm using an iterative design approach, the schema is changing rather frequently and I'm wasting an awful lot of time whenever it does, simply to reinstate my previous code. While the IDE automatically regenerating the JAXB-bound classes is entirely reasonable and I don't mean to imply otherwise, I was wondering if anyone had any bright ideas as to how to prevent my extra work having to be manually reinstated every time my schema changes?

    Read the article

  • Using JAXB to customise the generation of java enums

    - by belltower
    I'm using an external bindings file when using jaxb against an XML schema. I'm mostly using the bindings file to map from the XML schema primitives to my own types. This is a snippet of the bindings file <jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ai="http://java.sun.com/xml/ns/jaxb/xjc" extensionBindingPrefixes="ai"> <jxb:bindings schemaLocation="xsdurl" node="xs:schema"> <jxb:globalBindings> <jxb:javaType name="com.companyname.StringType" xmlType="xs:string" parseMethod="parse" printMethod="print" hasNsContext="true"> </jxb:javaType> </jxb:globalBindings> </jxb:bindings> </jxb:bindings> So whenever a xs:string is encountered, the com.companyname.StringType the methods print / parse are called for marshalling/unmarshalling etc. Now if JAXB encounters an xs:enumeration it will generate a java enum. For example: <xs:simpleType name="Address"> <xs:restriction base="xs:string"> <xs:enumeration value="ADDR"/> <xs:enumeration value="PBOX"/> </xs:restriction> </xs:simpleType> public enum Address { ADDR, PBOX, public String value() { return name(); } public static Address fromValue(String v) { return valueOf(v); } } Does anyone know if it is possible to customise the creation of an enum like it is for a primitive? I would like to be able to: Add a standard member variable / other methods to every enum generated by jaxb. Specify the static method used to create the enum.

    Read the article

  • Java/XML: Good "Stream-based" Alternative to JAXB?

    - by Jan
    Hello Experts, JAXB makes working with XML so much easier, but I have currently a big problem, that the documents I have to process are too large for an in memory unmarshalling that JAXB does. The data can be up to 4GB per document. The datastructure I will have to process is very simple and flat: With a root element and millions of “elements”… <root> <element> <sub>foo</sub> </element> <element> <sub>foo</sub> </element> </root> May questions are: Does JAXB maybe somehow support unmarshalling in a “streambased” way, that does not require to build the whole objecttree in memory but rather gives me some kind of “Iterator” to the elements, element by element? (Maybe I just missed that somehow…) If not what are your proposals for an good alternative with a a. “flat learningcurve, ideally very similar to JAXB b. AND VERY IMPORTANT: Ideally with the possibility / tool for the generation of the unarshaller code from an XSD file OR annotated Java Class 3.(I have searched SO and those to library that ended up on my “watchlist” (without comparing them closer) were Apache XML Beans and Xstream… What other libraries are maybe even better for the purpose and what are the disadvantages, adavangaes… Thank you very much!!! Jan

    Read the article

  • JAXB 'generateElementProperty' tag not having any effect.

    - by Sionide21
    I am trying to remove the JAXBElement wrapper from a field that was a substitution group in my schema. I have tried both <jaxb:globalBindings generateElementProperty="false"/> and <jaxb:globalBindings> <xjc:generateElementProperty>false</xjc:generateElementProperty> </jaxb:globalBindings> But in both cases it seems to be completely ignored. Is there a problem trying to use this for substitution groups or am I missing something?

    Read the article

  • JAXB: @XmlTransient on third-party or external super class

    - by Phil
    Hi, I need some help regarding the following issue with JAXB 2.1. Sample: I've created a SpecialPerson class that extends a abstract class Person. Now I want to transform my object structure into a XML schema using JAXB. Thereby I don't want the Person XML type to appear in my XML schema to keep the schema simple. Instead I want the fields of the Person class to appear in the SpecialPerson XML type. Normally I would add the annotation @XmlTransient on class level into the Person code. The problem is that Person is a third-party class and I have no possibility to add @XmlTransient here. How can I tell JAXB that it should ignore the Person class without annotating the class. Is it possible to configure this externally somehow? Have you had the same problem before? Any ideas what the best solution for this problem would be?

    Read the article

  • Format XML with JAXB during unmarshal

    - by Tobiask
    Hi there, I want to format a XML document during unmarshal with JAXB. Unmarshal looks like: Unmarshaller u = createAndsetUpUnmarshaller(enableValidation, evtHandler, clazz); return u.unmarshal(new ByteArrayInputStream(stringSource.getBytes())); While marshaling one can format the code via: marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); But this isn´t possible for the unmarchal process... Any idea how I can format the XML string with JAXB during (or after) unmarshal process? BTW: I read some posts here about pretty print, but I want to do it with JAXB!

    Read the article

  • JAXB, Netbeans and Interface Insertion Plugin

    - by segolas
    Hi, I can't get my generated classes to implements any interface. This is my xml schema file: xmlns:jxb="http://java.sun.com/xml/ns/jaxb/" xmlns:ai="http://jaxb.dev.java.net/plugin/if_insertion" jxb:extensionBindingPrefixes="ai" <xs:element name="header"> <xs:annotation> <xs:appinfo> <ai:interfaces check="1"> utility.RuleInterface </ai:interfaces> </xs:appinfo> </xs:annotation> <xs:complexType> bla bla bla </xs:complexType> I checked the "Extension" option in the JAXB options and I hav added the xjc-if-ins.jar to the "Libraries" section of my project Properties. But the generated Header class doesn't implements the utility.RuleInterface. I can figure out what am I doing wrong... Is it something missing? Any idea? regards, Segolas

    Read the article

  • JAXB Marshalling supply name space for root element dynamically

    - by Venkat
    I have to pass the namespace for root element dynamically while marshalling using jaxb (JAXB 2.1.10 - JDK 6). i will be using the genrated xml to call different webservices which is qualified with different namespaces but same input xml. here is my sample jaxb annotated class .....guide me with your valuable inputs. @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "taskName", "taskType" }) @XmlRootElement(name = "TaskRequest") public class TaskRequest { @XmlElement(name = "TaskName", required = true) protected String taskName; @XmlElement(name = "TaskType", required = true) protected String taskType; public String getTaskName() { return taskName; } public void setTaskName(String value) { this.taskName = value; } public String getTaskType() { return taskType; } public void setTaskType(String value) { this.taskType = value; } }

    Read the article

  • JAXB alternatives?

    - by mabuzer
    What's the best alternative for JAXB, keep in mind alternative need to do Validating, Marshalling, UnMarshalling, also generate classes of given xsd file as JAXB currently does. thanks in advance...

    Read the article

  • Getting Started with Maven + Jaxb project + IntellijIdea

    - by Em Ae
    I am complete new to IntellijIdea and i am looking for some step-by-step process to set up a basic project. My project depends on Maven + Jaxb classes so i need a Maven project so that when i compile this project, the JAXB Objects are generated by Maven plugins. Now i started like this I created a blank project say MaJa project Added Maven Module to it Added following settings in POM.XML <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>MaJa</groupId> <artifactId>MaJa</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <schemaDirectory>${basedir}/src/main/resource/api/MaJa</schemaDirectory> <packageName>com.rimt.shopping.api.web.ws.v1.model</packageName> <outputDirectory>${build.directory}</outputDirectory> </configuration> </plugin> </plugins> </build> </project> First of all, is it right settings ? I tried clicking on Make/Compile 'MaJa' from Project Right Click Menu and it didn't do anything. I will be looking forward to yoru replies.

    Read the article

  • Missing JAXB classes from XMLschema.xsd

    - by XLR
    Hi, I'm working on a xml schema resolver and I'm using JAXB with XMLSchema.xsd. I experience problems with JAXB, because I don't get classes for all the top level elements. For example for <xs:element name="maxLength" id="maxLength" type="xs:numFacet"> I do not get a class MaxLength or anything like that. Only NumFacet exists. Anyone else experienced that and could please help me? Cheers, XLR

    Read the article

  • JAXB, BigDecimal or double?

    - by Alex
    I working on different web-services, and I always use WSDL First. JAXB generates for a Type like: <xsd:simpleType name="CurrencyFormatTyp"> <xsd:restriction base="xsd:decimal"> <xsd:totalDigits value="13"/> <xsd:fractionDigits value="2"/> <xsd:minInclusive value="0.01"/> </xsd:restriction> </xsd:simpleType> a Java binding type BigDecimal (as it's mentioned in JAXB specification). When I then do some simple arithmetic operation with values of the type double (which are stored in a database and mapped via hibernate to the type double) I run into trouble. <ns5:charge>0.200000000000000011102230246251565404236316680908203125</ns5:charge> <ns5:addcharge>0.0360000000000000042188474935755948536098003387451171875</ns5:addcharge> <ns5:tax>0.047199999999999998900879205621095024980604648590087890625</ns5:tax> <ns5:totalextax>0.2360000000000000153210777398271602578461170196533203125</ns5:totalextax> What would be the right way? Convert all my values into double (JAXB binding from BigDecimal to double) Hibernate mapping double to Bigdecimal and do all my arithmetic operations in one object type.

    Read the article

1 2 3 4 5 6 7 8 9 10 11  | Next Page >