160 likes | 188 Views
Web services are a means for requesting information or carrying out a processing task over the Internet<br>more @http://www.trainmiddleware.com/course/weblogic-administration-online-training/
E N D
Web Services/XML/SOAP Viswateja
America Japan China
What is XML • Extensible Markup Language • It is used to describe the data • It is a software- and hardware-independent tool for storing and transporting data. • it is a standard from W3C • It contains information which is self descriptive • <note> • <to>Tove</to> • <from>Jani</from> • <heading>Reminder</heading> • <body>Don't forget me this weekend!</body> • </note>
I am Confused how can I read the below XML <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> Xpath
What Is an RPC • It is often necessary to design distributed systems, whereby the code to run an application is spread across multiple computers. • Code on one computer needs to call code on another computer • This is called a remote procedure call
What do we need to do RPC • Location of the code: Where does the code you want to call reside • Parameters: Does the code need any parameters • Return value: Will the procedure return any data • Other: Networking issues, packaging any data for transport from computer to computer A number of RPC protocols have been developed
RPC Protocols Several protocols exist for performing remote procedure calls, but the most common are • DCOM (Distributed Component Object Model), extension of COM • Drawback – Microsoft specific. Only works on Windows • IIOP (Internet Inter-ORB Protocol), extension of CORBA • Drawback – difficult to work with • Java RMI • Drawback – needs to be developed in Java • We need something that is platform and language independent, yet is easy to use
Web Services – The New RPC Protocol • Web services are a means for requesting information or carrying out a processing task over the Internet, • They typically involve the encoding of both the request and the response in XML. • They use standard Internet protocols for transport, this encoding • The above two points makes the messages universally available. • That means that a Perl program running on Linux can call a .NET program running on Windows.NET
A WSDL document is just a simple XML document. • It contains set of definitions to describe a web service. • WSDL document fulfills all the below requirements • Requirement 1 – Where is the service hosted • <service> • Requirement 2 – What protocol to use to talk to the service • <binding> • Requirement 3 – What are the operations • <portType> • Requirement 4 – What are the parameters • <message> • Requirement 5 – What is the datatype of the messages • <type>
Type Definition One-way The operation can receive a message but will not return a response Synchronous The operation can receive a request and will return a response Asynchronous The operation can send a request and will wait for a response Notification The operation can send a message but will not wait for a response Types of Communication
SOAP request message • <?xml version="1.0"?><soap:Envelope><soap:Header>...</soap:Header><soap:Body>... <soap:Fault> ... </soap:Fault></soap:Body></soap:Envelope>