220 likes | 291 Views
Web Server Administration. Web Services XML SOAP. Overview. What are web services and what do they do? What is XML? What is SOAP? How are they all connected?. Web Services: What are they?.
E N D
Web Server Administration Web Services XML SOAP
Overview • What are web services and what do they do? • What is XML? • What is SOAP? • How are they all connected?
Web Services: What are they? • A Web Service is a software system that allows services to be accessed over a network, and executed on a remote system hosting the requested services. • HTML transported over HTTP and presented via a web browser is the most successful implementation of remote access to a service running on another machine. • The key is a simple, accessible message format, that allows an application to be used by people all over the world without installing custom client software on their computers.
Web Services Continued • It’s an open standard, unlike prior standards such as DCOM, CORBA, Java Remote Method Invocation (RMI). • APPS could be written using DCOM and if you are only dealing with another PC using DCOM it works...if the DCOM port 135 is open. • However, if the other machine is using CORBA or if you don’t know what it ‘s using then open standard of web services is the solution. • Everyone is offering web services tool kits! Java has one, ASP.NET has one, and so do other languages and environments. • It's probably one of the first times that all big players have come to an agreement on a standard.
Web Services and XML • Web Services communicate with one another via messages in a format known as XML. • Web services exchange XML messages with one another, typically using either HTTP or SMTP (e-mail) to transport the messages. • These Ports are usually open. • XML documents can be easily transported via HTTP through firewalls without security risks
“Valid” Web Services • The current web services standard, as defined by the W3C org, is composed of 4 main parts. • The service which is usually performed by a web server that listens for requests of the service. This is generally just a web like page or cgi script that gets posted to similar to the way other HTTP web requests are done. Instead of returning HTML though it returns a formalized XML message in Simple Object Application Protocol (SOAP) format. • The service description - specified in Web Services Description Language (WSDL) - this description defines the web methods (functions) that a service will accept - the inputs that go into these methods, and the format of the output that can be expected in return. It is the contract or message signature of the service. This is what you will need to generate a web service client proxy. The .NET Developer’s Kit comes with a utility WSDL.exe that will auto generate a client proxy class in .vb or C# given a .wsdl file.
The web service registry This piece is basically a directory of web services. The current standard is Universal Description, Discovery, and Integration (UDDI). This is an optional piece because a web service need not be listed in a UDDI registry to be used. The registry is just a nice way of cataloging available services - similar to what Java Naming and Directory Service (JNDI) does for Java. • Finally there is the web service client proxy - which negotiates the communication between a web service and a client. It accepts the inputs and requests - passes it off to the web service - waits for the service to respond and then converts the response to something meaningful. This is known as serialization/deserialization - conversion from the web service XML response back to an object and conversion of a user request to XML format required by the service.
True or False? • Most corporate firewalls leave only port 80 open. Answer - True • Web Services require DCOM for remote application access. False Web Services call remote applications using XML in Soap syntax. • The service description of a web service is an optional component that defines the web methods (functions) that a service will accept - the inputs that go into these methods, and the format of the output that can be expected in return. Answer - False
True or False? • UDDI is a standard for establishing and using public registries of web services. Answer – True • Web Services usually exchange XLM instructions via email or HTML. Answer - True
What is SOAP? • SOAP – Simple Object Access Protocol • SOAP is a platform independent set of syntax rules used to call methods located on diverse distributed systems. • XML Documents are transported via HTTP through firewalls without risk. • A SOAP message is just an XML message that follows a few additional rules.
What SOAP Does… • Messages are sent in a Request / Response fashion. • Defines an XML structure to call a method, pass the method parameters and return the requested values. • Returns error values (faults) if the service provider cannot execute the requested method.
What SOAP does not do… • The SOAP specification does not define how the requester or the responder send or receive messages. • Does not define how a message will create an instance of an object and execute the method. • Implementation details are left to the software developer.
Why SOAP is good! • Soap will allow developers to use/reuse code from know and trusted sources. • Makes it possible for systems to become highly distributed. • Flash Video about SOAP: Play Video
What is XML? • XML - Extensible Markup Language • A set of rules, published by the W3C (World Wide Web Consortium), for building new languages.
XML – Well Formedness • The specific rules with which all XML documents must comply in order to be minimally legitimate XML • Examples • element and attribute names are case-sensitive. • attribute values must be enclosed in single or double quotation marks. • Every start tag must be balanced with one end tag.
XML – Important Characters • The only characters you must be able to represent are: • the less-than and greater-than "angle brackets," < and > • the forward slash, / • the single quotation mark or apostrophe, ‘ • the double quotation mark, “ • the ampersand, & • and the semi-colon, ; • Some optional features of XML will be accessible only if you also have such punctuation marks as an exclamation point, !; a dollar sign, $; and an @ sign.
XML Continued • The most important characters in a XML document are the <, >, and / • No XML document does not include these. • Each well-formed XML document has one and only one "outermost element," within which all the others are nested. This outermost element is called the root element.
More XML… • As with HTML, XML documents depend on you being able to interpret them.And for that you need a data type document (DTD) • Browsers have an XML DTD built in so you could just let them know you are using XML • <?XML version="1.0" standalone="yes"?> • Or alternately, you can also write your own and send it along with your code.
Even More XML… • The two main types of XML pages are the "standalone" and those that use a DTD. • With standalone the page stands alone relying on the browser to have the XML DTD. • The other type of page offers the DTD to the browser so it can run the page.
Multiple Choice • An XML document that adheres to common syntax is called: • a. well written • b. extensible • c. well formed • d. compliant Answer - C
Which of these characters is optional in XML coding? • a. greater than > • b. less than > • c. percent % • d. slash / Answer - C
True or False? • A DTD is a document about how to interpret HTML or XML • Answer -True • In an XML document IMG and img refer to the same thing • Answer -False