Consuming a WSDL in Grails - grails

I have been handed a .WSDL file which I need to test within a Grails Framework.
Any suggestions how to go about this.

Take a look at the http://grails.org/plugin/cxf and http://grails.org/plugin/cxf-client plugins. They're easy to use and backed by Apache CXF - https://cxf.apache.org/
The client plugin has a wsdl2java script that will generate code that you can use in your Grails app.

You could start with documentation itself: http://grails.org/Calling+External+WebServices

Related

Configure an Activiti BPM?

I want to know that how to configure/run Activiti BPM in Grails?? I'm using fedora as my OS, Grails 2.1 . If their is any tutorial websites are is plz mention it also..
There is a plugin for Grails applications that provides much of Activiti within a Grails app. http://grails.org/plugin/activiti However, development has sadly stopped on it by the main developer. The last update was for Activiti 5.9 and Grails 2.1, though much of the plugin content seems to be built for older versions of Grails; for example, actions in the plugin's TaskController are all closures, not methods. Also, someone did issue a pull request to update it to 5.10.
I've been trying to puzzle through the source for that plugin myself. I keep vacillating between simply setting up a standalone Activiti server and utilizing the RESTful API from within a Grails Service class, importing a few of the Activiti classes into my Grails app, or trying to re-engineer the plugin to suit my needs (my site is stuck on Grails 2.0.1 for the time being).

Which is the best way to include Grails into Liferay?

I'm trying to include Grails applications into a Liferay portlet. I tried the Grails Liferay Portlets Plugin but it did not work for me at all.
Does anybody know any other possibilities? Which do you think is the best and why?
We had our Grails project integrated with Liferay at one point but it was a mess. Inevitably we pulled it out of Liferay and we were able to use Grails properly again. In our instance the question became, why are we using Liferay and do we really need it?
Now if you have a requirement for Liferay you might try simply using Spring Portlet support and use parts of Grails you like but not fully integration. Spring Portlets with Groovy were much easier and cleaner to do. If you simply want Grails goodies for services etc. you can try deploying a Grails WAR on the same tomcat and expose services to your portlets through REST, Hessian, Burlap or some other easy service serialization mechanism in Spring/Grails. In this case you have a Liferay UI app that calls your Grails services.
Once again, try some options, then decide if you truly need (or have) to use Liferay. With advances in Javascript UI packages, I'm not sure 'portlet' spec apps are as appealing as they once were and the word 'portal' is something that sounds good to management but inevitably means little to what needs to be implemented.

What is a Grails Plugin? What does it mean to Install a Plugin?

I used Grails recently, and added Grails plugin for JQuery, but I don't think it did anything more than just copy some jQuery files over.
So far, I have seen info only on 'how to install and use' plugins...but I can't find anything that describes the concept of a plugin.
Can somebody please tell me, what is a Grails Plugin? And what does it mean to 'Install' a plugin?
A Grails plugin is (or should be) a self-contained bundle of functionality that can be installed into a Grails application. When a Grails plugin is installed, it can do any of the following:
define additional Spring beans
modify the generated web.xml
add new methods to the application's artefacts (controllers, domain classes, services, etc.)
provide new tag libraries
make additional resources and classes available to the application
provide new Grails commands
For example, when you install the JQuery plugin
the JQuery JavaScript files are added to the application
a new Grails tag <jq:jquery> is added to the application
a new Grails command grails install-plugin jquery is added to the application
When you install a Grails plugin, that plugin's functionality is made available to the installing application. However, the plugin itself is not actually copied into the application, only the plugin name and version is added to the application's application.properties file. The plugin itself is downloaded to $HOME/.grails and the application loads it from there.
The structure of a Grails plugin project is identical to that of a Grails application, with the exception of a configuration file (known as a plugin descriptor) that is included in a plugin's root directory.
Well, a Grails plugin is some piece of software that extends the frameworks funcionalities in some manner. Generally, installing a plugin in Grails means copying it to your Grails folder, so projects can refer to it and Grails will know where to find it.
Grails plugins have this folder structure:
grails-app
controllers
domain
taglib
service
etc
lib
src
java
groovy
web-app
js
css
So anything it has there will also be available to the application that uses it. For example, the Searchable plugin has a service class which you can use to perform advanced searchs in your own domain classes .
The jQuery plugin you mentioned has the jQuery .js file, and a tag to include that file.
For information on creating plugins, see http://grails.org/doc/latest/guide/12.%20Plug-ins.html
A plugin is just a set of functionality around a desired purpose. So the Spring Security plugin provides a way to lock down your app, assign roles to users, restrict access, whatever. The Searchable plugin allows you to integrate advanced searching into your app. There are lots of plugins
The point is to provide useful functionality so that you don't have to implement hard things yourself. Someone did something useful, and they wanted to contribute back to the community, so they organized their functionality and made it available.
A plugin is code and configuration, like any functionality you would implement yourself.
There is some documentation here: http://grails.org/doc/latest/ref/Plug-ins/Usage.html

Is it possible to add Grails MVC classes at deployment time?

I'm writing a Grails app which I'd like 3rd parties to augment at runtime. Ideally they would be able to add a JAR/WAR to the webapp directory which contains new domain, controller and service classes, new views, and other content.
Is there a simple way to do this within grails? Would it be simplest to create a startup script which copies the new classes etc. into the relevant directories and then updates grails.xml and web.xml?
You will be able to do this in version 2 of grails in which plugins will be also OSGI plugins http://jira.codehaus.org/browse/GRAILS/fixforversion/15421
It seems that the Grails plugins will actually fit quite well for this: http://www.grails.org/Understanding+Plugins
A plugin can do just about anything... One thing a plugin cannot do though is modify the web-app/WEB-INF/web.xml or web-app/WEB-INF/applicationContext.xml files. A plugin can participate in web.xml generation, but not modify the file or provide a replacement. A plugin can NEVER change the applicationContext.xml file, but can provide runtime bean definitions

Suggested Grails plugins to make Grails a good CMS option

We are trying to look for plugins for Grails to make a CMS site. Any suggestions?
Check out Weceem at
http://www.weceem.org/weceem/
I've never used it but apparently it can be used as a stand-alone site or integrated into an existing grails app as a plugin.
There is also Alfresco plugin, though it's likely more focused on the document management side of Alfresco (it allows both Document Management and Web Content Management).

Resources