SetOptions – PB Docs 126

SoapConnection:

SetOptions method

Description

Sets connection options for SoapConnection class.

Syntax

Argument

Description

conn

The name of the SoapConnection object
that establishes the connection.

options

Options you want to set for your connection.
The string values for the option names are not case sensitive. These can be:

  • SoapLog

    (EasySoap Web service engine only) The file path for SoapLog.
    To disable the log, enter "".

  • UserID

    A string value for an https connection.

  • Password

    A string value for an https connection.

  • Domain

    (.NET Web service engine only) A string value for the Web domain
    to which the user belongs. This could be a domain name, such as “sap.com”,
    or a machine name.

  • UseWindowsAuthentication

    (.NET Web service engine only) A “yes” or “no” value
    to determine whether to use “Integrated Windows Authentication.” The
    value you enter can be a boolean or a string. If this option is
    set to “yes,” you do not need to set the UserID,
    Password, or Domain options.

  • AuthenticationMode

    (.NET Web service engine only) A string value for the authentication
    mode to use. This can be “basic” or “digest”.
    These AuthenticationMode values are described on the Microsoft MSDN Web site
    .

  • CertificateFile

    (.NET Web service engine only) A string value for the certificate
    file or files that you want to send from the Web service client
    to the server. The string value could include local files with a
    full path and URLs to remote certificate files. You must use a semicolon
    as a separator for multiple files.

  • Timeout

    A number for the maximum wait time in seconds.

    The default timeout value is 0, meaning that no limit to the connection
    time is set.

  • ConnectionCache

    (EasySoap Web service engine only) 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.

Return Values

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.

Examples

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.

To avoid using escape characters before a second pair of quotation
marks, 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:

Usage

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 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.

Although SetOptions takes a single string
argument for all available options, you can set each of the options
with more specific methods. You can use the following methods to
replace SetOptions:

For .NET Web services

For EasySoap Web services

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x