-
Sep 3rd, 2010, 02:23 PM
#1
CXF plugin - JAXB error
Hi all, I am fairly new to Grails and CXF. I have a simple parent-child relationship and I want to expose some methods through SOAP-CXF using the Grails-CXF plugin.
I have the following 2 simple domain classes.
@XmlAccessorType(XmlAccessType.FIELD)
class Dealership {
static hasMany = [technicians:Technician]
String description
static constraints = {
description(blank: false , maxSize:100)
}
}
@XmlAccessorType(XmlAccessType.FIELD)
class Technician {
Dealership dealership
String firstName
String lastName
static constraints = {
firstName(blank: false , maxSize:100)
lastName(blank: false , maxSize:100)
}
}
and the following service class :
class DealershipManagementService {
static expose=[ 'cxf' ]
Dealership retrieveDealership(Integer id) {
return Dealership.get( id )
}
}
When I call the generated WebService retrieveDealership(1), I get the error :
Marshalling Error: A cycle is detected in the object graph. This will cause infinitely deep XML
Any help on how to fix this ?
Regards,
Martin
-
Sep 6th, 2010, 02:20 AM
#2
I suggest you do a web search for "CXF bidirectional relationship" or the same without "relationship". I found this link, which may help:
http://www.mail-archive.com/cxf-user.../msg06947.html
-
Sep 6th, 2010, 06:04 AM
#3
There is little documentation regarding Grails and CXF, what is the best and most used web services framework for contract last with Grails ? Metro, Axis2, just plain Jaxb annotations ? Thinking about switching to Metro and using the Grails plugin with JAX-WS annotations.
Any insight is appreciated.
-
Sep 6th, 2010, 08:50 AM
#4
You might want to ask on the Grails user mailing list. You'll have access to more people that use Grails and I know some use Grails with web services. I'm afraid I don't know which is the most used or best of the integrations, but I think the CXF plugin has been around for a while.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules