consuming web services record set

D

DC Gringo

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top