How different are SOAP and JAXP(java API for XML processing), JAX/RPC?
I don't know where to post this question, If I'm wrong please let where can I post it? I see no forum for web services on the serverside.
SOAP and JAXP are for two different purposes.
SOAP is for doing RPC over HTTP or any other TCP based transport. It enables client programs to talk to your application server over a transport supported by SOAP layer. Meaning, your Java application either applet can talk directly to your application server hosting enterprise java beans say, via a soap adapter that will marshal and unmarshal the SOAP envelope carrying payload information. So your client application/applet sends service request to the object residing in an application server by encoding request parameters as XML SOAP envelope. At the other end, a SOAP adapter that works with your application server decodes the XML SOAP envelope, extracts the payload information and gives it to your application server for method invocation. After the method call gets complete, the SOAP adapter takes method call return and exceptions, marshals it back to XML SOAP envelope and sends it over HTTP/any other transport that your SOAP implementation uses, back to the client. You may want to check Apache's SOAP implementation at xml.apache.org.
JAXP is a Java API for processing XML. XML processing includes parsing and transforming XML to some other language in a XML processor independent way. Sun is already providing a reference implementation of JAXP 1.1 that supports XML processing by any processor based on SAX (Simple API for XML) 2.0 or DOM (Document Object Model) Level 2 standards.
Can you tell me how reliable and faster is SOAP over other protocol in accessing the serverside objects?
SOAP is reported to have some performance issues due to huge amount of XML parsing while marshaling and unmarshaling the SOAP envelope. Also, don't forget, SOAP transports method invocation data in ASCII compared to IIOP or other pure RPC protocols that transport method invocation data in CDR/XDR formats (or binary formats simply speaking).
Also, SOAP lacks mechanism to transport security and transaction contexts. This means that SOAP cannot be used for interoperability purposes between different application servers since there would be no way to authenticate and authorize the operations between these application servers, then. Also because of the lack of transaction context propagation, reliability is comparitively less.
Hope this helps.
Hi Reema Patel,
Thanks for the info.I hope that all -ves of the SOAP will be solved in near future.
SOAP Can be used to pass objects over the network as XML pass Objects as XML Messages, Process them and Bind to other Objects.
Remember Sun has 3 JAX packages.
JAXP - Java XML Processing
JAXM - Java XML Messaging
JAXB - Java XML Binding.
Sun's XML team may come up with a package that combines the 3 packages to produce SOAP like functionality. Presumably it would then be an inefficient version of IIOP and sit under RMI - Ho Hum.