Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In the Java world REST was pretty cool for about 18 months. And then annotations came out, and instead of all the JAX-RPC bondage and discipline, you get JAX-WS, where to make something a webservice literally all you need to do is shove the @WebService annotation on it and you are good to go†.

All the WSDL and SOAP crap gets auto-generated for you. Thereby eliminating in a single stroke REST's advantage.

Now, it is true that there is some stuff†† you can do with SOAP that you can't do with JAX-WS, but really unless you like making life difficult for yourself then don't.

Especially for a big Java to Java solution there doesn't seem to be any compelling reason to go with REST anymore. Even if everything you do maps exactly to the four SQL ops (select, update, insert, delete) it is still just as easy to use the annotation as it would be to use REST.

†C# has something similar I think.

††Example: JAX-WS is limited to what you can do with a method and parameters in Java. In your SOAP schema you can specify for instance that the array you get passed shall have between 1 and 3 members, two is okay but 4 is right out. Whereas in Java (and hence JAX-WS) if you have an Array parameter, you can't specify that it must have a certain number of elements in it.



The simplest method of creating SOAP-services is use of SQLServer SOAP Endpoint.

Just one line for SOAP from stored procedure or function.

Is it beautiful? I don't think so. SOAP remains SOAP, ugly remains ugly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: