provided you can use a java 1.5 compiler you simply need to use JAXB and JSR181 
annotations in your class files and type the list. e.g.

List <WhateverYourCollectionTypeIs> myList = bla bla bla 

NOTE: the < > are actually included in the syntax they are not optional

in your services.xml define the service factory like so:

<serviceFactory>
            org.codehaus.xfire.jaxb2.JaxbServiceFactory
</serviceFactory>

Don't forget to annotate your class files with @XmlType and @XMLRootElement as 
appropriate.

For more info see 
http://xfire.codehaus.org/JAXB+2.0
and the examples folder in the xFire distribution.

Ian.


----- Original Message ----
From: "Poulton, Jonathan" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, 8 June, 2007 5:25:00 PM
Subject: [xfire-user] Cannot serialize List class



 

Hi 
there,

I'm writing further 
test applications with XFire and have found a problem; one of my domain objects 
"Article", has a List of "Category" objects. The list is untyped. Attempting to 
call the service gives me an exception with the following 
message:

org.codehaus.xfire.XFireRuntimeException: Couldn't create type for property 
categories on class com.verisign.xfire.test.Article: Cannot create mapping for 
java.util.List, unspecified component type for interface java.util.List
        
org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(DefaultTypeCreator.java:43)

Not sure whats wrong 
here. Anyone seen this before?

 

Jon



Reply via email to