binding « jaxb « Java XML Q&A

Home
Java XML Q&A
1.convert
2.Development
3.document
4.dom
5.dom4j
6.dtd
7.element
8.jaxb
9.jaxp
10.jdom
11.jsoup
12.namespace
13.Node
14.parse
15.parser
16.pdf
17.sax
18.schema
19.stax
20.tag
21.transform
22.Validation
23.xalan
24.xmlbeans
25.xpath
26.xsd
27.xslt
28.xstream
Java XML Q&A » jaxb » binding 

1. Role based or shopping cart style Java bean binding?    stackoverflow.com

I have a POJO that I would like to expose as XML from a web service, preferably with JAX-B. The fields that need to be exposed in XML depend on what type ...

2. xjc binding customization does not work in jaxb 2.1.3. It works in jaxb 2.0    stackoverflow.com

I developed a binding customization file in jaxb 2.0 in JDK 1.6.0 and it worked fine. Now I'm using jaxb 2.1.3 in JDK 1.6.0_13 and it gives me errors:

Error xxx ...

3. Critique my JAXB object wrapper    stackoverflow.com

I have a question on wrapping a jaxb created class and would really like to hear your inputs. My xsd looks a bit like:

<ComplexService>
    <ComplexObject1>
     ...

4. Options for JAXB 2.1 Bindings Customization    stackoverflow.com

I am working on generating Java objects from an XSD file using JAXB 2.1. The XSD file has several elements in it representing business model entities, with common names like ...

5. JAXB - ClassNotFoundException: com.sun.xml.bind.ContextFactory_1_0_1    stackoverflow.com

I am getting error :

GC 16192K->1983K(260160K), 0.0101954 secs]
avax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory_1_0_1 not
- with linked exception:
java.lang.ClassNotFoundException: com.sun.xml.bind.ContextFactory_1_0_1]
       at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:152)
       at javax.xml.bind.ContextFinder.find(ContextFinder.java:258)
 ...

6. java class using jaxb api failing in jira with : Provider com.sun.xml.bind.v2.ContextFactory not found    stackoverflow.com

I am writing a plugin for Jira which involves parsing of XML documents. I am using JAXB to do so (XML to pojos and vice versa) So have a class which generates ...

7. Java objects to XML using javax.xml.bind.annotations    stackoverflow.com

If I have an object that contains a few fields that are Lists of other objects, and I want to generate the XML to represent that object, I get something like ...

8. How to add custom behaviors to JAXB generated classes. Custom not overriding existing methods    stackoverflow.com

I got an xsd from an external source over which i have no control. Now we want to add custom methods to the JAXB generated classes so that the object would ...

10. SchemaCompiler bind() returns null    stackoverflow.com

I' m writing a class to run xjc in java. my code goes as follows:

SchemaCompiler sc = XJC.createSchemaCompiler();
 URL url = new URL("file://E:\\JAXB\\books.xsd");
 sc.parseSchema(new InputSource(url.toExternalForm()));
 S2JJAXBModel model = sc.bind();
 JCodeModel cm ...

11. What is wrong with this XPath Expression in a jaxb bindings file?    stackoverflow.com

trying to evaluate the XPath expression /xs:schema/xs:element[@name='StrikeOptionReservationSummaryData']/xs:complexType with the following document produces an XPathExpressionException
<xs:schema>
<xs:element name="StrikeOptionReservationSummaryData">
...

12. JAXB bindings file: namespace-aware node selection    stackoverflow.com

I tend to use external JAXB bindings files for my Schema-to-Java compilation. This works just fine, but I did notice one thing that I've started wondering about. It's not really JAXB-specific, ...

13. How do I create JAXB bindings for docbook    stackoverflow.com

When I run xjc against docbook.xsd, I get a lot of errors:

parsing a schema...
[ERROR] Property "Revision" is already defined. Use &lt;jaxb:property> to resolve this conflict.
  line 5965 of file:/C:/log/11/04/20/docbook-4.5/dbpoolx.xsd

[ERROR] The ...

14. How to marshall an objectgraph with Java XML binding to a specific depth?    stackoverflow.com

being a newbie to Java XML binding i am facing a challenge. Let say i have a scenario where my domain model is constructed and i want to marshall this domain to ...

15. customizing jaxb bindings    stackoverflow.com

The below is the xml generated using jaxb can anyone please suggest an override method to completely eliminate xmlns:ns3,xmlns:ns4 and ns3:type

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ipsa:Address xmlns:ipsa="http://IPSA/IPSACIM/">
    <ContMed_ID xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://www.w3.org/2001/XMLSchema" ns3:type="ns4:int">1</ContMed_ID>
 ...

16. JAXB classImpl binding (to use specific impl that extends generated impl) but getter return super type    stackoverflow.com

to wrap some generated classes, i use the classImpl binding but collections in generated classes return the generated type instead of the type in classImpl and i want a list of ...

17. Customising JAXB bindings for marshling/unmarshling    stackoverflow.com

As per the pasted part from jaxb binding, i have an element name Amt, for which i want to invoke marshling/unmarshling. My question is when the below method will be called? Is ...

18. JaxB binding XMLGregorianCalendar    stackoverflow.com

JaxB when binding an improper date format to XMLGregorianCalendar is not throwing exception. Instead it assigns null. What could be the problem?

@XmlAttribute(name = "travelEndDate", required = true)
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar travelEndDate;

<xs:complexType ...

19. XML data binding for C++ like JAXB for java    stackoverflow.com

I am writing this question as a complete **naive** in this field of "Use of data binding and parsing in c++". So, please bear with me . :) You may find this ...

20. JAXB javax.xml.bind.PropertyException    stackoverflow.com

I am getting the below error when i try to read XML file that has some japanese characters.

javax.xml.bind.PropertyException: jaxb.encoding
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getProperty(AbstractUnmarshallerImpl.java:360)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getProperty(UnmarshallerImpl.java:423)
at com.jaxb.JAXBTest.main(JAXBTest.java:23)
enter code here
package com.jaxb;
import java.io.FileReader;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

public class ...

21. Jaxb binding file being ignored    stackoverflow.com

I having a bit of trouble building JAXB bindings fora set of schemas and its driving me a bit batty. Here is the schema in question (it is just ...

22. How to specify the package name for the generated binding classes when using Axis2 with JAXBRI databinding?    stackoverflow.com

I am creating a webservice client. When I generated the data binding classes using JAXBRI, wsdl2java puts those classes in the package which name equals the targetNamespace. I want to use ...

23. Using JAXB to customise the generation of java enums    stackoverflow.com

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 ...

24. JAxb binding problem    coderanch.com

Hi all, I got a problem binding a Jaxb class in a json output. I got this error "Property startdate appears in @XmlType.propOrder, but no such property exists. Maybe you meant startDate?" when I try to bind the following class. Apparently this is because the json variable names are generated to be identical to the java variable name. Im sure there ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.