90 likes | 238 Views
Unit 6 Web Services. Creating & Consuming. Agenda. What are web services Associated terms Creating web services Consuming web services Naming conventions Information Hiding. What are Web Services. Web services are methods on the web that serve a specific purpose. Web services.
E N D
Unit 6Web Services Creating & Consuming
Agenda • What are web services • Associated terms • Creating web services • Consuming web services • Naming conventions • Information Hiding
What are Web Services • Web services are methods on the web that serve a specific purpose.
Web services • Suggestions for creating web services • Inputs and sometimes outputs • No GUI, no HTML • Disparate systems
Associated terms • Communicate over HTTP • Describe themselves using WSDL • Can be discovered using UDDI • XML is the basis for Web services • SOAP is the protocol that defines how web services function.
Creating web services • Use application root • Add a web service file & set name • ASMX • Note web address – namespace • Modify sample code • Data type (returning variable) = Data type (output variable in header)? • Run and review
Consuming a web service • Identify your needs • Verify what the web service can provide • Add a web reference to point to it • Name the web reference • In the file, import a namespace using the same name • Instantiate a web service and supply the inputs the method requires
Consuming, for example • 1. Find the web service • 2. Add a web reference • 3. Insert a namespace • 4. Create a web service object • 5. Use it!
Information Hiding … orWhat can you tell from a web service? • What it does • Inputs • Outputs • What it is called • Web service name • Web method name