1 / 12

Consuming popular web services

Consuming popular web services. Amazon, Ebay and Google at your fingertips. Who am I. Michael Dinowitz Head of House of Fusion Publisher of Fusion Authority Founding member of Team Macromedia Using ColdFusion since June 1995. What are web services. Data without the user interface

osmond
Download Presentation

Consuming popular web services

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. Consuming popular web services Amazon, Ebay and Google at your fingertips

  2. Who am I • Michael Dinowitz • Head of House of Fusion • Publisher of Fusion Authority • Founding member of Team Macromedia • Using ColdFusion since June 1995

  3. What are web services • Data without the user interface • Formatted in XML • Delivered directly • Pre-stored in a structured format when retrieved

  4. Basics: Connect • Uses CFINVOKE, CFOBJECT or CreateObject() to connect

  5. CFINVOKE • Calls a web service directly • Uses CFINVOKEARGUMENT to pass arguments • Returns a single variable • One method call per invoke

  6. CFINVOKE Example • <cfinvoke    • webservice="http://www.xmethods.net/sd/2001/TemperatureService.wsdl"    • method="getTemp"    • returnvariable="aTemp">      • <cfinvokeargument name="zipcode" value="55987"> • </cfinvoke> • <cfoutput>The temperature is #aTemp#</cfoutput>

  7. CreateObject() Example • Connects to service • Calls methods separately • Can invoke multiple methods per connection • <cfscript> • ws = CreateObject("webservice", "http://www.xmethods.net/sd/2001/TemperatureService.wsdl"); xlatstring = ws.getTemp(zipcode = "55987"); • writeoutput("The temperature is " & xlatstring); </cfscript>

  8. CFOBJECT • Same as CreateObject() but uses the tag

  9. Issues • Security • Getting service ID from vendor • Read the docs!!!!

  10. Amazon

  11. Google

  12. Ebay

More Related