Web应用技巧(一)如何调用WebService? 如何调用webservice里一方法
怎么调用webservice服务~
写一个WINDOWS服务定期调用webservice中的方法。
1、先建一个WebService(ASP.NET Web 服务应用程序)
2、建这个WebService的虚拟目录
3、执行生成一个文件
{
C:\Program Files\Microsoft Visual Studio 8\VC>wsdl /language:C# /out:c:\myProxyClass.cs http://hostServer:88/ImportData.asmx?WSDL
这个工具(方法)是针对一个webservice生成一个能动态调用的类
language:C#-----C#语言输出
c:\myProxyClass.cs-----这个是生成的文件存在本地的文件名和路径
http://hostServer:88/ImportData.asmx-----是虚拟目录运行时的地址
}
4、创建一个windows服务程序(新建项目->左侧选windows->右侧选windows服务),然后把生成的文件引入到windows服务的程序中
5、写调用事件(BeginImportUFData)
6、完成后编译生成一下,这时就会在此windows服务程序的bin文件夹下生成一个exe文件(如:MyNewService.exe
)
7、按以下方式安装
安装:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe 绝对路径\MyNewService.exe
卸载:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u 绝对路径\MyNewService.exe
例如:(用dos命令窗口执行)
安装:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe E:\chengxu\MyNewService\MyNewService\bin\Debug\MyNewService.exe
【然后显示:正在安装程序集,最后显示:“提交”阶段成功完成】
卸载:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u E:\chengxu\MyNewService\MyNewService\bin\Debug\MyNewService.exe
【最后提示:卸载完成】
启动、停止服务是window操作,找到管理-->服务 操作
首先, 你要先把你的WS服务启动起来,就是http://localhost:8080/Example/services/HelloWorldService?wsdl
然后在你的另一个项目中建一个Webservice Client 客户端,用来访问你的WS服务。
建立Webservice Client 方法如下,在Eclipses中建立一个java工程,然后在src上右键--NEW---Other---Web Service Client --Xfire--在WsdL url 中写上http://localhost:8080/Example/services/HelloWorldService?wsdl-----下一步结束。
在src里的会出现一些java文件,你找一个以Client结束的java文件,在里面的main方法中会有个service对象,现在你就可以直接用这个对象了,service.peerstatus(参数)这样写就行了。
纯手打啊,希望能对你有帮助。
怎么把微信通讯录同步到手机
答:微信(WeChat)是腾讯公司于2011年1月21日推出的一个为智能终端提供即时通讯服务的免费应用程序,由张小龙所带领的腾讯广州研发中心产品团队打造。微信支持跨通信运营商、跨操作系统平台通过网络快速发送免费(需消耗少量网络流量)语音短信、视频、图片和文字,同时,也可以使用通过共享流媒体内容的资料和基于...
No One Like You (Performance Track In Key Of Eb) 歌词
答:歌曲名:No One Like You (Performance Track In Key Of Eb)歌手:David Crowder*Band 专辑:Premiere Performance Plus: No One Like You No One Like You BY:Scorpions Girl, it's been a long time that we've been apart Much too long for a man who needs love I miss you since i've...
《疯狂原始人》主要讲了一个什么故事?
答:一行人在影片中展开了一场闹腾而又惊险的旅程。疯狂原始人 苹果App Store搜寻就出来了 疯狂原始人全集线上观看 疯狂原始人下载 原名:The Croods 又译:克鲁德一家 TS高清版::hi.baidu./pocody/item/30cd0bd0eb482a18e0f46f93。LEHXD 上映时间: 2013年4月20日 导演: 科克·德·米科 ...
如何找回以前的微信号?
答:5、根据您所知道的资料填写然后下一步,之后只需要等待申诉进度就好,一般情况下会再四十八小时内得到申诉结果。/iknow-pic.cdn.bcebos.com/00e93901213fb80ef61eb0ae3bd12f2eb83894f8"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/00e93901213fb80ef...
英语对话 关于询问天气如何的(翻译,在线等)
答:a good morning Mr Smithb good morning a today is sunny b yes ,it is a I plan to go picnic with Mark ,would you like to go with me ?b of course ,I doa ok, we set off 2pm ,this afernoon ,is it ok?b no problema ,ok see you then b bye ...
We Are The Reason (Performance Track In Key Of Eb/Bb/F) 歌词
答:歌曲名:We Are The Reason (Performance Track In Key Of Eb/Bb/F)歌手:Avalon 专辑:Premiere Performance Plus: We Are The Reason Tim - We Are The Reason As little children we would dream of Christmas morn Of all the gifts and toys we knew we'd find But we never realized a ...
...Be Loved (Performance Track In Key Of Db/Eb) 歌词
答:歌曲名:Wanna Be Loved (Performance Track In Key Of Db/Eb)歌手:DC Talk 专辑:Premiere Performance Plus: Wanna Be Loved Wanna Be Loved I think it's true That we all live and die Through everyone else's eyes That's why we need to belong That's why my heart beats When the ...
I Am (Performance Track In Key Of Eb) 歌词
答:So we find a foothold that's familiar And bless the moments that we feel You nearer When life had begun, I was woven and spun You let the angels dance around the throne And who can say when, but they'll dance again When I am free and finally headed home I will be weak...
LKH(Lin-Kernighan heuristic )一种求TSP的邻域搜索策略
答:在作者[2]采用如此的这样的一个观点:“find from a set S a subset T that satisfies some criterion C and minimizes an objective function f. For example, in the traveling-salesman problem, we have to find, from the set of all edges of a complete graph, a subset that forms a ...
sat是什么?
答:70分钟(分为两个25分钟和一个20分钟)阅读能力 阅读理解、完成句子和段落阅读理解 200-800 数学 (Math section)时间 考核内容 考核方式 分数 70分钟(分为两个25分钟和一个20分钟)算术及应用题、代数及函数、几何及度量衡、数据分析、统计学及基础概率论 多项选择题和运算题 200-800 SAT考试与...