在可移植类库中使用soapweb服务
我有一个面向.NET framework 4.5、silverlight 4及更高版本和windows phone 8的可移植类库。我想使用添加服务引用使用该PCL中的SOAP服务在可移植类库中使用soapweb服务,soap,portable-class-library,Soap,Portable Class Library,我有一个面向.NET framework 4.5、silverlight 4及更高版本和windows phone 8的可移植类库。我想使用添加服务引用使用该PCL中的SOAP服务 ServiceReference1.TadawulMarketServicePortTypeClient c = new ServiceReference1.TadawulMarketServicePortTypeClient(ServiceReference1.TadawulMarketServicePor
ServiceReference1.TadawulMarketServicePortTypeClient c = new ServiceReference1.TadawulMarketServicePortTypeClient(ServiceReference1.TadawulMarketServicePortTypeClient.EndpointConfiguration.TadawulMarketServiceSOAP11port_http, new EndpointAddress(""));
c.getMarketSummaryCompleted+=c_getMarketSummaryCompleted;
c.getMarketSummaryAsync();
}
private void c_getMarketSummaryCompleted(object sender, ServiceReference1.getMarketSummaryCompletedEventArgs e)
{
// throw new NotImplementedException();
}
当我在PCL上使用此代码时,服务返回null,但当我在Windows phone应用程序中使用此代码时,它返回数据
我想知道这样做的原因以及如何正确使用这项服务