C#POST问题(Data)
我的url="http://www.ftmap.cn/Common/CommonService.asmx",但data="<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetLatLngXmlByAddress xmlns="http://SHMIS/Common/CommonService"><pstrAddress>%E5%8C%97%E4%BA%AC%E6%B5%B7%E6%B7%80%E5%8C%BA%E7%BE%8A%E5%9D%8A%E5%BA%97%E4%B8%9C%E8%B7%AF</pstrAddress></GetLatLngXmlByAddress></soap:Body></soap:Envelope>";
ie浏览器上是这么说的,但是却无法获得网页信息;我要获得信息网址是http://www.diatiantian.com/search.html 那位高手可以指点一下为什么啊?
我需要获取的是地图的经纬度
[最优解释]
CommonService.asmx应该是webservice,你直接引用过来编程就行。
[其他解释]
右键项目,添加 服务引用
然后 直接调用方法就行了
[其他解释]
看你填的命名空间是什么
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
//[System.Web.Script.Services.ScriptService]
文件的上面有。。
using WEB服务命名空间;
WEB服务命名空间 service=new WEB服务命名空间();
service.GetLatLngXmlByAddress
....
没了
[其他解释]
ServiceReference1.xxxxx
[其他解释]