2
Answers

How to solve this web service issue?

Hi,
 
 I have a WSDL service (see attached extracted file from WSDL).That used for currency converter.
Here is my code 
 
CurrencyWebRef.CurrencyService obj = new CurrencyWebRef.CurrencyService();
CurrencyWebRef.Currency Currency = new CurrencyWebRef.Currency();
double dt = new double();
Response.Write(obj.GetConversionRate(CurrencyCode.AED, true, CurrencyCode.ANG, true)); 
 
I have a problem with this conversion and I will get the result as "Currency" instead of the real
conversion rate.Surely I have made some mistake in my code.Can anyone help me out.
 
I have a doubt with highlighted part.

Thanks
 

Attachment: currencyservice.zip

Answers (2)
0
Brian Manlove

Brian Manlove

NA 6 0 19y
Not a good idea IMHO. Typically I would use an interface to specifically define common methods that would be used by multiple implementors... for example, the classic "Save", "Delete", and "Update" methods of my business objects. I would define the interface with those methods and/or possible overrides of them, and my "customer", "vendor", "order" objects would each implement this common interface. I would instantiate an interface object and then access each implementation object thru this single interface. If I found myself needing to create an object that "chained" interfaces, it would signify to me that my original interface needs some more methods added to it. However, since I'm just someone deep in the trenches and I don't have a lot of time for theoretical pursuits, I'm sure a lot of folks may differ with this opinion.