Follow the steps to invoke a webservice using a XMLHTTP object in javascript
Step 1: Create a soap envelope for the requested method.

var envelope = <The above string>;
Step 2: Create Instance of XMLHTTP Object
Now in the Javascript method create an instance of the XMLHTTP object

Step 3: Prepare the Webservice Request
As shown above the url points the target webservice which is Service.asmx file and named of the method is HelloWorld. The syntax to be used

http://<Host Name>/<Virtual Directory>/<Webservice>/Method Name
in the next line we are initiating a POST request for the webservice url.
Step 4: Handling the Callback

Here when the response from the web service returns it just display the return string in alert box.
Step 5: Sending the Request

As shown above, the send message is send with the envelope for the Web Method prepare in the Step 1.
Step 6: Executing the Web Service

Refer to this link for more http://support.microsoft.com/default.aspx/kb/893659
Its been days that I was trying to write a simple app using AIR, the buzz word these days, so downloaded the following
- Adobe AIR SDK.
- Adobe AIR SDK documentation.
Extract these above stuff after downloading. The documentation is quite good for a HTML /Javascript developer like me. Here I write a Hello World html file using AIR framework.
There are three things to be done
- Application XML file.
- HTML File.
- Executing the application.
Application XML File
- Create a XML file named <AppName>-app.xml, here appname can be HelloAIR.
- The structure of XML is

The text of rootContent element represents the name of the html file that is associated with the xml.
HTML File
The following the html code

The appLoad is invoked when the page is loaded. As shown above we are including the standard AIRAliases.js file in the HTML file, so AIR runtime will be initialized. If its initialized the Air.Trace statement is used to print on AIR console “Hello Air”. Then XMLHTTP request is made for getting request.txt file and dumping the content of that file onto the AIR console.
Executing the Application
When the AIR sdk is extracted there are two programs that come
- ADL: To execute the AIR application
- ADT: to package the AIR application
Use the adl command to execute the AIR application.
The ADL command
When you execute the command with XML as parameter then the following is displayed


As shown above the Hello.AIR is the Air.Trace output and the white console displays thee content of the request.txt file.