In previous Blog we have discuss about introduction and another Concept of SOAP with Android Training in Chandigarh
Today we will discuss about Syntax of SOAP with Android Training in Chandigarh :
SOAP uses XML as its message syntax, with some structure defined but most of the structure left to the application left to the application. A SOAP message has an envelope, consisting of an optional header and a mandatory bod shown on a general level.
The Parts defined by the SOAP specifications are shown in program below, with .. replacing all the parts that are application-specific:
Any Element inside the header is called a header block. SOAP defines certain attributes that such header blocks can have, to control the processing at intermediaries, Each Header block is always targeted at it from the message, process them, and send the message on wards.
The role attributes can be used to override the default target for header blocks( in the example, it is useless, since the next processor in the chain is the default ). The must understand set to true forces the processor to generate a fault if it does not understand the header block. and finally, the relay attribute set to true tells the processor that the header block is to be retained in the message instead of removed, which is the default behavior.
SOAP Syntax Rule :
1. A SOAP message MUST be encoded using XML.
2. A SOAP message MUST use the SOAP Envelope namespace.
3. A SOAP message MUST use the SOAP Encoding namespace.
4. A SOAP message MUST NOT contain a DTD Reference.
5. A SOAP message MUST NOT contain XML processing instruction.
Envelope:
Every Envelope element must contain exactly one body element. The Body Element may contain as many child nodes as are required. The content of the body element are the message.
The Body element is defined in such a way that it can contain any valid, well formed XML that has been namespace qualified and does no contain any processing instructions or Document Type Definition (DTD) references.
If an Envelope contains a Header element, it must contain no more than one, and it must appear as the first child of the envelope, before the body. The Header, like the body, may contain any valid, well formed, and namespace-qualified XML that the creator of the SOAP message wishes to insert.
Each element contained by the Header is called a Header Block. The Purpose of a header block is to communicate contextual information relevant to the processing of a SOAP message. For example, A header block that contains authentication credentials, or message routing information.
The XML Syntax for expressing a SOAP message is based on the soap-envelope namespace. This XML namespace identifier points to an XML schema that defines the structure of what a SOAP message looks like.
If anyone using document- style SOAP, He/she might transfer a purchase order with the XML.
This Example illustrates all of the SOAP Envelope specification. There is the <s:Envelope>,the topmost container that comprises the SOAP message; the optional <s:Header>, which contains additional blocks of information about how the body payload is to be processed; and the mandatory how the body payload is to be processed; and the mandatory <s:Body> element that contain the actual message to be processed.
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.