Developer Forum [ All Topics | New Topic ]

Thread: The type or namespace name 'RapLinkWebService' could not be found (are you missing a using directive or an assembly reference?)

Hello,

i want to integrate following method to get details of Diamonds in my application
http://technet.rapaport.com/Info/RapLink/SampleCode/WebService_Example.aspx

I am using C# ASP.NET for this.

I have add web reference of http://technet.rapaport.com/webservices/feeds/RapNetInventoryLink.asmx to my application and trying to use code which shown on  
http://technet.rapaport.com/Info/RapLink/SampleCode/WebService_Example.aspx

But i am getting following error while debugging the application.
1.The type or namespace name 'RapLinkWebService' could not be found (are you missing a using directive or an assembly reference?)   
2.The name 'RapLinkWebService' does not exist in the current context.  


Should i miss something?. I have attach the code which i have used.

Below is my code.

/***********************/
using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using System.IO;
using System.Net;
using System.IO.Compression;
using System.Collections.Specialized;
using com.rapaport.technet;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


    }
 protected void Button2_Click(object sender, EventArgs e)
    {

        RapLinkWebService.DownloadListings webServiceManager = new RapLinkWebService.DownloadListings();

        //This must be done in HTTPS protocol
        webServiceManager.Login("MyUser", "MyPassword");

        //After log in you will receive a encrypted ticket with your credentials. This will be used to authenticate your session.
        //Now you can choose to change the protocol to HTTP so it works faster.
        webServiceManager.Url = "http" + webServiceManager.Url.Substring(5);

        //You must use the Init() method to get the parameter class.
        RapLinkWebService.RapNetInventoryLinkParameters setPatams = RapLinkWebService.Init();

        Shapes[] MyShapes = new Shapes[1];
        MyShapes[0] = Shapes.ROUND;
        setPatams.ShapeCollection = MyShapes;

        setPatams.MinSize = 2;
        setPatams.MaxSize = 3;

        setPatams.Markup = 120;

        DataSet ds = webServiceManager.GetDiamonds(setPatams);

    }
}


/***********************/


>> add a comment
Jinal Shah
02/19/2011 04:43


1 Replies:

try to use the following code

RapNetInventoryLink webServiceManager = new RapNetInventoryLink();

 

webServiceManager.Login("UseName", "Password");

webServiceManager.Url = "http" + webServiceManager.Url.Substring(5);

RapNetInventoryLinkParameters setPatams = webServiceManager.Init();

Shapes[] MyShapes = new Shapes[1];

MyShapes[0] = Shapes.ROUND;

setPatams.ShapeCollection = MyShapes;

setPatams.MinSize = 2;

setPatams.MaxSize = 3;

setPatams.Markup = 120;

DataSet ds = webServiceManager.GetDiamonds(setPatams);



>> add a comment
Ephraim
2/20/2011 6:43:00 AM