The jive 5 has many imporvements in terms of webservices. There are primarily REST and SOAP based services and some places both*.

 

Most of the existing webservices wount work directly on new version due to changes like form based RESTFul services.

Meaning that the webservices will need to be called by submiting a form to a URL with inputs passed as form input elements.

 

Underlying jive webservices is apache cxf framework. This is plugged in using spring component.

 

Follownig configurations are needed to create a webservice in this approach

 

REST

 

Spring


jaxrs element with id, address and implementing bean reference. This entry along with bean and annotations on bean interface is used to declare a web-service.

 

Example Spring.xml

<jaxrs:server id="custom-service-name" address="custom-servie-address">

        <jaxrs:serviceBeans>

            <ref bean="custom-service-manager-bean" />

        </jaxrs:serviceBeans>

          ...

    </jaxrs:server>

  

Implementing Interface

Bean interface has annotations @GET/@POST/@DELETE and @Path element which has location of the individual method. @PathParam is used to extract elements from path to method parameters. @FormParam can be used to extract data from post.

 

 

Differenct between @GET and @Get

Both are used for RESTFul services but @Get from codehus is used when we use both SOAP and REST over same service implementing class.

 

When to use REST and when to use SOAP

SOAP is a approach of integrating large applicaitons where interface complexity is high. For Jive REST services are sufficient to expose it's functionality in simple and efficient way.

But there are some drawbacks that i fealt (There may be workarounds to these limitations and it will be great if you can provide your valuable comments)

1.  The RESTFul services dont have WSDL files - So in case one know the service address it is hard to find list of available methods, the interface for calling them etc...

2. There is less control while calling webservices while using JSON approach of data transfer. In case we use XML approach, where is the definition of the XML elements?

So in case we would like to modify the payload of xml/json message on the fly it will be difficult since the definition is not well defined like that in SOAP (SOAP WSDL has Schema element)

 

SOAP should be used when there is a need to consume services from complex applications. The use of SOAP should be minimum since it involves lot of parsing and preprocessing, on the other hand it also has good integration with SOA architecture and easy to integrate with complex systems.