SoapClient - uses mssoap1.dll and mssoapR.dll
SoapClient30 - uses mssoap30.dll and mssoapR3.dll
I would suggest to always use the newer 3.0 version, it has more option and is more robust, though of course Microsoft plans no further development for SOAP.
Code:
obj = CREATEOBJECT("mssoap.soapclient30")
obj.ClientProperty("ServerHTTPRequest") = .T. && new for 3.0
* [URL unfurl="true"]http://msdn.microsoft.com/en-us/library/ms766434(VS.85).aspx[/URL]
* Setting ServerHTTPRequest property to True uses WinHTTP.dll (actually, WinHTTP5.dll) rather than WinInet.
* WinHTTP is server-safe, but lacks support for asynchronous mode and is unavailable in Windows 98/Me.
* WinInet is widely available but unsafe in multi-thread and server environments.
the ClientProperty setting ... determines whether to use the server-safe XML components to load the WSDL and the Web Services Meta Language (WSML) files. Set the server-safe setting to True when an ASP application or an ISAPI DLL uses the SOAP client object.
I believe this is required: MSXML 4.0 SP2 (KB936181)
The server's registry also will have several SOAP settings and some will likely need to be adjusted based upon your needs. The only one I changed was MaxPostSize.
Real World XML Web Services by Yasser Shohoud
(at end of chapter)
It explains the 4 entries for MSSOAP:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSOAP\30\SOAPISAP\
MaxPostSize - increase to allow larger files
NoNagling - set to 1 and it may speed up server response (avoids 200ms pause delay)
NumThreads - default is two threads per CPU plus one
ObjCachedPerThread - should be at least how many Web services may call it
· MaxPostSize is important to configure if you expect request messages that exceed 100KB in size which is the default permissible size. When you change this setting, be sure to switch to Decimal base and keep in mind that 1 KB=1024 Bytes.
The default hex value is set extremely low, about 100K decimal equivalent as I recall, so as to reduce the risk of DOS attacks crippling a server. With it set at 100K, it will be able to handle an incoming XML about 65K in size. In my tests you need to calculate your maximum XML size, pad that a little higher just in case, then add at least 50% overhead to that figure for the value to place here.
· NoNagling turns off the nagling delay. By default, when a service responds with a small message, this response might be buffered for a while before being sent to the client. This is a TCP optimization that tries to maximize the payload sent with each TCP packet by waiting to see if there’s more data to send before sending a packet. Normally, having nagling delay on is a good thing but if your service’s response messages are small and the performance you’re getting is much worse than expected, you can try to turn it off by setting the NoNaggling value to 1.
· NumThreads is the number of threads handling incoming requests. Normally the default (2 threads per CPU plus an extra thread) is close to optimum. You should try increasing this number only if the request queue gets too long (as indicated by the queue length perf counter). You should know however that too many threads is not a good things: It causes CPUs to spend too many processing cycles switching between thread contexts rather than performing useful work.
· ObjCachedPerThread is the number of objects cached per thread. The ISAPI listener will cache a SoapServer30 object for each Web service you have exposed (just like the ASP listener does). So this number should be at least the number of Web services exposed via the ISAPI listener.