1.

What are the different elements of the SOAP Document or message?

Answer»

The SOAP message is basically an ordinary XML document CONSISTS of three parts as given below: 

SOAP ENVELOPE: It is a mandatory ELEMENT that identifies XML documents as a SOAP message. It simply defines the start and the end of the message.  

SOAP Header: It is an optional element that contains header information.  

SOAP Body: It is a mandatory element that contains call and response information. It INCLUDES XML data consisting of the message that is being sent. 

The following block depicts the general structure of SOAP XML request and response: 

XML Request 

<Envelope xmlns=?http://schemas.xmlsoap.org/soap/envelop/?> <Body> <getCourseDetailRequest xmlns=?http://udemy.com/course?> <id>course1</id> <getCourseDetailRequest> </Body> </Envelope>

XML Response 

<SOAP-ENV:Envelope xmlns:SOAP-ENV=?http://schemas.xmlsoap.org/soap/envelope/?> <SOAP-ENV:Header /> <!?empty header--> <SOAP-ENV:Body> <!?body begin--> <ns2:getCourseDetailsResponse xmlns:ns2=?http://in28mi> <!--content of the response--> <ns2:course> <ns2:id>Course1</ns2:id> <ns2:name>Spring<ns2:name> <ns2:description>10 Steps</NS1:description> </ns2:course> </ns2:getCourseDetailResponse> </SOAP-ENV:Body> <!?body end--> </SOAP-ENV:Envelope>


Discussion

No Comment Found