开发者

Client App with WCF to consume ASMX

I have a webservice with .NET 1.1 (old school ASMX) and I am creating a client app to connect to it and use its services. From what I remember from the last time I had used Visual studi开发者_JAVA技巧o -which was 2003 version!- I can add a WebReference to it and easily use it. Tried it . it still works. but it looks like things have changed in 2008 and now we also have WCF. so I can add it as a Service Reference. but with this new method I could not find a way to create an Instance object to the ASMX service and call its methods... how do we accomplish the same thing with WCF?


Ok. done: we should create a ServiceSoapClinet . an example from my play app:

using (LatestServiceSoapClient proxy = new LatestServiceSoapClient("LatestServiceSoap"))
{
    label1.Text = proxy.Welcome();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜