consuming web services record set

Discussion in 'ASP .Net Web Services' started by DC Gringo, Jan 28, 2004.

  1. DC Gringo

    DC Gringo Guest

    I'm trying to consume a web service and use xslt transformation to display a
    simple HTML table with a record set from a SQL database. I have put
    together the web form using a static xml file full of data. Now I'm trying
    to draw the data out using a component and an xsd.

    With this new setup, in my web form, what replaces my DocumentSource
    attribute?

    <asp:Xml id="Xml1" runat="server" DocumentSource="allCountries.xml"
    TransformSource="style.xslt"></asp:Xml>



    Here's my code behind on my web form (below it is my xsd):


    Public Class index1
    Inherits System.Web.UI.Page

    #Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub
    InitializeComponent()
    Me.CountryData = New
    LisExplorerV1.LISXMLWebServiceReference.countries1
    CType(Me.CountryData,
    System.ComponentModel.ISupportInitialize).BeginInit()
    '
    'CountryData
    '
    Me.CountryData.DataSetName = "countries1"
    Me.CountryData.Locale = New
    System.Globalization.CultureInfo("en-US")
    CType(Me.CountryData,
    System.ComponentModel.ISupportInitialize).EndInit()

    End Sub
    Protected WithEvents CountryData As
    LisExplorerV1.LISXMLWebServiceReference.countries1
    Protected WithEvents Xml1 As System.Web.UI.WebControls.Xml

    'NOTE: The following placeholder declaration is required by the Web Form
    Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub

    #End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    End Sub

    End Class


    MY XSD:

    <?xml version="1.0" standalone="yes"?>
    <xs:schema id="allCountries"
    targetNamespace="http://www.tempuri.org/allCountries.xsd"
    xmlns:mstns="http://www.tempuri.org/allCountries.xsd"
    xmlns="http://www.tempuri.org/allCountries.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
    attributeFormDefault="qualified" elementFormDefault="qualified">
    <xs:element name="allCountries" msdata:IsDataSet="true">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element name="OrgCntry">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="CountryIdx" type="xs:short" minOccurs="0" />
    <xs:element name="CountryCode" type="xs:string" minOccurs="0"
    />
    <xs:element name="CountryName" type="xs:string" minOccurs="0"
    />
    <xs:element name="CountryAKA" type="xs:string" minOccurs="0"
    />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
     
    DC Gringo, Jan 28, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Knoop
    Replies:
    4
    Views:
    555
    John Knoop
    Jul 25, 2003
  2. Tomas Deml

    Consuming XML Web Services from ASP.NET

    Tomas Deml, Nov 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    415
    Tomas Deml
    Nov 10, 2003
  3. bob garbados

    Problems Consuming Web Services

    bob garbados, Oct 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,089
    Sayed Hashimi
    Oct 13, 2004
  4. Replies:
    3
    Views:
    354
    Andrew Thompson
    Aug 25, 2005
  5. Praveen
    Replies:
    1
    Views:
    696
    Praveen Mohanan
    May 4, 2006
Loading...

Share This Page