最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
利用PocketSOAP链接webservice(1)---.net
时间:2022-07-02 12:12:30 编辑:袖梨 来源:一聚教程网
PocketSOAP
This is a SOAP client COM component for the Windows family, originally targeted at PocketPC (hence the name), there is also a Win32 version that works on Windows 95/98/Me/NT4/2000/XP. The package includes a HTTP transport for making HTTP based SOAP requests, however the transport is separate from the main SOAP core, so any other transports can be easily added. James Clark's excellent Expat XML Parser is used for parsing the response SOAP messages.
如果你想执行文章中给出了代码你需要下载并安装pocketsoap
至于如何建立webservice我就不费力气讲了,今天的主要目的是如何利用pocketsoap使一些事情变得简单。
1.在.net中使用PocketSOAP
如果在安装PocketSoap的过程中是根据系统默认选项的话那么在“c:program filessimonfellpocketSOAP1.2”中你就会发现psoap32.dll文件
我们需要导入这个PocketSOAP NAMESPACE
例如:
using PocketSOAP;using System;public class test{ public static void Main(string[] args) { Console.WriteLine("Starting C# PocketSOAP for echoString"); CoEnvelope soap=new CoEnvelope(); HTTPTransport h=new HTTPTransport(); soap.MethodName="echoString"; soap.URI="urn:xmethodsInterop"; soap.Parameters.Create("inputString", "Hello World", "", null, null); h.SOAPAction = "http://soapinterop.org/" ; h.Send ( "http://www.whitemesa.net/interop/std", soap.Serialize() ); soap.Parse(h, null); Console.WriteLine(soap.Parameters.get_Item(0).Value); }}编译的时候加入PocketSOAP.dll
This is a SOAP client COM component for the Windows family, originally targeted at PocketPC (hence the name), there is also a Win32 version that works on Windows 95/98/Me/NT4/2000/XP. The package includes a HTTP transport for making HTTP based SOAP requests, however the transport is separate from the main SOAP core, so any other transports can be easily added. James Clark's excellent Expat XML Parser is used for parsing the response SOAP messages.
如果你想执行文章中给出了代码你需要下载并安装pocketsoap
至于如何建立webservice我就不费力气讲了,今天的主要目的是如何利用pocketsoap使一些事情变得简单。
1.在.net中使用PocketSOAP
如果在安装PocketSoap的过程中是根据系统默认选项的话那么在“c:program filessimonfellpocketSOAP1.2”中你就会发现psoap32.dll文件
我们需要导入这个PocketSOAP NAMESPACE
例如:
using PocketSOAP;using System;public class test{ public static void Main(string[] args) { Console.WriteLine("Starting C# PocketSOAP for echoString"); CoEnvelope soap=new CoEnvelope(); HTTPTransport h=new HTTPTransport(); soap.MethodName="echoString"; soap.URI="urn:xmethodsInterop"; soap.Parameters.Create("inputString", "Hello World", "", null, null); h.SOAPAction = "http://soapinterop.org/" ; h.Send ( "http://www.whitemesa.net/interop/std", soap.Serialize() ); soap.Parse(h, null); Console.WriteLine(soap.Parameters.get_Item(0).Value); }}编译的时候加入PocketSOAP.dll
相关文章
- 原神诡镇之梦佩特莉可的阴霾任务怎么攻略 04-27
- 塞尔达传说王国之泪5速马在哪5速马位置指南 04-27
- 原神白石与黄铜的造像位置在哪 04-27
- 原神旧日之海鳗鱼宝箱怎么找 原神旧日之海鳗鱼宝箱寻找方法介绍 04-27
- 原神白石与黄铜的造像位置在哪 原神白石与黄铜的造像位置介绍 04-27
- 原神诡镇之梦佩特莉可的阴霾任务怎么攻略 原神诡镇之梦佩特莉可的阴霾任务攻略方法 04-27