<%@ CodeTemplate Language="VB" TargetLanguage="T-SQL" Description="Create an HTTP Endpoint." %> <%@ Property Name="InitialState" Type="StateEnum" Category="Options" Default="STARTED" Description="The initial state of the Web service." %> <%@ Property Name="Authentication" Type="AuthenticationEnum" Category="Options" Default="INTEGRATED" Description="Authentication method." %> <%@ Property Name="Port" Type="PortsEnum" Category="Options" Default="CLEAR" Description="Port to use." %> <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context" Description="Table that the Web service will access." %> <%@ Assembly Name="SchemaExplorer" %> <%@ Import Namespace="SchemaExplorer" %> CREATE PROC dbo.<%= SourceTable.Owner %><%= SourceTable.Name %>Proc AS SELECT <% For i As Integer = 0 To SourceTable.Columns.Count -1 %> <%= SourceTable.Columns(i).Name %><% If i < SourceTable.Columns.Count - 1 Then %>,<% End If %> <% Next %> FROM <%= SourceTable.Name %> GO CREATE ENDPOINT Get<%= SourceTable.Name %> STATE = <%= GetState(InitialState) %> AS HTTP ( PATH = '/<%= SourceTable.Name %>', AUTHENTICATION = (<%= GetAuthentication(Authentication) %>), PORTS = (<%= GetPort(Port) %>), SITE = 'localhost' ) FOR SOAP ( WEBMETHOD '<%= SourceTable.Name %>List' (NAME='<%= SourceTable.Database.Name %>.dbo.<%= SourceTable.Owner %><%= SourceTable.Name %>Proc'), BATCHES = DISABLED, WSDL = DEFAULT, DATABASE = '<%= SourceTable.Database.Name %>', NAMESPACE = 'http://<%= SourceTable.Database.Name %>/<%= SourceTable.Name %>' ) GO