Monday, June 28, 2010

Difference between JAX-RPC and SOAP

They are completely different protocols, you need to find out the protocol used by the web service you wish to consume and program to that. Web services is really just a concept XML-RPC, SOAP and REST are actual technologies the implement this concept. These implementations are not interoperable (without some translation layer).

All these protocols enable basically the same sort of thing, calling into remote some application over the web. However the details of how they do this differ, they are not just different names for the same protocol.

SOAP supports document-level transfer, whereas xml-rpc is more about values transfer, although it can transfer structures such as structs, lists, etc.

XML-RPC goes over http/https only, where as SOAP goes over ftp, smtp, http, https...etc

XML-RPC doesn't support named parameters, it depends on the position of the parameters where as SOAP supports named parameters and position of the parameters doesn't matter!


example XML-RPC



examples.getStateName


40




Example SOAP:



IBM

Tuesday, June 22, 2010

SQL queries

Query to find out all the employee records who are having the salary of the third highest salary:
SELECT *
FROM EMPLOYEES A
WHERE 2 = ( SELECT COUNT(*) FROM (SELECT DISTINCT SALARY FROM EMPLOYEES) B WHERE A.SALARY <B.SALARY).


A nice tutorial on Oracle SQL/PLSQL is here.