Click here to Skip to main content
14,217,568 members
Rate this:
Please Sign up or sign in to vote.
See more:
Dear Sir,

I am Debapriya Sahoo is a .NET Developer.In a project i have need the daliy gold and silver price in Indian currency. So I am add web referance the http://www.webservicex.net/LondonGoldFix.asmx?WSDL[^] and http://www.webservicex.net/CurrencyConvertor.asmx?WSDL[^] web service.Change the name to WSDL.

Add the code written below and does not get the gold & silver price.
Please help me.
WSDL.LondonGoldAndSilverFix obj = new WSDL.LondonGoldAndSilverFix();
WSDL.LondonMarketData data=obj.GetLondonGoldAndSilverFix();

lblStatus.Text = data.Status.ToString();
double glPrice =data.Gold_AM_EUR.ToString();
double svPrice= data.Silver_EUR.ToString();

WSDL.CurrencyConvertor ob1 = new WSDL.CurrencyConvertor();           
double percent= ob1.ConversionRate(WSDL.Currency.LBP,WSDL.Currency.INR);

lblGold.Text=Convert.ToString(percent*glPrice);
lblSilver.Text=Convert.ToString(percent*svPrice);


Thanking You,
Debapriya Sahoo
Posted
Updated 11-Mar-11 2:09am
v3
Comments
Sandeep Mewara 10-Mar-11 2:29am
   
1. Use PRE tags to format code part. It makes the question readable.
2. Avoid giving email id if you dont like SPAM
R. Giskard Reventlov 10-Mar-11 3:37am
   
Have you stepped through the code to ensure that the objects are properly initialised?
Ankur\m/ 11-Mar-11 8:26am
   
This is a follow-up question. Original link - http://www.codeproject.com/Questions/163262/Free-Web-service-for-live-gold-silver-rate-in-indi.aspx

I thought it might be helpful to someone replying.
Ankur\m/ 11-Mar-11 8:28am
   
BTW, check what digital man has said. Step through the code to see what and where it is not working for you.
Rate this:
Please Sign up or sign in to vote.

Solution 1

The web service isn't working.

If you go to the browser interface here:

http://www.webservicex.net/LondonGoldFix.asmx?op=GetLondonGoldAndSilverFix[^]

...and click the Invoke button, nothing happens.

It ain't you, it's them.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

You can access free Gold and Silver Live prices web services here - www.FreeWebServicesX.com

However, the services are in USD. You will have to look for the USD-INR conversion web service to have the Gold Prices in Indian Rupees.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100