cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackalista <>
Subject cxf.aegis.DatabindingException: Cannot create mapping for java.util.List, unspecified component type for method getAll parameter -1
Date Sat, 10 Oct 2009 05:13:58 GMT


I'm trying to integrate mule which uses CXF and Aegis under the hood into a
current appfuse dist and am running into a binding exception.  I've set the
binding to use Aegis, and it looks like it's having trouble with a service
super class that features a method "getAll()" with a parameterized List<T>
return value where type variable T is set to a domaon model class by the
instantiating extending class.  The method signature is here:

List<T> getAll();

At run time, extending class FooManagerImpl which implements interface
FooManager, is instantiated and it's inherited getAll() method sig looks
like this ( is the the hibernate persistent domain model class):

List<Foo> getAll();

I've tried to use both the standard appfuse dist which includes xfire and I
also tried replacing xfire with CXF in appfuse but both suffer the same
Aegis binding exception about a failure to map the List return value of
getAll().  I'm taking this to mean that mule is using CXF / Aegis 

I tried exposing the superclass getAll method directly in the subclass
interface and implementation and then put this annotation on it to try to
keep Aegis from trying to bind it but it had no effect.  I followed docs on
annotations for this here:

The annotation, which was apparently ignored, looks like this, but the wsdl
still showed the getAll() method:

  @WebMethod(exclude = true)
  public List<Foo> getAll();

I also tried to use an Aegis XML mapping file which I placed in the jar
alonside the interface class [see attached screendump] is called
FooManager.aegis.xml [the class it is to map is the service interface
FooManager.class /, etc.].  The mapping class looks like

    <mapping name="FooManager">
        <method name="getAll">
            <return-type name="foos"

Docs on using mapping files is here (for aegis 2.1, as I'm using CXF 2.1.5),
see the section on "Services and Parameters":

It seems that both the exlude annotation and the aegis mapping file are both
being oignored but as I'm new to boeth CXF and Aegis, it may be due to use
error.  In the version of appfuse in which I replaced xfire with cxf, I used
the version of cxf that the latest mule apparently uses which is 2.1.5.  The
web app *is* able to expose the same annotated service interface and class
properly as a web service and publishes the wsld at
localhost:8080/services/FooService?wsdl as would be expected.  It looks like
appfuse and mule each have their own instance of CXF but I'm not sure about
that.  While the web app and its CXF properly publish the web service, mule
and the CXF it uses are hitting an exception related to Aegis trying to map
the getAll() method and failing.  

The exception being thrown is:

Caused by: org.apache.cxf.aegis.DatabindingException: Error initializing
parameters for operation {}getAll: 
Cannot create mapping for java.util.List, unspecified component type for
method getAll parameter -1

Can anybody point me in the right direction?  It seems like the aegis
mapping code is having trouble with the parameterized List<T> getAll()
return value where T = at run time.  I uploaded a small zip file of
relevant files if that helps... I suspect that I may be doing something naive /
stupid with the mapping file, the annotation or may perhaps be approaching
this incorrectly, any help would be greatly appreciated, thanks.


My mule config is loaded via the listener from web.xml, essentially I too
the bookstore demo code configuration and grafted it onto an appfuse dist. 
Here's the service configuration for the service experiencing the binding
exception, FooService:

Fisrt I import my spring (2.5.6) applicationContext.xml with my service
interface & impl in it:

<!-- import beans from appfuse applicationContext.xml -->
  <spring:import resource="classpath:applicationContext.xml" />

Then, here's the service deinition

<service name="FooService">
    <!-- Public interface -->
    <cxf:inbound-endpoint address="cxf:">
    <!-- Administration interface -->
    <inbound-endpoint address="servlet://foo">
        <!-- Convert request parameters to String object -->
        <!-- Format response to be a nice HTML page -->
        <!-- Force text/html, otherwise it falls back to request props,
which have form-encoded one -->
        <transformer ref="setHtmlContentType"/>
    <!-- singleton-object
class="org.jackalista.integration.service.impl.FooManagerImpl" / -->
    <spring-object bean="fooManager" />
View this message in context:
Sent from the cxf-user mailing list archive at

View raw message