PreviousNextIndex

CONNECT( ) method (Web service)

Connects to and associates a Web service instance with the specified server handle. The current application becomes a client application of the connected Web service.

Return type: LOGICAL

Applies to: Server object handle

Syntax
CONNECT ( [ connection-parms ] ) 

connection-parms
-WSDL parameter security options

The -WSDL parameter can optionally contain a user account name and password to use to connect to a Web Server. This is the syntax for specifying the parameter using the HTTP and HTTPS protocols, respectively:

Syntax
-WSDL 
http://[user-id[:password]@]web-server-host[:web-server-port]WSDL-path 

-WSDL 
https://[user-id[:password]@]web-server-host[:web-server-port]WSDL-path 

user-id
password
web-server-host
web-server-port
WSDL-path

Instead of building the account name and password into the WSDL string, you can specify the account name using the -WSDLUserid parameter and the password using the -WSDLPassword parameter. If these parameters are used and the WSDL URL (WSDL-path) also contains a user id and password, the information on the WSDL URL is used.

Connection parameter combinations

The CONNECT( ) method is used to connect an ABL SERVER object to a specific application service. This service can be either an AppServer or a Web service. Independent of the type of application service to which the client is connecting, the client needs to provide the location of the service and transport information. There are two mechanisms for providing this information when connecting to a Web service:

  1. The CONNECT( ) method can identify a specific service element name and port element name from the WSDL document. The combination of these two element names identify the location of a set of operations that are available on the Web service. It also identifies the transport data. The service element name is specified with the -Service connection parameter and the port element name is specified with the -Port connection parameter.
  2. If the WSDL document contains several service elements, the CONNECT method must identify which service element the client wants to connect to, via -Service. If the WSDL document only identifies one service element, the CONNECT method does not need to contain the service element name. Similarly if the WSDL document (or if the identified service element) only identifies one port element, the CONNECT method does not need to contain the port element name.
    If the application needs to provide account name and password information, it can accomplish this by providing the account name and password information in the -SoapEndpointUserid and -SoapEndpointPassword parameters.
    If the WSDL document identifies multiple service elements with the same local name, the CONNECT ( ) method must also contain the -ServiceNamespace connection parameter.
  3. If the WSDL document contains several binding elements, the CONNECT method must identify which binding element the client wants to use, via the -Binding parameter. If the WSDL document only identifies one binding element, the CONNECT method does not need to contain the binding element name.
  4. If the application needs to provide account name and password information, it can accomplish this by providing the account name and password information in the -SoapEndpointUserid and -SoapEndpointPassword parameters.
    If the WSDL document identifies multiple binding elements with the same local name, the CONNECT( ) method must also contain the -BindingNamespace connection parameter.

If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Otherwise, it returns TRUE. An error can occur if:

If the CONNECT( ) method completes successfully, the CONNECTED( ) method returns TRUE.

The connection lasts until the client application executes the server handle DISCONNECT( ) method or until the AVM detects any failure condition that automatically terminates the connection.


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex