Annotation « cxf « Java Enterprise Q&A

1. JAXB XmlID and XmlIDREF annotations (Schema to Java)

I am exposing a web service using CXF. I am using the @XmlID and @XmlIDREF JAXB annotations to maintain referential integrity of my object graph during marshalling/unmarshalling. The WSDL rightly contains elements ...

2. Bean-To-XML annotations: how to process nested structure

For bean->xml convertion in webservices we use Aegis from CXF (it is jaxb-compatible, as I understand). This is my type:

class C{
private int a;
private int b;
private T t;

class T{
private int t1;
private int ...

3. Multiple @WebService annotations in JAX-WS / CXF

I am trying to implement minor versions in JAX-WS as follows:

public interface ServiceRev0 {
    public void initialMethod();

public interface ServiceRev1 {
    public void newMethod();

public class Service ...

4. Annotated beans not getting injected for JAX-RS CXF service

I have a CXF RESTful service which is working just fine. Problem is when I try to inject my DAO using an annotation:

private MyDAO myDAO;
It's not getting injected. My ...

5. WebResult vs RequestWrapper Annotations with Polymophism

I have a class such as the following:

@XmlRootElement(namespace = "", name = "Person")
@XmlType(namespace = "", name = "Person"
public abstract Person {
And two classes that inherit from that:
@XmlRootElement(namespace = "", name = ...

6. WSDL2Java with CXF without annotations

I have an issue with CXF and have been looking in the doc but did not find how to do it, I am probably missing something, I am a beginner. I am ...

7. CXF DOSGi is ignoring annotations

I am using an JAX-RS example. This example contains two RESTful webservices, one with annotations and another without. I build it with maven and deploy it into Felix, together with CXF ...

8. CXF-java2wsdl-plugin not importing external schema defined in @XmlSchema annotation

I'm using the cxf-java2ws-plugin to generate a WSDL file from JAX-WS annotated classes. For my data objects; I'm specifying the fact that an external schema file already exists (by adding an ...

9. JAX-RS annotations

I want to learn Restful web service using Apache CXF. Could you please suggest any resource to refer to except for the official CXF site? Where can I learn all those ...

10. Could I add XmlAdapter to JAXB from runtime (w/o annotation)?

In all cases XmlAdapter mentioned in pair with @XmlJavaTypeAdapter. Is it possible add my XmlAdapter from runtime API (necessary for CXF @XmlJavaTypeAdapter workaround)?

11. externally create jaxb annotations for class

So, usually I apply JAXB annotations in the code as follows:

package com.example;

@XmlRootElement(name = "Foo", namespace = "")
@XmlType(name = "Foo", namespace = "")
public class Foo {
Foo is a ...