Developer Forum [ All Topics | New Topic ]

Thread: GetPrice is not a member of RapaportPricesSoapClient -- error

Hello,

I am getting runtime error on "getPrice" method saying it is not a member of "RapaportPriceSoapClient" . I can see this method when I explore webservices in.net and it will let me choose method while writing code but during run time it is giving error.


Please let me know if you have any session/solution for this error.


Below is my code. Line _price = _client.GetPrice(AuthenticationTicketHeaderVal,'Round',0.8,'F', 'VS1'); is giving error.  


static void HOF_DP_TestRapService (Args _args)
{
    #define.UserId("#####")
    #define.Pass("#####")
    // This is the variable for the service client.
    ClrObject clientType;

    HOF_RapPriceRead.RapService.RapaportPricesSoapClient _client;     
    //RapImportService.HOF_RapPriceService.LoginResponse  _authHeader; //.AuthenticationTicketHeader
    HOF_RapPriceRead.RapService.AuthenticationTicketHeader AuthenticationTicketHeader;
    HOF_RapPriceRead.RapService.AuthenticationTicketHeader AuthenticationTicketHeaderVal;
   
    ClrObject priceType;
    HOF_RapPriceRead.RapService.RapaportPrice  _price;
    //HOF_RapPriceRead.RapService.GetPriceResponse priceResp;
    real price;
    str authTicket;
    str URLAuth,endPoint;
    System.Exception netException;
    HOF_RapPriceRead.RapService.LoginRequest inValue;
    ClrObject loginType;
    ;
    clientType = CLRInterop::getType("HOF_RapPriceRead.RapService.RapaportPricesSoapClient");
    //priceType = CLRInterop::getType("RapImportService.HOF_RapPriceService.RapaportPrice");
    try
    {
    _client   = AifUtil::createServiceClient(clientType);
    }
    catch(Exception::CLRError)
    {
        info("Caught 'ExException::CLRError'.");
        netException = CLRInterop::getLastException();
        info(netException.ToString());
    }
   
    AuthenticationTicketHeader = _client.Login(#UserId,#Pass);
    AuthenticationTicketHeaderVal = AuthenticationTicketHeader.get_Ticket();
    try
    {
    _price = _client.GetPrice(AuthenticationTicketHeaderVal,'Round',0.8,'F', 'VS1');
      
    }
    catch(Exception::CLRError)
    {
        info("Caught 'ExException::CLRError'.");
        netException = CLRInterop::getLastException();
        info(netException.ToString());
    }
    price = price.get_price();
    //info("sucess");
}


 



>> add a comment
Pisc
06/07/2015 04:47


1 Replies:

Hi,

 the authentication ticket should be passed in the SOAP header and not in the service call, see here the service definition https://technet.rapaport.com/webservices/prices/rapaportprices.asmx?op=GetPrice.

from our experience, for  not .NET / JAVA programmers the REST (JSON) APIs are much easier to understand and implement, so i'm highly recommend you to try the REST API instead of the web service.
more details can be found here http://technet.rapaport.com/Info/Prices/Format_Json.aspx ansd here http://technet.rapaport.com/Info/Prices/Available_Price_List_Formats.aspx  


Ephraim

>> add a comment
Ephraim
6/8/2015 2:52:00 AM