100 likes | 114 Views
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.
E N D
HTML Form to Web Service Gateway Ross Shannon Supervisor: Dr. Nick Kushmerick Moderator: Dr. Mel Ó Cinnéide
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
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
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>
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
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>
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>
Project Dichotomy… The project needs two parts: • Convert all forms on a page into an equivalent WSDL description
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
Future Work • Make better guesses at WSDL types • Clean up HTML output • Cross-validate SOAP request with WSDL file