As you can see I've added every possible bit of information to customize the generated WSDL. With all that in place we can get the description of this service (WSDL) at http://localhost:8080/example/services/example?wsdl. Let's use that to create a .NET client. This time from command-line:

In the first line we're expanding the system path so that all the tools are available from anywhere. In the second line we're generating a client for the web service we've created in Grails. Simple enough, right?

Let's create a simple console application and use this newly generated client:

Again, no magic here. Once you've compiled everything run the application and bum! Everything works as expected :)My guess is that CXF plugin didn't work just right out of the box because of some problems with default naming that CXF is using when auto-generating WSDL. With all the annotations in place everything seems to be working just fine.

I hope this will help someone. In case you'd like to fiddle with it yourself here's the example. in src/csharp you'll find the sources for the client along with a batch file to compile them.

Unfortunately when it comes to a more advanced scenario, like for example returning an array of domain objects from a service method the CXF plugin still fails to produce good enough WSDL to work with .NET. This is the case where XFire plugin shines best!

FYI: the same trick does not work with Axis2 plugin. The naming is all whacko. Things like this$dist$set$2 and urn:this$dist$get$2 hurt the WSDL code generator so much it spits nothing out but a load of warnings.

Anyways, I think I'm going to check pure CXF in a Spring application to verify if the actual issue lies with CXF itself or with the CXF-Grails integration. I'll let you know what I found out. But first - the new James Bond awaits!

Oops I forgot to check in the other project's additional map method :). In Now.

I Given that you did get output from the list response, I would think that any issues are getting have to do with core cxf. It can be a bit tricky to get all the annotations correct for JAXB, service, etc. to handle your responses. I call out a few of the gotchas in the plugin source readme page.

About Me

I'm a passionate software developer with more than 15 years of experience in creating and maintaining several key software solutions. Wherever I go I spreads the word about new and updated means to satisfy the ever growing need for solving business problems.