Does REST web service has broker? - web-services

In SOAP, I see that there is a broker for orchestrating the connections between components. I want to know that is there a similar broker in REST?

There is no broker in SOAP, as long as somebody introduces one between the components (consumer, provider). SOAP is just a protocol. It can be used without a broker/ESB, for instance with direct http connections.
The same applies for REST.

Related

can we use SOAP on intranet?

I am new to services. I am sorry for my question being a little theoretical. On a site I was reading about SOAP, they said it works over internet.
Can we use SOAP based services in intranet environment ?
Can we use HTTP over intranet or it is just a internet protocol ?
Please guide.
You can use SOAP over any TCP network. This could be internet or intranet. SOAP is an interoperable protocol over HTTP. And HTTP works over TCP. So everywhere you have HTTP you can have SOAP. Basically SOAP is a protocol which allows for heterogeneous systems to communicate using an industry defined standards.
And note that SOAP is getting less attention lately compared to REST which is starting to gain lots of momentum.
SOAP is a service supported by a server/web service. You can even use SOAP to translate data between two services on the same server box that have no other form of API.

Forwarding web services through JMS

I'm trying to figure out how to forward web service requests from the web server to a remote application server through jms.
In my architecture there are web services client which communicate with some web server (Tomcat) which needs to forward the request to be executed on a remote application server and at the end get the result and push it back to the web service client.
Something like:
Web Service Client <-> HTTP <-> Tomcat <-> JMS <-> Application Server.
I want to use jax-ws so my methods will be called automatically in the application server.
Although I've expected this will be common approach, I didn't find any examples.
I would appreciate if someone can provide some links or tips on how such a configuration can be built.
Currently I'm using Metro but any other solution is valid as well.
Another aspect which I'm interested in, is whether I can use the fast-infoset over JMS to increase performance.
Thanks in advance,
Avner
you can try wso2MB as a JMS provider ...Check following links, would be useful
[1]http://wso2.org/library/message-broker
[2]http://pzf.fremantle.org/2011/04/introduction-to-wso2-message-broker_05.html
One option to solve it is using Apache Camel.
Then you can configure such a thing with an XML configuration file.

Java EE: Communication between few servers

I need a system in which I can send SOAP request to 1 server from a few and then if server has this service it calls and returns value to client.
If not it passes the request to next server on his "list of neighbors". Request is passed until some server has needed service (or not, so we return error result).
My question is. What will be the best way to communicate between those servers. SOAP? Message Driven?
It will be great If it could work without central server. If I will use MD, should not all servers use common JMS on some central server?
Is it possible to send MD to specific server on given address?
Take a look at Apache ActiveMQ or Apache Camel or Spring Remoting

How to implement asynchronous request response in REST based web service

I have a REST based web service system. I need to find a way to support publish/subscribe model here. As you know REST the communication between client and server is HTTP protocol. I use apache (PHP) web server in the backend to server all REST requests. The question is how to use PHP or whatever (in the web server side) to support this kind of Pub/Sub model. One typical scenario would be:
1) Client subscribes for a change in an object (GET /config/object/?type=async)
2) Client does not block with this request as it is async call.
3) Server accept the subscription and waits for the event.
4) Server publishes the client with the required data as and when the event happens.
I basically need to know how to implement all of these four steps above.
You are probably looking for something like PubSubHubbub -
http://code.google.com/apis/pubsubhubbub/
Letting PubSub implement the hub for you means you don't need blocking calls to the server.
They already have implemented example Subscribers and Publishers in different languages.
If haven't already, you should read Roy Fielding's take on the various approaches to PubSub. http://roy.gbiv.com/untangled/2008/paper-tigers-and-hidden-dragons

Developing a secure WS client for consuming a Axis2 Web Service with Rampart WS Security module?

I have a Axis2 web service secured using Rampart. I do want to develop secure clients for it, preferably JAX-WS based. I tried a lot of tutorials but they are so closed tied with each other, like including Axis2 libraries in the client side. The client should be fairly independent of the WS service framework, as the service can be consumed by .NET based clients or even PHP based clients.
Thanks in advance...
As I understand it, you would want to be able to feed the policy defined for your Rampart secured web service into your JAX-WS client.
That ought to be doable. As you say-- the idea is to be able to execute different client and server technologies, standardized around WSDLs...
We're only just getting into this - so I don't have any hands on knowledge for you.
But I would think you should be able to copy the policy info for your rampart on the server in the services.xml file and put it in your client.
This seemed pretty helpful:
https://metro.dev.java.net/guide/
Sections 12 and 18 in particular.