Click here to Skip to main content
15,887,135 members
Articles / Web Development / HTML

Remote Scripting - Calling a WebService with JavaScript and C#

Rate me:
Please Sign up or sign in to vote.
3.85/5 (11 votes)
18 Feb 20052 min read 293.7K   5K   46  
Calling a WebService with JavaScript. Security included by using a local asmx with the function of proxy, and not revealing the webservice URI in the JavaScript.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:mstns="http://www.tempuri.org/dsDatos.xsd" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns="http://www.tempuri.org/dsDatos.xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.tempuri.org/dsDatos.xsd" id="dsDatos" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element msdata:IsDataSet="true" name="dsDatos">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="Products">
          <xs:complexType>
            <xs:sequence>
              <xs:element msdata:ReadOnly="true" msdata:AutoIncrement="true" name="ProductID" type="xs:int" />
              <xs:element name="ProductName" type="xs:string" />
              <xs:element minOccurs="0" name="SupplierID" type="xs:int" />
              <xs:element minOccurs="0" name="CategoryID" type="xs:int" />
              <xs:element minOccurs="0" name="QuantityPerUnit" type="xs:string" />
              <xs:element minOccurs="0" name="UnitPrice" type="xs:decimal" />
              <xs:element minOccurs="0" name="UnitsInStock" type="xs:short" />
              <xs:element minOccurs="0" name="UnitsOnOrder" type="xs:short" />
              <xs:element minOccurs="0" name="ReorderLevel" type="xs:short" />
              <xs:element name="Discontinued" type="xs:boolean" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique msdata:PrimaryKey="true" name="Constraint1">
      <xs:selector xpath=".//mstns:Products" />
      <xs:field xpath="mstns:ProductID" />
    </xs:unique>
  </xs:element>
</xs:schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Founder Cimar Solutions
Mexico Mexico
Ing. F. Marcelo Lujan alias El Bebe Dot Net. Hola, yo desarrollo de forma independiente en C#. ASP.NET y Win32 Diseño Macromedia etc. con mas de 10 años de experiencia en informática y soporte a sistemas, así como desarrollo de software y nuevos productos.

Espero que ayude la informacion que pongo a su disposicion.
I Hope this information that i upload to codeproject helps you.
Atte: Marcelo Lujan

Comments and Discussions