Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Therefore, methods can be grouped together in portType elements. Similar to methods in a Java class would be.
  • The grammar for a one-way operation is: <wsdl:definitions .... > <wsdl:portType .... > * <wsdl:operation name="nmtoken"> <wsdl:input name="nmtoken"? message="qname"/> </wsdl:operation> </wsdl:portType > </wsdl:definitions> The grammar for a request-response operation is: <wsdl:definitions .... > <wsdl:portType .... > * <wsdl:operation name="nmtoken" parameterOrder="nmtokens"> <wsdl:input name="nmtoken"? message="qname"/> <wsdl:output name="nmtoken"? message="qname"/> <wsdl:fault name="nmtoken" message="qname"/>* </wsdl:operation> </wsdl:portType > </wsdl:definitions> The grammar for a solicit-response operation is: <wsdl:definitions .... > <wsdl:portType .... > * <wsdl:operation name="nmtoken" parameterOrder="nmtokens"> <wsdl:output name="nmtoken"? message="qname"/> <wsdl:input name="nmtoken"? message="qname"/> <wsdl:fault name="nmtoken" message="qname"/>* </wsdl:operation> </wsdl:portType > </wsdl:definitions> The grammar for a notification operation is: <wsdl:definitions .... > <wsdl:portType .... > * <wsdl:operation name="nmtoken"> <wsdl:output name="nmtoken"? message="qname"/> </wsdl:operation> </wsdl:portType > </wsdl:definitions>
  • WebServices.pps

    1. 1. Web Services Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology
    2. 2. Outline <ul><li>What are web services? </li></ul><ul><ul><li>Definitions </li></ul></ul><ul><ul><li>Advantages </li></ul></ul><ul><ul><li>Challenges </li></ul></ul><ul><ul><li>Architecture </li></ul></ul><ul><li>WS Protocol Stack </li></ul><ul><li>SOAP </li></ul><ul><li>WSDL </li></ul><ul><li>UDDI </li></ul><ul><li>Apache Axis </li></ul>
    3. 3. Web evolution Program the Web XML Browse the Web HTML T C P/IP Connect the Web Technology Applications Text Hypertext Applications FTP, E-mail, Gopher Web pages Web services
    4. 4. Definitions <ul><li>Definition 1: </li></ul><ul><ul><li>A web service is a service (“program”) that can be invoked from another program via the web. </li></ul></ul><ul><li>Definition 2: </li></ul><ul><ul><li>“ Web Services are self-contained , self-describing , modular applications that can be published , located , and invoked across the Web”. – IBM Web Services Tutorial </li></ul></ul><ul><li>Definition 3: </li></ul><ul><ul><li>A Web Service is a service on the Internet that </li></ul></ul><ul><ul><ul><li>Use a standardized XML messaging system </li></ul></ul></ul><ul><ul><ul><li>Not tied to any operating system or programming language </li></ul></ul></ul><ul><ul><li>Optional features </li></ul></ul><ul><ul><ul><li>Self-describing: provide public interface to the service via a common XML grammar </li></ul></ul></ul><ul><ul><ul><li>Discoverable: Interested parties can find a service and locate its interface </li></ul></ul></ul>
    5. 5. Examples <ul><li>Flight Reservation </li></ul><ul><li>Weather Service </li></ul><ul><li>Amazon.com web services </li></ul><ul><li>Retrieve geographic information </li></ul><ul><ul><li>http:// terraserver.microsoft.net/TerraService.asmx </li></ul></ul><ul><li>Search the web, check spellings </li></ul><ul><ul><li>One of the first useful Web Services built around SOAP </li></ul></ul><ul><ul><li>Allows you to integrate your application with Google’s search, spell check, and cached page databases. </li></ul></ul><ul><ul><li>http:// www.google.com/apis / </li></ul></ul>
    6. 6. A Basic Web Service Language: Perl Operating System: Windows 2000 Language: Java Operating System: Linux XML XML
    7. 7. Web Services Advantages <ul><li>Use open, text-based standards , which enable components written in different languages and for different platforms to communicate. </li></ul><ul><li>Promote a modular approach to programming, so multiple organizations can communicate with the same Web service. </li></ul><ul><li>Self-describing (metadata for access and use) </li></ul><ul><li>Discoverable (search and locate in registries) </li></ul><ul><li>loosely coupled (i.e. Services should not be dependent on each other). </li></ul>
    8. 8. Service Oriented Architecture (Basic Model) Service Broker Service User Service Provider Find Publish Bind UDDI WSDL SOAP SOAP SOAP SOAP – Simple Object Access Protocol / SOA Protocol WSDL – Web Services Description Language UDDI – Universal, Description, Discovery, and Integration
    9. 9. Service Interaction I book planes I book car Rentals I book hotels I locate services I organise holidays Get a car rental quote locate service ask for quote Is quote good enough? Yes Reserve car, provisionally … get other resources reserved Confirm reservation Service Identifier I convert currency I know the weather quote
    10. 10. Web Service Protocol Stack Discovery UDDI Description WSDL XML Messaging XML-RPC, SOAP,XML Transport HTTP,SMTP,FTP Transporting XML messages between client and server Encoding messages in XML format Describing Web Services interface Searching / Publishing Web Services
    11. 11. Simple Object Access Protocol (SOAP ) <ul><li>SOAP is an XML-based protocol designed to exchange information in a distributed environment (a communication protocol). </li></ul><ul><li>SOAP is platform & language independent </li></ul><ul><li>SOAP is a W3C standard </li></ul>
    12. 12. SOAP: Message Structure <ul><li><?xml version=&quot;1.0&quot;?> </li></ul><ul><li><soap:Envelope </li></ul><ul><li>xmlns:soap=&quot;http://www.w3.org/2001/12/soap-envelope“ </li></ul><ul><li>soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;> </li></ul><ul><li><soap:Header> </li></ul><ul><li>... </li></ul><ul><li></soap:Header> </li></ul><ul><li><soap:Body> </li></ul><ul><li>... </li></ul><ul><li></soap:Body> </li></ul><ul><li></soap:Envelope> </li></ul>SOAP Envelope SOAP Header SOAP Body Message Name & Data Headers
    13. 13. SOAP: Request Example
    14. 14. SOAP: Response Example
    15. 15. SOAP Advantages/Disadvantages <ul><li>Advantages </li></ul><ul><ul><li>Human-readable XML </li></ul></ul><ul><ul><ul><li>Easy to debug </li></ul></ul></ul><ul><ul><li>SOAP runs over HTTP </li></ul></ul><ul><ul><ul><li>Firewalls not affected </li></ul></ul></ul><ul><ul><li>Services can be written in any language, platform or operating system. </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>S-L-O.............W </li></ul></ul><ul><ul><ul><li>XML produces a lot of overhead for small messages </li></ul></ul></ul>
    16. 16. WSDL <ul><li>W eb S ervices D escription L anguage </li></ul><ul><li>WSDL is an XML-based format designed to describe the interfaces exposed by a service </li></ul><ul><ul><li>What a service does? </li></ul></ul><ul><ul><li>How clients can use it? </li></ul></ul><ul><li>Separation of abstract service description from concrete messaging format: </li></ul><ul><ul><li>An abstract section describing the interfaces in a protocol-independent way </li></ul></ul><ul><ul><li>A concrete section relating the abstract definitions with the specific protocols </li></ul></ul><ul><li>It can be used with all protocols (HTTP, SMTP, etc.), but it normally runs over HTTP. </li></ul><ul><li>If sender & receiver share and understand same WSDL file, interoperability is guaranteed . </li></ul>
    17. 17. WSDL: Definitions <ul><li>A WSDL document defines services as a collection of network endpoints or ports , where the port types are abstract collection of operations , and the concrete protocol and data format specifications for a particular port type constitutes a reusable binding . </li></ul><ul><li>Types : a container for data type definitions using some type system such as XSD. </li></ul><ul><li>Message : an abstract, typed definition of the data being communicated. </li></ul><ul><li>Operation : an abstract description of an action supported by the service. </li></ul><ul><li>Port Type : an abstract set of operations supported by one or more endpoints. </li></ul><ul><ul><li>They are equivalent to interfaces. </li></ul></ul><ul><li>Binding : a concrete protocol and data format specification for a particular port type. </li></ul><ul><ul><li>The interfaces are bound to specific network and transport protocols. It is akin to implementing an interface. </li></ul></ul><ul><li>Port : a single endpoint defined as a combination of a binding and a network address. </li></ul><ul><li>Service : a collection of related endpoints. </li></ul>
    18. 18. WSDL Structure <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <definitions> <types> <!– define the types here using XML Schema  </types> <message> <!– XML messages the web service uses are defined here  </message> <portType> <!– define the input and output parameters here -  </portType> <binding> <!– define the network protocol here  </binding> <service> <!– location of the service  </service> </definitions>
    19. 19. The <types> <ul><li>The types element contains XML Schemas defining the datatypes that are to be passed to and from the web service </li></ul>< types > < schema targetNamespace=&quot;http://example.com/stockquote.xsd&quot; xmlns=&quot;http://www.w3.org/2000/10/XMLSchema&quot;> <element name=&quot;TradePriceRequest&quot;> <complexType> <all><element name=&quot;tickerSymbol&quot; type=&quot;string&quot;/></all> </complexType> </element> <element name=&quot;TradePrice&quot;> <complexType> <all><element name=&quot;price&quot; type=&quot;float&quot;/></all> </complexType> </element> </ schema > </ types >
    20. 20. The <message> <ul><li>The < message> element is used to define the messages that will be exchanged between the client and the service </li></ul><ul><li>These message elements contain < part> elements, which will be using types defined in the types element </li></ul><ul><li>All the parts are namespace qualified </li></ul>< message name=&quot;GetLastTradePriceInput&quot;> < part name=&quot;body&quot; element=&quot;xsd1:TradePriceRequest&quot;/> </ message > < message name=&quot;GetLastTradePriceOutput&quot;> < part name=&quot;body&quot; element=&quot;xsd1:TradePrice&quot;/> </ message >
    21. 21. The <portType> <ul><li>The types and messages have been defined, but they have not been defined in terms of where they fit in the functionality of the web service </li></ul><ul><li>This is done within < portType> and < operation> elements </li></ul><ul><li>A portType is analogous to a class </li></ul><ul><li>An operation is analogous to a method in that class </li></ul>< portType name=&quot;StockQuotePortType&quot;> < operation name=&quot;GetLastTradePrice&quot;> <input message=&quot;tns:GetLastTradePriceInput&quot;/> <output message=&quot;tns:GetLastTradePriceOutput&quot;/> </ operation > </ portType >
    22. 22. Types of <operation> <ul><li>There are four distinct types of operation </li></ul><ul><li>Synchronous </li></ul><ul><ul><li>Request-response - The service receives a message and sends a reply </li></ul></ul><ul><ul><li>Solicit-response - The service sends a message and receives a reply message </li></ul></ul><ul><li>Asynchronous </li></ul><ul><ul><li>One-way - The service receives a message </li></ul></ul><ul><ul><li>Notification - The service sends a message </li></ul></ul><ul><li>All of these can be defined in WSDL </li></ul>
    23. 23. Defining the type of operation <ul><li>Presence and order of input/output elements defines the type of operation. </li></ul><ul><li>Request-response <input><output> </li></ul><ul><li>Solicit-response <output><input> </li></ul><ul><li>One-way <input> only </li></ul><ul><li>Notification <output> only </li></ul>
    24. 24. The <binding> element <ul><li>This element is used to define the mechanism that the client will actually use to interact with the web service </li></ul><ul><li>The most common choice is currently SOAP </li></ul><ul><li>The binding element defines the protocol specific information for the portTypes previously defined </li></ul>
    25. 25. The binding tag <ul><li>< binding name=“ez3950SOAPBinding” type =“tns:ez3950PortTypes”> </li></ul><ul><li>The <binding> tag indicates that we will map a <Port Type> to a protocol </li></ul><ul><li>< soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> </li></ul><ul><li>Indicates we will be using the SOAP binding extensions to map the operations. </li></ul><ul><li>The alternative to “rpc” is “document”. </li></ul><ul><li>( to use GET/POST use <http:binding…> </li></ul><ul><li>to use MIME use <mime:binding…..> ) </li></ul>
    26. 26. <service> <ul><li>The final component of a WSDL file is the < service > element </li></ul><ul><li>The <service> element defines < port > elements that specify where requests should be sent </li></ul><ul><li>The <soap:address> subelement identifies the URL of the service </li></ul><ul><li>The precise content of <port> elements will be dependent upon the mechanism, i.e. SOAP, HTTP or MIME </li></ul>< service name=&quot;StockQuoteService&quot;> < port name=&quot;StockQuotePort&quot; binding=&quot;tns:StockQuoteBinding&quot;> < soap:address location=&quot;http://example.com/stockquote&quot;/> </ port > </ service >
    27. 27. WSDL: Example (1/5) <ul><li><?xml version=&quot;1.0&quot;?> </li></ul><ul><li><definitions name=&quot;StockQuote&quot; </li></ul><ul><li>targetNamespace=&quot;http://example.com/stockquote.wsdl&quot; </li></ul><ul><li>xmlns:tns=&quot;http://example.com/stockquote.wsdl&quot; </li></ul><ul><li>xmlns:xsd=&quot;http://www.w3.org/2000/10/XMLSchema&quot; </li></ul><ul><li>xmlns:xsda=&quot;http://example.com/stockquote/schema&quot; </li></ul><ul><li>xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; </li></ul><ul><li>xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; </li></ul><ul><li>xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;> </li></ul><ul><li><types> </li></ul><ul><li><schema targetNamespace=&quot;http://example.com/stockquote/schema&quot; </li></ul><ul><li>xmlns=&quot;http://www.w3.org/2000/10/XMLSchema&quot;> </li></ul><ul><li><complexType name=&quot; TimePeriod &quot;> </li></ul><ul><li> <all> </li></ul><ul><li> <element name=&quot; startTime &quot; type=&quot;xsd:timeInstant&quot;/> </li></ul><ul><li> <element name=&quot; endTime &quot; type=&quot;xsd:timeInstant&quot;/> </li></ul><ul><li> </all> </li></ul><ul><li></complexType> </li></ul>
    28. 28. WSDL: Example (2/5 <ul><li><complexType name=&quot; ArrayOfFloat &quot;> </li></ul><ul><li><complexContent> </li></ul><ul><li> <restriction base=&quot;soapenc:Array&quot;> </li></ul><ul><li><attribute ref=&quot;soapenc:arrayType&quot; wsdl:arrayType=&quot;xsd:float[]&quot;/> </li></ul><ul><li></restriction> </li></ul><ul><li></complexContent> </li></ul><ul><li></complexType> </li></ul><ul><li></schema> </li></ul><ul><li></types> </li></ul><ul><li><message name=&quot; GetTradePricesInput &quot;> </li></ul><ul><li><part name=&quot; tickerSymbol &quot; element=&quot;xsd:string&quot;/> </li></ul><ul><li><part name=&quot; timePeriod &quot; element=&quot;xsda:TimePeriod&quot;/> </li></ul><ul><li></message> </li></ul>
    29. 29. WSDL: Example (3/5) <ul><li><message name=&quot; GetTradePricesOutput &quot;> </li></ul><ul><li><part name=&quot; result &quot; type=&quot;xsda:ArrayOfFloat&quot;/> </li></ul><ul><li><part name=&quot; frequency &quot; type=&quot;xsd:float&quot;/> </li></ul><ul><li></message> </li></ul><ul><li><portType name=&quot; StockQuotePortType &quot;> </li></ul><ul><li><operation name=&quot; GetLastTradePrice &quot; parameterOrder=&quot; tickerSymbol timePeriod result frequency &quot;> </li></ul><ul><li><input message=&quot; tns:GetTradePricesInput &quot;/> </li></ul><ul><li><output message=&quot; tns:GetTradePricesOutput &quot;/> </li></ul><ul><li></operation> </li></ul><ul><li></portType> </li></ul>
    30. 30. WSDL: Example (4/5) <ul><li><binding name=&quot; StockQuoteSoapBinding &quot; type=&quot; tns:StockQuotePortType &quot;> </li></ul><ul><li><soap:binding style=&quot;rpc&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot;/> </li></ul><ul><li><operation name=&quot;GetTradePrices&quot;> </li></ul><ul><li><soap:operation soapAction=&quot;http://example.com/GetTradePrices&quot;/> </li></ul><ul><li> <input> </li></ul><ul><li> <soap:body use=&quot;encoded&quot; namespace=&quot;http://example.com/stockquote“ encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/> </li></ul><ul><li></input> </li></ul><ul><li><output> </li></ul><ul><li> <soap:body use=&quot;encoded&quot; namespace=&quot;http://example.com/stockquote&quot; </li></ul><ul><li>encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/> </li></ul><ul><li> </output> </li></ul><ul><li></operation> </li></ul><ul><li></binding> </li></ul>
    31. 31. WSDL: Example (5/5) <ul><li><service name=&quot; StockQuoteService &quot;> </li></ul><ul><li><documentation>My first service</documentation> </li></ul><ul><li> <port name=&quot; StockQuotePort &quot; binding=&quot; tns:StockQuoteBinding &quot;> </li></ul><ul><li><soap:address location=&quot; http://example.com/stockquote &quot;/> </li></ul><ul><li> </port> </li></ul><ul><li></service> </li></ul><ul><li></definitions> </li></ul>
    32. 32. UDDI <ul><li>U niversal D escription, D iscovery and I ntegration </li></ul><ul><li>A Web Service registry & discovery mechanism for retrieving pointers for web services interfaces </li></ul><ul><li>Publish your business information and technical details of your Web Service </li></ul><ul><li>Search for other Web Services and connect to them </li></ul><ul><li>UDDI is not only limited to XML Web Services </li></ul><ul><li>The key to the ultimate success of Web services, but has some key limitations , and alternative discovery methods are provided by ebXML and WS-Inspection. </li></ul>
    33. 33. UDDI Details <ul><li>SOAP is used to talk to UDDI registries </li></ul><ul><li>White pages </li></ul><ul><ul><li>Business information (name, contact info) </li></ul></ul><ul><li>Yellow pages </li></ul><ul><ul><li>Categorization (industry, products, location) </li></ul></ul><ul><li>Green pages </li></ul><ul><ul><li>Technical specifications (service description) </li></ul></ul>
    34. 34. <ul><li>Addressing </li></ul><ul><li>Axis </li></ul><ul><li>EWS </li></ul><ul><li>JaxMe </li></ul><ul><li>jUDDI </li></ul><ul><ul><li>jUDDI (pronounced &quot;Judy&quot;) is an open source Java implementation of the Universal Description, Discovery, and Integration (UDDI) specification for Web Services. </li></ul></ul><ul><li>Kandula </li></ul><ul><li>Mirae </li></ul><ul><li>Muse </li></ul><ul><li>Pubscribe </li></ul><ul><li>Sandesha </li></ul><ul><li>Scout </li></ul><ul><li>SOAP </li></ul><ul><li>TSIK </li></ul><ul><li>Woden </li></ul><ul><li>WSIF </li></ul><ul><ul><li>The Web Services Invocation Framework (WSIF) is a simple Java API for invoking Web services, no matter how or where the services are provided. </li></ul></ul><ul><li>WSRF </li></ul><ul><li>WSS4J </li></ul><ul><li>XML-RPC </li></ul>
    35. 35. Apache Axis <ul><li>Apache Axis is an Open Source SOAP server and client </li></ul><ul><li>It is completely written in Java </li></ul><ul><li>The server can be executed as a web application into servlet engines such as Jakarta Tomcat </li></ul>
    36. 36. Standard mappings from WSDL to Java byte[] xsd:hexBinary float xsd:float double xsd:double java.math.BigDecimal xsd:decimal byte xsd:byte java.util.Calendar xsd:dateTime boolean xsd:boolean Java Datatype XML Schema Datatype byte[] xsd:base64Binary
    37. 37. Standard mappings from WSDL to Java java.lang.String xsd:string short xsd:short javax.xml.namespace.QName xsd:QName long xsd:long java.math.BigInteger xsd:integer int xsd:int Java Datatype XML Schema Datatype
    38. 38. Publishing Web Services with Axis <ul><li>Let’s say we have a simple Java class like the following: </li></ul>public class Converter { public double toLire(double euro) { return euro * 1936.27; } public double toEuro(double lire) { return lire / 1936.27; } }
    39. 39. Publishing Web Services with Axis <ul><li>JWS (Java Web Service) files – Instant deploying </li></ul><ul><ul><li>Step 1 </li></ul></ul><ul><ul><ul><li>Copy Converter.java file into your axis webapp directory, and rename it as Converter.jws </li></ul></ul></ul><ul><ul><li>Step 2 </li></ul></ul><ul><ul><ul><li>You should now be able to access the service at the following URL (assuming your Axis web application is on port 8080): http://localhost:8080/axis/Converter.jws </li></ul></ul></ul>
    40. 40. Consuming Web Services with Axis import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; public class ConverterClient { public static void main(String args[]) { try { String endpoint = &quot;http://localhost:8080/axis/Converter.jws&quot;; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint)); call.setOperationName( new QName(&quot;http://localhost:8080/axis/Converter.jws&quot;, &quot;toLire&quot;)); Double ret = (Double)call.invoke( new Object[] { new Double(10.0)}); System.out.println(&quot;10 euro = &quot; + ret.doubleValue() + &quot; lire&quot;); } catch (Exception e) { e.printStackTrace(); } } }
    41. 41. Consuming Web Services with .NET (1/2) <ul><li>C# Client </li></ul><ul><ul><li>Create a new C# console application project </li></ul></ul><ul><ul><li>Add a class called ConverterClient </li></ul></ul><ul><ul><li>Add a web reference to http:// localhost :8080/ axis / Converter.jws ? wsdl in the project, otherwise the class ConverterService will not be found. </li></ul></ul>
    42. 42. Consuming Web Services with .NET (2/2) using System; using ConsoleApplication.localhost; namespace ConsoleApplication { /// <summary> /// Summary description for Class1. /// </summary> class ConverterClient { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { ConverterService converter = new ConverterService(); System.Console.WriteLine(&quot;10 euro = {0}&quot;, converter.toLire(10)); System.Console.ReadLine(); } } }
    43. 43. Using the Axis TCP Monitor (tcpmon) <ul><li>The tcpmon utility keeps a log of all request/response SOAP messages </li></ul><ul><li>It can be found in the org.apache.axis.utils package </li></ul><ul><li>To run it from the command line: </li></ul><ul><ul><li>java org.apache.axis.utils.tcpmon </li></ul></ul>
    44. 44. Publishing Web Services with .NET (1/2) <ul><li>Visual Studio .NET 2003 </li></ul><ul><ul><li>From the File menu, point to New, and click New Project </li></ul></ul><ul><ul><li>Select ASP.NET Web service </li></ul></ul><ul><ul><li>Change the Location if necessary </li></ul></ul><ul><ul><li>Click OK </li></ul></ul><ul><ul><li>Open the code window </li></ul></ul><ul><ul><li>Add the following code </li></ul></ul>
    45. 45. Publishing Web Services with .NET (2/2) <ul><li>[WebMethod] </li></ul><ul><li>public double toLire(double euro) </li></ul><ul><li>{ </li></ul><ul><li>return euro * 1936.27; </li></ul><ul><li>} </li></ul><ul><li>[WebMethod] </li></ul><ul><li>public double toEuro(double lire) </li></ul><ul><li>{ </li></ul><ul><li>return lire / 1936.27; </li></ul><ul><li>} </li></ul>
    46. 46. The Java client (1/2) <ul><li>Generate the stub to access to the Web Service java org.apache.axis.wsdl.WSDL2Java http://localhost/Converter/Service1.asmx?WSDL </li></ul><ul><li>This tool generates the following files: </li></ul><ul><ul><li>Service1.java </li></ul></ul><ul><ul><li>Service1Locator.java </li></ul></ul><ul><ul><li>Service1Soap.java </li></ul></ul><ul><ul><li>ServiceSoapStub.java </li></ul></ul>
    47. 47. The Java Client (2/2) <ul><li>import org.tempuri.*; </li></ul><ul><li>public class DotNetConverterClient { </li></ul><ul><li>public static void main(String args[]) { </li></ul><ul><li>try { </li></ul><ul><li> Service1 service = new Service1Locator(); </li></ul><ul><li> Service1Soap calculator = service.getService1Soap(); </li></ul><ul><li> System.out.println(&quot;10 euro = &quot; + calculator.toLire(10) + &quot; lire&quot;); </li></ul><ul><li>} catch (Exception e) { </li></ul><ul><li> e.printStackTrace(); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
    48. 48. Web Services Challenges <ul><li>The standards that drive Web services are still in draft form. </li></ul><ul><li>Web services need standard security procedures (a common problem to all of the distributed computing solutions). </li></ul><ul><li>The leading registry, based on the UDDI specification, has some key limitations, and alternative discovery methods are needed. </li></ul><ul><li>Web services need Quality of Service (QoS) support from Web Services Registries, Brokerages, and Network Providers. </li></ul>
    49. 49. References <ul><li>Web Services Activity </li></ul><ul><ul><li>http://www.w3.org/2002/ws/ </li></ul></ul><ul><li>W3C Web Services glossary </li></ul><ul><ul><li>http://www.w3.org/TR/ws-gloss/ </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.