Thursday, May 1, 2008

SOAP

SOAP - Stands for Simple Object Access Protocol
  • Simple - transport accross HTTP using Http (mime) and SMTP headers using XML. So is XML simple ? It can be as simple or complex u want it to be. Is MIME simple? It is simple only because it uses a data formatting convention that is already in widespread use, is familiar to most IT people, and is conceptually understood by less technical people.
  • Object - has to do with ways of accessing object
  • Access - A key feature of SOAP and web services is their accessibility. Possible to create SOAP binding for almost any protocol.
  • Protocol - Its a rule.
SOAP messages are fundamentally one-way transmissions from a SOAP sender to a SOAP receiver; however, SOAP messages are often combined to implement patterns such as request/response.

whats the use and difference beween xsi and xsd namespace used in SOAP ??
for example xsi:type , and from xsd you get xsd:string or xsd:boolean

Http has a SOAPAction header.

Its easy to write a program that reads XML document and and wraps it inside SOAP message and send to URL. The class org.apache.soap.Envelope ( extends Lang.Object ) has a default constructor. Similarly org.apache.soap.Body has default constructor and method setBodyEntries(java.util.Vector).

// Build the Message.
org.apache.soap.messaging.Message msg = new org.apache.soap.messaging.Message( );
msg.send (new java.net.URL(m_hostURL), URI, envelope);
org.apache.soap.transport.SOAPTransport st = msg.getSOAPTransport ( );
BufferedReader br = st.receive ( );

No comments: