Removes authentication for a Web service connection. This method is available for .NET Web services only.
conn.RemoveAuthentication ()
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection |
Long. Valid values are 0
for
success, and 50
for failure.
This method clears Basic, Digest, and Integrated Windows Authentication information. You can set authentication with the SetBasicAuthentication, UseIntegratedWindowsAuthentication, or SetOptions methods.
Determines whether the SoapConnection object uses basic authentication for a Web service connection. This method is available for .NET Web services only.
conn.SetBasicAuthentication (string domain, string userID, string password)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
domain |
A string for the Web domain to which the user belongs. This could be a domain name, such as “sybase.com”, or a machine name. |
userID |
A string for an https connection. |
password |
A string for an https connection. |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the SetBasicAuthentication method instead of including client identification information in the options argument of the SetOptions method. For Integrated Windows Authentication, you can call the UseIntegratedWindowsAuthentication method.
Sets the certificate file or files to use to connect to a Web service. This method is available for .NET Web services only.
conn.SetClientCertificateFile (string filename)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
filename |
A string containing the name of the certificate
file or files you want to use to connect to a Web service. You must
use a semicolon as a separator for multiple files. The value can
include local files with a full path and URLs to remote certificate
files. To discontinue use of certificates, enter an empty string
( |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the SetClientCertificateFile method instead of including certificate information in the options argument of the SetOptions method.
Sets connection options for SoapConnection class. The string values for the option names are not case sensitive. Although the SetOptions method takes a single string argument for all available options, you can set each of the options with more specific methods.
For .NET Web services, you can use the following methods to replace the SetOptions method:
For EasySoap Web services, you can use the following methods to replace the SetOptions method:
conn.SetOptions (string options)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
options |
Options you want to set for your connection. These can be:
|
Long. Valid values are 0
for
success, and 50
for failure.
If multiple options are specified and the return value is 50
,
options specified before the failure are still valid.
In this example, the application enables the logging function and attempts to connect to an endpoint for which no user ID, password, or timeout has been set.
lOpt=Conn.SetOptions("SoapLog=~"airportweather.log~"")
If you do not want to use escape characters before a second pair of quotation marks, you can use single quotation marks instead, or you can start an exterior string with single quotation marks and use double quotation marks around an interior string:
lOpt=Conn.SetOptions('SoapLog="airportweather.log"')
User ID and password values can be set in an endpoint used by the SoapConnection class or by including these values as arguments to the SetOptions method.
Priority is given to values set in an endpoint (port) that is passed as an argument to the CreateInstance method of the SoapConnection class. However, a default endpoint is used when an endpoint is not set in the CreateInstance method. In this case, priority is given to user ID and password values defined in the SetOptions method.
If the endpoint used by the SoapConnection class does not have user ID and password values, and you do not set a user ID or password with the SetOptions method, the SoapConnection class connects to a SOAP server without giving a user ID or password.
If a user ID is defined in either the endpoint or the SetOptions method but is not a password, the password value is taken to be an empty string.
When you set a timeout other than the default, an exception is thrown after the Web service connection times out. Even if you do not set a timeout value from the client, the Web server can still cause the request to time out on the server side.
If you include ConnectionCache as an argument in a SetOptions call, you must not use quotation marks to enclose the value that you set for this option.
Sets the address, port, user name, and password for the proxy server. This method has two syntaxes.
conn.SetProxyServer (string address, string userID, string password)
conn.SetProxyServer (string hostname, long port, string userID, string password)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection |
address |
A string containing the host name address and port of the proxy server, and optionally, an endpoint— in the format: http://hostname:port/path |
hostname |
A string containing the host name |
port |
A long for the proxy server port |
userID |
A string containing the user ID for the proxy server |
password |
A string containing the proxy server password |
Long. Valid values are 0
for
success, and 50
for failure.
This example uses the four-argument syntax of SetProxyServer:
long ll_return ll_return = Conn.SetProxyServer &
(“http://myProxyServer”,8080, “My Name”, “My Pass”)
This method does the same thing as the SetProxyServerOptions method, but it has a different syntax.
Use this method or the SetProxyServerOptions method if the proxy server requires authentication. The user ID and password that you supply with the SetOptions or other authentication methods apply to the URL of the Web service, not the proxy server.
Sets the proxy address, user name, and password for the proxy server.
conn.SetProxyServerOptions (string optionstring)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
optionstring |
A string containing comma-separated name/value pairs. The format is: "address='proxy_endpoint '{, userID='name ', password='password '} " The address is required and can have a format such as: http://hostname:port/path Specify values for userID and password if the proxy server requires them. |
Long. Valid values are 0
for
success, and 50
for failure.
This example specifies a user name and password, as well as the proxy endpoint:
long ll_return
string ls_string
ls_string = "address='http://Srvr:8080/endpnt'," ls_string += "userID='MyName', password='mypass'" ll_return = Conn.SetProxyServerOptions (ls_string)
Use this method or the SetProxyServer method if the proxy server requires authentication. The user ID and password that you supply with the SetOptions or other authentication methods apply to the URL of the Web service, not the proxy server.
Sets the name of a file for logging raw SOAP messages. This method is available for EasySoap Web services only.
conn.SetSoapLogFile (string filename)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
filename |
A string containing the full file name for the SOAP log file. To disable logging, enter an empty string (""). |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the SetSOAPLogFile method instead of including a log file name in the options argument of the SetOptions method.
Sets the timeout value for a SOAP connection.
conn.SetTimeout (long seconds)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
seconds |
The timeout value in seconds. If this option is set to 0, no timeout will be set on the client side. (The Web service might still have a timeout value on the server side.) |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the SetTimeout method instead of including a timeout value in the options argument of the SetOptions method.
Determines whether a connection cache is used for the Web service connection. This method is available for EasySoap Web services only.
conn.UseConnectionCache (boolean cache)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
cache |
A boolean that determines whether the http connection of the proxy instance is kept alive after a call to the proxy. The default value is false. For Web services on EAServer, you must not change the default. |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the UseConnectionCache method instead of setting a connection cache in the options argument of the SetOptions method.
Determines whether the SoapConnection object uses Integrated Windows Authentication to connect to a Web service. This method is available for .NET Web services only.
conn.UseIntegratedWindowsAuthentication (boolean useIWA)
Argument |
Description |
---|---|
conn |
The name of the SoapConnection object that establishes the connection. |
useIWA |
A boolean that determines whether to use Integrated Windows Authentication. If this option is set to “yes,” you do not need to set the UserID, Password, or Domain options. |
Long. Valid values are 0
for
success, and 50
for failure.
You can call the UseIntegratedWindowsAuthentication method to set connection authentication instead of the options argument of the SetOptions method.