Beruflich Dokumente
Kultur Dokumente
SOAP, Simple Object Access Protocol is a communication protocol, a way to structure data before transmitting it, is based on XML standard. It is developed to allow communication between applications of different platforms and programming languages via internet. It can use range of protocols such as HTTP, FTP, SMTP, Post office protocal 3(POP3) to carry documents. Http-Get, Http-Post works with name/value pair which means transferring complex object is not possible with these protocols, whereas SOAP serializes complex structure, such as ASP.NET DataSets, complex arrays, custom types and XML nodes before transmitting and thus allows exchange of complex objects between applications. Two components can easily communicate using Remote Procedure Calls protocol. But because of their compatibility and security issues, most of firewalls and proxy server block this type of messages. SOAP uses HTTP channel to transport which makes it widely accepted protocal over the internet.
SOAP request <?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/ company "> <m: GetCompanyDetail > <m:CompanyID>1234></m:CompanyID > </m: GetCompanyDetail >
</soap:Body> <soap:Envelope> SOAP response <?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/company"> <m: GetCompanyDetailResponse> <m:name>ABC</m:name> <m:revenue>20000</m:revenue> </m: GetCompanyDetailResponse > </soap:Body> </soap:Envelope>
Explain the role of XML in SOAP. XML is used as the common format for data in cross platform applications. This file is used for representing message for communication. XML is mostly accepted standard for open source applications. XML format is more reliable format for Application Layer protocols for message transmission and negotiation. What are the elements that should be contained in SOAP message?
Envelope Translates the XML document to a SOAP message. It is the root element. Header Contains the header message. Contains the application specific information. Body Contains the call and response message. Fault element Used for communicating errors. If present, it appears as a child element of the body and can appear only once.
What are SOAP Envelope element, SOAP actor element and SOAP body element?
Envelope Element: Envelope element contains header child and body child element. Actor Element: Actor element specifies an entity by which an element is processed. It is referred as the ultimate recipient of the message, and used for assigning header entries to specific entities. Body Element: Body element encloses the body entries of the message. What is SOAP actor element?
The header element may pass through different endpoints before it reaches the receiver. SOAP actor element is specifically used to address the header element to a specific endpoint. Syntax: Soap:actor=URL
What do you mean by SOAP encoding? XML format is used by SOAP for encoding data. It maps the high level data types into a serialized XML format known as Section 5 encoding (also known as SOAP encoding) and literal encoding. The other type of encoding named Literal encoding uses XML schema to validate information.
What are Web Services?
Answer Web services exposes functionality over internet using protocol such as HTTP. Web services can be accessed by two disparate applications from different platforms as they use SOAP protocol to expose the business functionality. SOAP is a platform independent protocol, so the consumer of the web services doesnt have to know any implementation detail of web services based components. This is the reason why web services hosted on windows can even be accessed by LINUX consumer.
Web Services can convert your applications into Web-applications. Web services are self-contained and self-describing application components that communicate using open protocols. They can be discovered using Universal Description, Discovery and Integration and be used by other applications. XML + HTTP form the basis of the Web services.
Webservices are designed to support systems interoperability. They interact through standard xml based messages using SOAP. They are sets of codes hosted on a hosting machine which are then accessed by other machines on a network to perform some task. Webservices are defined using WSDL (web services definition language), which exposes the "webmethod" through which they can be accessed. Since webservices are XML based, they are platform independent. Moreoever, even programming language independent. i.e. A java based client request can access a webservice created using .Net technology. Web Server is a program components that allows us to develop loosely coupled and platform independent application. It enables distributed applications to exchange messages using protocol like HTTP, XML, and SOAP. Since it uses XML based messaging, it enables heterogeneous applications to interoperate with each other.
Define UDDI, DISCO and WSDL.
Answer UDDI, Universal description, discovery and integration It is the directory that is used to publish and discover public web services. DISCO, Discovery Commonly known as Discovery. Discovery clubs together common services and exposes schema document of the web services. WSDL, Web Service description language. This is used to describe web services. The description includes URL of web services Method and properties supported by web services Data type it supports. Protocol detail it supports. Describe the process of communication between Client and Web Service. To communicate with Web Service, Client application creates an object of Web Service Proxy Class. The proxy object provides access to all methods and properties of Web Service to client. The client calls a method on the proxy object. The Web Service infrastructure serializes the method call and arguments into the SOAP message and sends to web service. The web service executes the method and returns the value which gets serialized and send over network. The message then received by client infrastucture, deserializes it and sends to the proxy object. The proxy object returns the value to the client application.