1 / 10

HTML Form to Web Service Gateway

Learn about calling web services through WSDL and SOAP, creating self-describing applications, and managing web service invocations. Understand the two main layers - Description and Invocation - and explore examples of SOAP messaging. Discover how to convert page forms to WSDL descriptions and handle SOAP requests effectively.

dstoudt
Download Presentation

HTML Form to Web Service Gateway

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML Form to Web Service Gateway Ross Shannon Supervisor: Dr. Nick Kushmerick Moderator: Dr. Mel Ó Cinnéide

  2. Web Services • Modular, self-describing applications deployed and invoked from anywhere on the Web • Can be thought of as calling a function across the Internet • Most programming languages have a way of requesting web services • A number of companies have created web services, but they’re not as widespread as was hoped • Two main layers: Description and Invocation

  3. WSDL • “Web Services Description Language” • Programmer’s manual on how to call a web service • Defines • Methods available from a service • Names and types of each argument

  4. WSDL Example <message name="compoundInterestInput"> <part name="amount" type="float"/> <part name="rate" type="float"/> <part name="years" type="int"/> </message> <message name="compoundInterestOutput"> <part name="ComputedInterest" type="float"/> </message> <portType name="compoundInterestPort"> <operation name="computeCompoundInterest"> <input message="compoundInterestInput"/> <output message=" compoundInterestOutput"/> </operation> </portType>

  5. SOAP • “Simple Object Access Protocol” • Uses existing standards like XML, HTTP etc. • Client wraps the request in a “SOAP Envelope” for transport • Once the service has responded to the request, it wraps the response in SOAP and passes it back

  6. SOAP Example • A simple SOAP message to call a procedure that requires a single parameter: <SOAP-ENV:Envelope> <SOAP-ENV:Body>    <m:GetLastTradePrice xmlns:m="http://example.com/StockTrading">       <symbol>YHOO</symbol>     </m:GetLastTradePrice>   </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  7. SOAP Example (2) • The SOAP response to the preceding request: <SOAP-ENV:Envelope> <SOAP-ENV:Body>    <m:GetLastTradePriceResult xmlns:m="http://example.com/StockTrading"> <tradeprice>31.2</tradeprice>     </m:GetLastTradePriceResult>   </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  8. Project Dichotomy… The project needs two parts: • Convert all forms on a page into an equivalent WSDL description

  9. Project Dichotomy… (2) And a second part: • Allow invocations of the “service” by responding to SOAP requests and converting these back into normal form submits

  10. Future Work • Make better guesses at WSDL types • Clean up HTML output • Cross-validate SOAP request with WSDL file

More Related