Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Looking at Web Services with Visual Studio 2005

Download

Right click “Save as…”

The Web Services platforms represents the evolution of past distributed component technologies. They really were the result of developments and companies struggling with the various interoperability issues that were common with other technologies. Web Services aren’t the only distributed technology available but certainly the most prevalent.

In this screencast Thom takes a look at some of the more important changes within the Web Services infrastructure using Visual Studio 2005. These include the addition of the WS-I basic profile, and building typed datasets.

Tags:

Follow the Discussion

  • KhamulKhamul Death by Escape Key
    One question: localhost.com? What the?
  • Luciano Evaristo GuercheguercheLE guerchele

    Dear Thom,

    I created a sample quite similar to yours, but using Microsoft Visual Web Developer 2005 Express Edition and Microsoft Visual Basic 2005 Express Edition. Moreover, I tried to implement a way to client(s) send changes back to server, through EmployeesUpdate method, but it is not working. Would you mind looking at code below and pinpointing what I have done wrong?

    Regards,

    Luciano Evaristo Guerche
    Taboão da Serra, SP, Brazil

    'Service.vb
    '-------------------------------------------------------------------------------
    Imports System.Web
    Imports System.Web.Services
    Imports System.Web.Services.Protocols

    <System.Web.Services.WebService(Namespace:="http://www.rabobank.com/dataaccess/adventureworks", Description:="Provides data access to Adventureworks database")> _
    <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Public Class Service
        Inherits System.Web.Services.WebService

        <WebMethod()> _
        Public Function EmployeesGetData() As AdventureWorks.EmployeesDataTable
            Return CType(New AdventureWorksTableAdapters.EmployeesTableAdapter, AdventureWorksTableAdapters.EmployeesTableAdapter).GetData()
        End Function

        <WebMethod()> _
        Public Function EmployeesUpdate(ByVal employeeDataTable As AdventureWorks.EmployeesDataTable) As Integer
            Return CType(New AdventureWorksTableAdapters.EmployeesTableAdapter, AdventureWorksTableAdapters.EmployeesTableAdapter).Update(employeeDataTable)
        End Function
    End Class


    'EmployeesForm.vb
    '-------------------------------------------------------------------------------
    Public Class EmployeesForm
        Private Sub EmployeesForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Me.AdventureWorks.Merge(CType(New Global.WindowsApplication1.localhost.Service, Global.WindowsApplication1.localhost.Service).EmployeesGetData())
        End Sub

        Private Sub EmployeesBindingNavigatorRefreshItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Me.AdventureWorks.Merge(CType(New Global.WindowsApplication1.localhost.Service, Global.WindowsApplication1.localhost.Service).EmployeesGetData())
        End Sub

        Private Sub EmployeesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            CType(New Global.WindowsApplication1.localhost.Service, Global.WindowsApplication1.localhost.Service).EmployeesUpdate(Me.AdventureWorks.Employees)
        End Sub
    End Class

    'Reference.vb
    '-------------------------------------------------------------------------------
    Option Strict Off
    Option Explicit On

    Imports System
    Imports System.ComponentModel
    Imports System.Diagnostics
    Imports System.Web.Services
    Imports System.Web.Services.Protocols
    Imports System.Xml.Serialization

    '
    'This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
    '
    Namespace localhost
        '''<remarks/>
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42"),  _
         System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.ComponentModel.DesignerCategoryAttribute("code"),  _
         System.Web.Services.WebServiceBindingAttribute(Name:="ServiceSoap", [Namespace]:="http://www.rabobank.com/dataaccess/adventureworks")>  _
        Partial Public Class Service
            Inherits System.Web.Services.Protocols.SoapHttpClientProtocol

            'abridged for brevity's sake...

            '''<remarks/>
            <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.rabobank.com/dataaccess/adventureworks/EmployeesUpdate", RequestNamespace:="http://www.rabobank.com/dataaccess/adventureworks", ResponseNamespace:="http://www.rabobank.com/dataaccess/adventureworks", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>  _
            Public Function EmployeesUpdate(ByVal employeeDataTable As AdventureWorks.EmployeesDataTable) As Integer
                Dim results() As Object = Me.Invoke("EmployeesUpdate", New Object() {employeeDataTable})
                Return CType(results(0),Integer)
            End Function
        End Class
    End Namespace

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.