what are the ways to integrate soap webservice with Apache camel give some example - jbossfuse

I have a Soap web service deployed in one Application Server. We want to integrate that Soap Webservice with Apache Camel in another application server (JBoss Fuse) server. Are there some guidelines available?

What is the application server that hosts the webservice? What language/technology is the webservice coded in? What (broadly) will the Camel route do.
Camel provides a heap of different data input endpoints -- direct memory, HTTP, FTP, files, SOAP, etc., etc. Connecting your webservice to Camel comes down to choosing one of these that endpoints that your webservice can use. Camel offers a huge amount of flexibility in how it accepts and responds to data, and the choice of an approach really depends on the needs of your application, and how it is developed.

Related

Is SOAP a stateful protocol? Is REST really stateless? How can one store data using REST?

Is SOAP designed to be a stateful? How can it be reached? SOAP use RPC, so where to store data?
Is REST designed to be a stateless? Is it possible to store data in JSON ? Is it so wrong?
Thanks
Is REST designed to be a stateless?
Yes, it really is -- but Fielding is precise about what stateless means in the context of REST:
communication must be stateless in nature, as in the client-stateless-server (CSS) style of Section 3.4.3 (Figure 5-3), such that each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
In other words, to correctly interpret a request, the server does not need to remember any previous requests.
For example, contrast HTTP (where credentials are part of the metadata of the request) with FTP (where credentials are sent separately from the RETR command).
Comparing SOAP with REST is not so suitable, because SOAP is a protocol based on XML and REST is an architectural style that is by definition not bringged to a specific technology.
In any case the common use of REST is via http, like SOAP, and the common usage of REST with json and http is only a comfortable implementation that is very suitable for web development and machine to machine communication due to the incredible good support for json in almost all the modern programming language.
Said that SOAP is definitely stateless!.
When we fire a web service call with soap we create a SOAP envelop in xml and send it on a http channel, that is stateless by default.
During the years near to SOAP many other protocols that can be used with SOAP can add some feature to the protocol the well known WS-*. BPEL deserves some discussion, it is the most important standard for SOAP orchestration.
Even if with BPEL in my experience the engine provide a SOAP web service in order to create a "state full" web service, the fact that a BPEL process is exposed via SOAP it is not correlated with SOAP. BPEL is BPEL and SOAP is SOAP are two separated things.
said that yes REST is an architectural style that is stateless by design and it is particular suitable and used with http, but even soap is a stateless protocol that use http like transportation layer.
for the storing data part of the question, storing data is a application concern. Of course you can pass data in a rest api like a SOAP web service. For the SOAP web service usually you will post data on the body of the SOAP envelop. In a REST service typically you are creating/updating a resource and for this reason using the classical http implementation of REST you will perform a POST(create)/PUT(update all the resource)/
PATCH(update only a piece of resource) pasing the data in the body of the http request. of course do not forget the Content-Type http header on application/json.
I hope that it can help you

Implement REST service in gwt

I want to implement REST service in gwt .But I don't know how to go about it. I read some documents where they have implemented it using RestyGwt and jercy. But I have one app which is deployed on tomcat. Then situation is that my client side app is calling the methods on the application present on tomcat.
I have to implement it using REST so that my client side call will first go to Proxy service on client then it make REST call to the application on tomcat and fetch result and return. How can I do this in gwt. ?
As mentioned, you can only communicate with REST service.
Anyway, maybe take a look on dispatch concept in GWTPlatform and their way of implementing it. (https://github.com/ArcBees/GWTP/wiki/Rest-Dispatch).
Idea is easy, you have an action on client side which is registered to deal with rest url. You can define action interface with some additional annotations to tell what is excepected to be send and received. They are using piriti library for json serialization.
It is up to you if you need only client side implementation or you would like to use server side service creation too.
You can NOT implement a REST service in gwt, since gwt is thought as a client-side solution.
What the GWT kit provides for server side are a few utilities to facilitate the comunication between client-side and server-side when both are written in java (RPC, RF).
So you can consume a REST service from gwt (RequestBuilder, gwtquery-ajax, etc), but if you want to provide REST services you need a 3party solution for your server side like Jersey, CXF, etc.
There are, though, 3party solutions which provides the server side and client simultaneously like restygwt, errai-jax, etc.
If you are looking for a simple and reliable solution to query rest services from the client, in this question you have a client implementation done with gwtquery (ajax, databinding, promises)

restlet integration with SOAP

I am exploring Restlet for my next project. One of the requirements is to communicate with a legacy SOAP-based service. What is the best practice to provide RESTful style to clients, but communicate via SOAP to this back-end server?
Restlet is offering a complete HTTP client API, so even if your backend is a SOAP server, you can still communicate with it.
Although Restlet doesn't include a usual SOAP stack, you can easily use FreeMarker/Velocity templates to send SOAP messages and XPath processing to extract valuable content from answers.

Writing Standalone server which can serve multiple clients simultaneously using reslet framework

I am trying to do a project (virtual classroom) which contains a server and multiple clients.
From server I should be able to handle video streaming,authentication,chat etc.. when multiple instances of clients send requests. Please guide me how can I use Restlet framework for this project?
In order to implement a RESTful application using Restlet, you need to begin by implementing several entities for the server side:
REST resources (classes extending the ServerResource class) that will contains processing.
Restlet application that will define how to access your resources.
Restlet server to serve REST HTTP request.
I recommend you to have a look at the hello world sample application from the Restlet website at the address: http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet/318-restlet.html. For the complete application, you can focus on the "Java SE client" at the first time.
In a first time, you can skip authentication since it can be added after on both client and server sides on ClientResource and within Application.
Don't hesitate if you have more questions!
Thierry

RESTful WebServices in without Tomcat (or any other container)

Is there a way to implement RESTful WebService using Spring 3 (or not) that does not use any web container?
Thank you !
I assume that the RESTful request will arrive over HTTP? So something needs to listen on the appropriate port and dispatch requests off to the service code. Obviously you can write such code, but you are likely to end up with something not very different from a Web Server.
If your objective is to embed this capability in some context then a lighweight container such as Jetty (as proposed by skaffman) seems like an answer - I'd be reluctant to write my own code instead
Using a framework such as JAX-RS makes writing REST services very easy, so if the actual objective is develop RESTful services quickly then I'd be prepared to live with a container that does the work for me.
In theory, yes - the various Spring-WS components are decoupled from the Servlet API. So you could, in theory, use the webserver built in to the Sun Java6 JRE.
In practice, this would be a lot of extra work. You'd have to bridge the Sun Web Server API to the Spring-WS API.
As an alternative to traditional Servlet containers, I can highly recommend Embedded Jetty, where your app can start up a lightweight servlet container within itself, and serve Spring-WS from that.