England beat Aussies in 1 day cricket for first time since 1999 Google browser in the works?
Sep 21

Adam Bosworth: XML over HTTP vs. WS-*

Tech Add comments

I have a posted comment about just using XML over HTTP. Yes. I’m trying, right now to figure out if there is any real justification for the WS-* standards and even SOAP in the face of the complexity when XML over HTTP works so well. Reliable messaging would be such a justification, but it isn’t there. Eventing might be such a justification, but it isn’t there either and both specs are tied up in others in a sort of spec spaghetti. So, I’m kind of a skeptic of the value apart from the toolkits. They do deliver some value, (get a WSDL, instant code to talk to service), but what I’m really thinking about is whether there can’t be a much simpler kindler way to do this.

I think a lot of people are thinking this. It is especially easy when you have simple languages that let you write the glue in no time at all. Such as Ruby and co.

E.g. Groovy: You can just create methods which act as the glue into your real business logic which is in your service tier (i.e. Spring beans :)

import groovy.net.xmlrpc.*

# The Server Side 
server = new XMLRPCServer( 2, 10, 8, 1000, 1000 )
server.testme = { | name | name + ” is cool!” }
server.multiply = { | number | number * 10 }
serverSocket = new java.net.ServerSocket( 9047 )
server.startServer( serverSocket )

# Client
serverProxy=new XMLRPCServerProxy(”http://127.0.0.1:9047″)
println serverProxy.testme( “Groovy” )
-> “Groovy is cool!”
println serverProxy.multiply( 7 )
-> 70

# Kill the server
server.stopServer()

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What is the number before 3? (just put in the digit)