Support Forum [ All Topics | New Topic ]

Thread: How to access data using webservice named : RapLinkInventoryPlusWebService

Hello,

I have include webservice in my project :
http://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx 

and just copy and pasted your below code sample to access inventory data 
but it gives me an below error 
Error 29
"The type or namespace name 'RetailFeed' does not exist in the namespace 'CMS.RapLinkInventoryPlusWebService' (are you missing an assembly reference?)"


Code : 
RapLinkInventoryPlusWebService.RetailFeed webServiceManager = new RapLinkInventoryPlusWebService.RetailFeed();
            //This must be done in HTTPS protocol
            webServiceManager.Login("myusername", "mypassowrd");
            //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);
            int FeedID = MyFeedID;
            int DiamondCount;
            DataTable dt = webServiceManager.GetStones(MyFeedID,
            webServiceManager.Shapes.ROUND,
            0.50, 0.90, //size From - To 
            webServiceManager.Colors.D, webServiceManager.Colors.G, // Color From - To 
            webServiceManager.Clarities.IF, webServiceManager.Clarities.VVS2, // Clarity From - To 
            webServiceManager.Cuts.EXCELLENT, webServiceManager.Cuts.EXCELLENT,// Cut From - To 
            1000, 3000, // Price From - To 
            2, 50, //Page, Results in page 
            ref DiamondCount);



Can anyone who uses please reply.
Thanks in advance.


>> add a comment
Moiz
08/12/2011 04:32


5 Replies:

just to be sure
did you replace the user name and password with your user and password?


>> add a comment
ahaliav
8/22/2011 8:31:00 AM
Hi,
There is not a problem of user and password. Over here i have used myusername and password but in my code i specifying exact username and password.

I am facing below namespace error :

Error 29
"The type or namespace name 'RetailFeed' does not exist in the namespace 'CMS.RapLinkInventoryPlusWebService' (are you missing an assembly reference?)"


>> add a comment
Moiz
8/26/2011 2:53:00 AM
are you using Framework 4.0?
if yes, use this syntax

RapLinkInventoryPlusWebService.RetailFeedSoapClient webServiceManager = new RapLinkInventoryPlusWebService.RetailFeedSoapClient();

//This must be done in HTTPS protocol

RapLinkInventoryPlusWebService.AuthenticationTicketHeader ticket;

ticket = webServiceManager.Login("myusername", "mypassowrd");

//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.

string oldAddress =
webServiceManager.Endpoint.Address.ToString();


string
newAddress = "http"
+ webServiceManager.Endpoint.Address.ToString().Substring(5);


System.ServiceModel.EndpointAddress
address = new System.ServiceModel.EndpointAddress(newAddress);


webServiceManager.Endpoint.Address = address;

int FeedID = MyFeedID;

int DiamondCount=0;

DataTable dt =
webServiceManager.GetStones(ticket, MyFeedID,

RapLinkInventoryPlusWebService.Shapes.ROUND,

0.50, 0.90, //size From - To

RapLinkInventoryPlusWebService.Colors.D, RapLinkInventoryPlusWebService.Colors.G, // Color From - To

RapLinkInventoryPlusWebService.Clarities.IF, RapLinkInventoryPlusWebService.Clarities.VVS2, //Clarity From - To

RapLinkInventoryPlusWebService.Cuts.EXCELLENT, RapLinkInventoryPlusWebService.Cuts.EXCELLENT,// Cut From - To

1000, 3000, // Price From - To

2, 50, //Page, Results in page

ref DiamondCount);



>> add a comment
ahaliav
8/28/2011 5:40:00 AM
Hi,
thanks for reply.

but what if, i am using framework 3.0 then ?




>> add a comment
Moiz
8/29/2011 1:32:00 AM
if this RapLinkInventoryPlusWebService is your webservice name
this should work
RapLinkInventoryPlusWebService.RetailFeed webServiceManager = new RapLinkInventoryPlusWebService.RetailFeed();

try removing the reference to the web service and adding it again



>> add a comment
ahaliav
8/29/2011 2:59:00 AM