我是asp.net的新手,我有一个wsdl,当我为它显示的服务创建一个对象时,#34;无法为抽象类创建对象"
那么如何使用这个wsdl并调用Web服务呢?
sampleservice object = new sampleservice (cannot able to create object)
public class Demo : sampleservice .sampleservice
{
// public string auth_string = "ssampleservice ampleservice ";
//public string country_iso = "MY";
sampleservice .used_amount_data useramount = new sampleservice .used_amount_data();
sampleservice .GlobalResponse globalresponse = new sampleservice .GlobalResponse();
sampleservice .CDRPage cdrpage = new sampleservice .CDRPage();
sampleservice .RegionsExt[] regionext = new sampleservice .RegionsExt[]{};
sampleservice .api_sampleservice apidata = new sampleservice .api_didwwdata();
sampleservice .City[] city = new sampleservice .City[] { };
sampleservice .Country[] country = new sampleservice .Country[] { };
sampleservice .Rates[] rates = new sampleservice .Rates[] { };
sampleservice .Regions[] regions = new sampleservice .Regions[] { };
sampleservice .prepaid_data prepaiddata = new sampleservice .prepaid_data();
那么如何从抽象类中检索它
答案 0 :(得分:0)
那么如何从抽象类中检索它
简单回答,你不能。如果您的服务WSDL只有abstruct类,那意味着您的服务(OR)没有实现您尝试使用的服务。
看看你是否有一个实现服务的具体类,并尝试使用该类创建代理对象。
如果您确实想要使用/ Inherit该服务abstruct类,那么请考虑获取服务项目dll
并使用相同的服务项目。