Instead of using the SetOptions method for setting all SOAP connection options in a single argument, you can use separate methods to apply the specific options that your Web service application requires. The following methods can be used to supplement or replace the SetOptions method for .NET Web services:
SoapConnection method |
Description |
Syntax |
---|---|---|
RemoveAuthentication |
Clears Basic, Digest, Domain, and Integrated Windows Authentication information from the SoapConnection object. |
conn.RemoveAuthentication () |
SetBasicAuthentication |
Sets client identification information for Web services that require Basic authentication. |
conn.SetBasicAuthentication (string domain, string userID, string password) |
SetClientCertificateFile |
Sets the certificate file or files to use to connect to a Web service. Filename can be a list of files separated by semicolons. |
conn.SetClientCertificateFile (string filename) |
SetTimeout |
Sets the client-side timeout value for a SOAP connection. |
conn.SetTimeout (long seconds) |
UseIntegratedWindows Authentication |
Determines whether the SoapConnection object uses Integrated Windows Authentication to connect to a Web service. |
conn.UseIntegratedWindowsAuthentication (boolean useIWA) |
All SoapConnection methods return a value of the long datatype.
They return 0
for success
and 50
for failure. The conn variable
in the method syntaxes holds an instantiated SoapConnection object.
The following methods can be used to supplement or replace the SetOptions method for EasySoap Web services:
SoapConnection method |
Description |
Syntax |
---|---|---|
SetSoapLogFile |
Sets the name of a file for logging raw SOAP messages |
conn.SetSoapLogFile (string filename) |
SetTimeout |
Sets the client-side timeout value for a SOAP connection |
conn.SetTimeout (long seconds) |
UseConnectionCache |
Determines whether a connection cache is used for the Web service connection |
conn.UseConnectionCache (boolean cache) |
All SoapConnection methods return a value of the long datatype.
They return 0
for success
and 50
for failure. The conn variable
in the method syntaxes holds an instantiated SoapConnection object.
For more information on using the new SoapConnection methods, see the PowerBuilder Extension Reference in the online Help or the Release Bulletin.
If your application users connect to the Internet through a proxy server, you can use the SetProxyServer method instead of the SetProxyServerOptions method to assign proxy server connection parameters.
The SetProxyServer method has two syntaxes:
conn.SetProxyServer (string address, string userID, string password)
conn.SetProxyServer (string hostname, long port, string userID, string password)
All SoapConnection methods return a value of the long datatype.
They return 0
for success
and 50
for failure. The conn variable
in the method syntaxes holds an instantiated SoapConnection object.
The first syntax has three string arguments. For this syntax, you set the value of the proxy server port in the address argument along with the host name of the proxy server. You can also include a proxy endpoint in the address argument using the format: http://hostname:port/path.
The second syntax has arguments for the proxy server address, port, user ID, and password. The port argument takes a long datatype and the other arguments take string datatypes. These are the same components of the single string argument that you use with the older SetProxyServerOptions method.