1. webservice还是用http://netboy.cnblogs.com/archive/2006/02/18/333260.html。^_^,这就叫复    用!自己先吐下!

2.偶用的是vs2005,首先当然是添加MSXML2的com组件了,地球人都知道。下面代码直接上了,^_^。

 1c#+xmlhttp调用webserviceusing System;
 2c#+xmlhttp调用webserviceusing System.Collections.Generic;
 3c#+xmlhttp调用webserviceusing System.ComponentModel;
 4c#+xmlhttp调用webserviceusing System.Data;
 5c#+xmlhttp调用webserviceusing System.Drawing;
 6c#+xmlhttp调用webserviceusing System.Text;
 7c#+xmlhttp调用webserviceusing System.Windows.Forms;
 8c#+xmlhttp调用webserviceusing FormChild;
 9c#+xmlhttp调用webserviceusing MSXML2;
10c#+xmlhttp调用webservice
11c#+xmlhttp调用webservicenamespace FormParent
12}

使用post方法访问的时候必须加:
 xmlhttp.setRequestHeader("SOAPAction", "http://tempuri.org/SayHelloTo");
有点疑惑,用get方法为什么就可以不加?这算什么?

3.题外话:
最开始我测试Get方式是放在Form_Load里,post方法是放在button_Click,后来我就在窗体上按住Crlf拖动复制了原来的按钮,然后双击打开……奇怪,咱们双击两个按钮总是定位到原来的button_click的处理过程。bug? 2003好像不是这样的。

相关文章: