原因是config节点中多了endpoint相同节点删除不用的即可,不知道为什么我添加JAVA WebService时候出现二个连接。
或使用
ServiceReference1.StudentServicePortTypeClient client =
new ServiceReference1.StudentServicePortTypeClient("StudentServiceHttpSoap11Endpoint");
手动指定config中的name
转自:http://www.cnblogs.com/freexiaoyu/archive/2012/09/21/2696576.html