Developer Forum [ All Topics | New Topic ]

Thread: Using RapNetInventoryLinkParameters

I used the .NET SDK to run the wsdl.exe tool and create the cs file for my client project. I am able to use this client project to communicate with the rapaport web service. The problem that I'm facing is that I'm not receiving any data back. The dataset that is returned when calling the
GetDiamonds function on the RapNetInventoryLink object contains a table with no rows.

The following is the C# code that I'm running. The value of the rowCount that I obtain at the end of the code is 0.

I wanted to get some help on what I'm doing wrong. Are there any parameters which I have to set? Do I have to make configuration changes to my RapNet account? The reason that I'm using the web service as apposed to POST command is that I feel that I have more control this way.


            string username = "UUUU";
            string password = "PPPP";

            RapNetInventoryLink rapNetInvLink = new RapNetInventoryLink();
            rapNetInvLink.Url = "https://technet.rapaport.com/webservices/feeds/RapNetInventoryLink.asmx";
            rapNetInvLink.Login(username, password);

            RapNetInventoryLinkParameters linkParams = new RapNetInventoryLinkParameters();
            linkParams.Markup = 120;
            System.Data.DataSet ds = rapNetInvLink.GetDiamonds(linkParams);

            int rowCount = ds.Tables[0].Rows.Count;



>> add a comment
Hootan
08/23/2010 11:34


3 Replies:

Hi Hootan

Try changing your code like this…

 

RapNetInventoryLink rapNetInvLink = new RapNetInventoryLink();

rapNetInvLink.Login(username, password);
RapNetInventoryLinkParameters setPatams = webServiceManager.Init();

setPatams.IncludeFancyDiamonds = true/false;

setPatams.IncludeWhiteDiamonds = true/false;

linkParams.Markup = 120;
System.Data.DataSet ds = rapNetInvLink.GetDiamonds(linkParams);



>> add a comment
Ahaliav Fox
8/24/2010 6:42:00 AM
Thanks for your help. It accomplished most of what I was looking for. The only problem that I continue to have now is the ability to exclude certain vendors from my list when doing a web service. Can I do this in code or is there something that I have to set up through my account settings?

>> add a comment
Hootan
8/28/2010 1:14:00 AM

Hi Hootan


you can use this parameters like this,

for including members:

setParams.IncludeMemberCollection = new int[3];

setParams.IncludeMemberCollection[0] = 123;

setParams.IncludeMemberCollection[1] = 456;

setParams.IncludeMemberCollection[2] = 789;

and for excluding members:

setParams.ExcludeMemberCollection = new int[3];

setParams.ExcludeMemberCollection[0] = 123;

setParams.ExcludeMemberCollection[1] = 456;

setParams.ExcludeMemberCollection[2] = 789;



>> add a comment
Ahaliav Fox
8/29/2010 2:41:00 AM