Week2 Using the flash connect the web servers

March 17-21  week2

last week i have done the simple web service: Using the vb application to connect the web service to make the simple chat system.

This week i try to use the flash to connect the web service. learn how to use the flash component : webservice connector.

4 Comments

  1. Ryan Clarke said,

    March 17, 2008 at 9:47 pm

    Good job boss :) Keep it up…

    I had some difficulties getting the Connector going, but once i did get my head around it, it was plain sailing…

    Sorry I cant remember the details, if I could I would let you know what I had to do to get it working.

    Regards,

    Ryan

  2. geforce2008 said,

    March 18, 2008 at 9:18 pm

    OK

  3. geforce2008 said,

    March 19, 2008 at 3:17 am

    The web service connected the database i got the error message:

    Cannot serialize member System.ComponentModel.MarshalByValueComponent.Site of type System.ComponentModel.ISite because it is an interface.

    Firstly i try to comment the: Inherits System.Web.Services.WebService.
    And it was worked. And then i started the web siervice try to execute the web service and found out there were nothing message show in the XML file.

    So i uncomment the “Inherits System.Web.Services.WebService”. and try to find out the reason of the this error.

    I have tried to comment the GetThread and UpdataThread function only DeleteThread function left, and it was perfect word.

    From the google i found:

    CAUSE
    This is by design. The DataTable, DataRow, DataView, and DataViewManager
    objects are not serializable and cannot be returned from a Web Service. In
    order to return less than a complete DataSet, you have to copy the data you
    wish to return to a new DataSet.

    RESOLUTION
    You can resolve this issue by returning a DataSet instead of a DataTable.
    DataSets can contain one or more DataTables.

    Reference: http://www.dotnet247.com/247reference/msgs/4/21203.aspx

  4. geforce2008 said,

    March 22, 2008 at 7:09 am

    I trid to find out how to change the list to xmlserialize. But it was different to do it.
    Finally i change the list to dataset. and it was work.
    The code show below:

    Public Function GetListOfGalleries() As DataSet
    Dim db As Database = DatabaseFactory.CreateDatabase(“GalleryDatabase”)
    Dim dbCommand As DbCommand = db.GetStoredProcCommand(“GetGalleries”)

    Dim ds As New DataSet
    ds = db.ExecuteDataSet(dbCommand)
    Return ds

    End Function


Post a Comment