首先你要引用你写的webservice的地址然后你在程序里实例化一下,就像实例化一个类一样比如你写了个web service名字叫WdHelloWord然后路面有一个方法就HelloWord返回的是string 然后你在程序里写WdhelloWord wd = new wdhellowordstring str - wd.helloword就是这样写的