In ServiceModel client configuration section, you can not find references agreement

<system.serviceModel>

<bindings>
<basicHttpBinding>
<binding name="SAPERP_WebServiceSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:6888/SAPERP_WebService.asmx" binding="basicHttpBinding"
bindingConfiguration="SAPERP_WebServiceSoap" contract="ServiceReference1.SAPERP_WebServiceSoap"
name="SAPERP_WebServiceSoap" />
</client>
</system.serviceModel>

 

View web.config here is more or less or no

 

In addition to call webservice method, then find your name in accordance with the suffix is ​​"SoapClient" of

Domain.ServiceReference1.SAPERP_WebServiceSoapClient test = new SAPERP_WebServiceSoapClient();
var json = "{\"DATA\":[{\"CODE\":\"01\",\"VALUE\":\"采购方式\",\"FCODE\":\"0\"}]}";
var model = JsonConvert.DeserializeObject<SupCategoryCreateViewModel>(json);
test .AddSupplierCategorys(model);

 

Think or write about it before then do not get too webservice which are commonly used in a somewhat vague in order to write a blog to look to strengthen memory

If you do not know how to write webservice can refer to this blog

https://www.cnblogs.com/cr-cool/p/9482894.html

 

Guess you like

Origin www.cnblogs.com/sajiao/p/12036762.html