Hi
On 12/10/12 08:05, Jim Talbut wrote:
Hi,
I'm trying to add an Atom feed of data from an existing CXF OSGi bundle.
The bundle currently has a CXF interceptor and a CXF SOAP service in it.
In order to get the Atom feed running I seem to need to add the
following two dependencies:
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-parser</artifactId>
<version>1.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
If I just add abdera-core my code compiles, but I get a runtime error.
Unfortunately, when I add abdera-parser I get this build-time error:
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.6.0:wsdl2java
(generate-jaxb) on project esb.cxf.tracking:
org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
-> [Help 1]
I think this is due to abdera-parser including four jars within its jar
(axiom-impl, geronimo-stax-api, jaxen, wstx-asl).
what does dependency:tree show ? The reason abdera-parser embeds those
libraries is that this is how they approached the integration of Abdera
with OSGI - and in fact, ServiceMix bundle is now available to get
axiom-api embedded there too, but I'm not sure it is those 3/4 embedded
jars that are interfering.
Does anyone know how I can get a build with wsdl2java and Atom in it?
Perhaps a wsdl-to-java and abdera dependencies can be isolated, by using
profiles or even different poms ?
I'm not at all attached to Abdera if there is another way to generate
the Atom feed (though I'm a fan of doing as little as possible and don't
know the Atom standard well).
Another option is to build it manually using DOM. How complex are your
Atom representations ? Even JAXB can be used but I guess the general
issue is that Atom is generic enough and hence it is difficult to
capture it with JAXB, still some work has to be done on managing the way
the entity content gets marshalled and it can become tricky if the
content is meant to be marshalled as Atom feed or entry extensions (i.e,
as immediate children of entries or feeds)
Sergey
Jim
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com