Web Service method

Discussion in 'ASP.NET / ASP.NET Core' started by BeginnerBob, Jul 12, 2013.

  1. Hi,

    I am trying to consume a web service.


    SessionExportService wSpeedShield = newSessionExportService();

    FWSession wBulkSession = newFWSession();

    wBulkSession = wSpeedShield.GetBulkSessionData(

    "testuser", "testpassword", 1, 2000)

    My method is:



    ///<remarks/>

    [System.Web.Services.Protocols.
    SoapDocumentMethodAttribute("http://www.speedshield.com/GetBulkSessionData", RequestNamespace="http://www.speedshield.com/", ResponseNamespace="http://www.speedshield.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]


    publicFWSession[] GetBulkSessionData(string userName, string password, int lastSessionID, int maxSessionCount) {


    object[] results = this.Invoke("GetBulkSessionData", newobject[] {

    userName,

    password,

    lastSessionID,

    maxSessionCount});


    return ((FWSession[])(results[0]));

    }


    However, when I run the line of code

    wBulkSession = wSpeedShield.GetBulkSessionData(
    "testuser", "testpassword", 1, 2000)

    I get the error message:


    Error 1 Cannot implicitly convert type 'ST_96415bcd99b94c5791801a4de2eb3b2c.csproj.com.ss.www.FWSession[]' to 'ST_96415bcd99b94c5791801a4de2eb3b2c.csproj.com.ss.www.FWSession'

    Any ideas?

    Thanks
    Bob
     

Share This Page