Home
Developers

Developers

  • Documentation
    • Developer Guide
    • API Reference
    • Style Guide
    • How-To
    • Troubleshooting
  • Submit a Flake
  • Support

Pageflakes How-To and Troubleshooting Guide

  • Manage Flake Instances
  • Server-Side Scripting
  • Auto-Save Settings
  • Storing an Array into a Profile
  • Using CSS
  • Access Web Services from Flakes
  • Flake Development Tools
  • Troubleshooting
Home » Documentation » How-To

Access Web Services from Flakes

Any flakes hosted on the Pageflakes server can access typed web services provided by ASP.NET Ajax. This code example shows a script tag in JavaScript that makes a web service available:


<script language="JavaScript" src="SimpleService.asmx/js">

This example generates a JavaScript proxy to a web service developed in ASP.NET 2.0. Now web-services can be called anytime directly from JavaScript.


requestSimpleService = SimpleService.EchoString (
  "SomeText", //params
  OnComplete, //On Complete callback
  OnError //OnError callback
);

If a particular service accepts more than one parameter, the call should be performed as follows:


requestSimpleService = SimpleService.EchoString (
  "SomeText",     //params
  "another param",
  "another param",
  OnComplete,    //On Complete callback
  OnError        //OnError callback
);
‹ Using CSSupFlake Development Tools ›
»
  • Printer-friendly version