Products Downloads


French version


 

Web service consumption can be configured via an XML file. By default, this is the CfgWebServices.xml file. You can select another file using the VaToolBxSetWebServiceConfigFile function in the VaToolBx.

The XML configuration file must be correctly formed and valid in terms of the cfgWebServices.xsd XML schema.


The XML configuration file defines three scopes:

  • A global scope: data applicable to all Web services.
  • A service scope: data applicable only to the Web service named by the <AdeliaName> item.

  • An operation scope: data applicable only to the operation named by the <Name> item of the Web service named by the <AdeliaName> item.


Notes:

    • If two identical parameters are used in different scopes, the parameter with the smallest scope takes priority. For example, a 'Service' scope parameter takes priority over an identically named 'Global' scope parameter.
    • A parameter set via an Adelia instruction always takes priority over the one defined in the configuration file. For example, the data specified by the *LOGIN directive of the WS_CALL instruction take priority over the <Transport><HttpAuth> items.


Parameter definitions and scopes

Scope

Value

Abbreviation

Name of corresponding item

Global

G

<Configuration><Global>

Service

S

<Configuration><Service>

Operation

O

<Configuration><Service><Operation>


Type

B[Boolean] | S[String] | N[Numerical]


Parameter name

Scope

Type

Description

<JustThisFile>

G

B

Specifies whether the configuration file present is the only configuration file [default = true].

If JustThisFile is set to "false", then no access point is defined for the Web service to run, the search is expanded to the old configuration file named CfgWebServices.ini (C/Windows context) or CfgWebServices.properties (Java context).

<Transport><MaxConnectionPerHost>

G

N

Java context: sets the maximal number of simultaneous HTTP connections for a same access point [by default=2].

For a web service consumption from a web application, this value must be adapted to the potential number of simultaneous queries.

Note: a HTTP connection is released when the Adelia WS_FREE_RESULT instruction is run.

<Transport><MaxTotalConnection>

G

N

Java context: sets the maximal total number of simultaneous HTTP connections [by default=10].

For a web service consumption from a web application, this value must be adapted to the potential number of simultaneous queries.

Note: a HTTP connection is released when the Adelia WS_FREE_RESULT instruction is run.





<AdeliaName>

S

S

Adelia name of the Web service to which the <Service> item configuration elements apply.

<Epr>

S

S

Access point for the Web service. Replaces the fixed access point during generation.

<Encoding>

GS

S

Character encoding of the SOAP message sent to the service. [default ='UTF-8'].

<ForceMtom>

GS

B

Enables MTOM optimization for binary items. [default = false].

<DatetimeSerWithZulu>

GS

B

Enables TIMESTAMP serialization, taking into account the time zone and daylight saving. [default = false].

<NbMaxSessions>

GS

N

Used to define the maximum number of active (simultaneous) requests sent to a service. [default = 10].

<Session><Management>

GS

B

Enabling session monitoring.

Note: For session monitoring to be operational, the Web service must be appropriately configured/implemented.

<Session><SessionId>

GS

S

"Transport" scope session monitoring allows a different JSESSIONID session id to be defined.

<Transport><Protocol>

GS

S

HTTP protocol version (default: "HTTP/1.1")

Alternative value: "HTTP/1.0".

<Transport><HTTP1.1><Chunked>

GS

S

Activation of Chunked mode (for HTTP1/1).

[default = true].

<Transport><SSLCertificate><ServerCertFile>

GS

S

[SSL; C/Windows client] .pem file containing the certificate required to authenticate the server.

This file must be specified only if the SSL connection cannot be established automatically via the package of CA certificates %adeliws%/certifs/cacert.pem.

Note: In case of SSL connection failure, it is also possible to set the <ServerCertAuto>true</ServerCertAuto> element in a way to retrieve automatically from the target server a certificate which allows to establish the connection (to use in particular in case of self-signed certificate).

<Transport><SSLCertificate><KeyFile>

GS

S

[SSL; C/Windows client] .pem containing the certificate and private key required for client authentication by the server.

<Transport><SSLCertificate><Passphrase>

GS

S

[SSL; C/Windows client] Passphrase used to encrypt the private key. This passphrase can appear unencrypted or encrypted in the configuration file.

<Transport><SSLCertificate><TruststoreName>

GS

S

[SSL; Java client] Name of the Java truststore or a .pem file required for server authentication.

This truststore must be specified only if the SSL connection cannot be established automatically via the package of CA certificates %java_home%/jre/lib/security/cacerts.

Note: In case of SSL connection failure, it is also possible to set the <ServerCertAuto>true</ServerCertAuto> element in a way to retrieve automatically from the target server a certificate which allows to establish the connection (to use in particular in case of self-signed certificate).

<Transport><SSLCertificate><TruststorePwd>

GS

S

[SSL; Java client] Java truststore password. This password can appear unencrypted or encrypted in the configuration file.

<Transport><SSLCertificate><KeystoreName>

GS

S

[SSL; Java client] Name of the Java keystore required for client authentication by the server.

<Transport><SSLCertificate><KeystorePwd>

GS

S

[SSL; Java client] Java keystore password. This password can appear unencrypted or encrypted in the configuration file.

Important: the implementation requires the same password to be used to protect the keystore and private key.

<Transport><SSLCertificate><ServerCertAuto>

GS

S

If set to true, in case of SSL connection failure via the package of CA certificates, this element allows to retrieve automatically from the target server a certificate to establish the connection (to use in particular in case of self-signed certificate).

<Transport><Timeout>

GS

N

Transport layer timeout [in milliseconds; default = 60000].

If the service fails to respond within this time frame, an error is raised.

A mode must be specified to force authentication.

<Transport><HttpAuth><AuthMode>

GS

S

HTTP authentication mode:

AUTO | BASIC | DIGEST | NTLM

<Transport><HttpAuth><Credentials><Usr>

GS

S

User name for HTTP authentication.

<Transport><HttpAuth><Credentials><Pwd>

GS

S

Password for HTTP authentication. This password can appear unencrypted or encrypted in the configuration file.

<Transport><HttpAuth><Credentials><Domain>

GS

S

Application area for NTLM type authentication.

<Transport><Proxy><Host>

GS

S

Host name for connection through a proxy.

<Transport><Proxy><Port>

GS

N

Port for connection through a proxy.

<Transport><Proxy><AuthMode>

GS

C

HTTP authentication mode:

AUTO | BASIC | DIGEST | NTLM

A mode must be specified to force authentication.

<Transport><Proxy><Credentials><Usr>

GS

S

User name for connection through a proxy [leave blank for an anonymous connection].

<Transport><Proxy><Credentials><Pwd>

GS

S

Password for connection through a proxy [leave blank for an anonymous connection]. This password can appear unencrypted or encrypted in the configuration file.

<Transport><UseAsyncDualChannel>

GS

B

Activation of a dual communication channel for asynchronous calls. [default = false].

<Transport><ReceiverPort>

GS

N

The "TransportReceiver" client listening port used in case of a dual channel asynchronous communication.

<Module><Name>

GS

S

Name of the module to commit.

Example : "addressing", "rampart".

<Module><Description><PolicyFile>

GS

S

Name of the policy file to associate with the <Name> module.

<Module><Description><Property><Name>

GS

S

Name of the property to define for the <Name> module.

<Module><Description><Property><Type>

GS

S

<Name> property type: "string" | "int" | "bool" | "xml"

<Module><Description><Property><Value>

GS

S

<Name> property value: The value must match the defined type.

<Timeout>

O

N

Transport layer timeout [in milliseconds; default = 60000].

If the service fails to respond within this time frame, an error is raised.

<SoapAction>

O

S

Use of a different SoapAction than that of the name of the fixed operation during generation.


Notes:

    • All password parameters should be broken down as follows:

<Encrypted> B true = password encrypted.false = password not encrypted.
<Password> C Encrypted or unencrypted password.To encrypt a password, the VaToolBx function VaToolBxEncryptAdeliaPassword should be used, using the name of the item to which the password relates as encryption key.For example, to encrypt the password associated with the TruststorePwd item, the value of the TruststoreName item should be used as encryption key.

    • The above-described configuration does not apply to SOAP RPC/Encoded Web service consumption in "parameter" mode, except for the <JustThisFile>, <AdeliaName> and <Epr> parameters.


Example 1 :
 

<?xml version="1.0"?>

<Configuration>

   <Global>

      <JustThisFile>false</JustThisFile>

   </Global>

   <Service>

      <AdeliaName>AX2_DOL</AdeliaName>

      <Epr>http://vmwas7:8080/axis2/services/AX2_DOL</Epr>

   </Service>

<Service>

      <AdeliaName>AX2_DOW</AdeliaName>

      <Transport><Proxy><Host>monproxy.com</Host><Port>80</Port></Proxy></Transport>

</Service>

</Configuration>


This configuration file specifies that:

- the old configuration file CfgWebServices.ini (or CfgWebServices.properties in a Java context) should be viewed if, for the Web service to run, no access point has been defined (<Epr>).

- the service named AX2_DOL is accessible via the URL http://vmwas7:8080/axis2/services/AX2_DOL

- connection to the service named AX2_DOW is implemented through the proxy monproxy.com:80


Example 2 :
 

<?xml version="1.0"?>

<Configuration>

   <Service>

      <AdeliaName>AX2_DOLS</AdeliaName>

      <Epr>https://vmwas7:8443/axis2/services/AX2_DOLS</Epr>

      <Transport>

         <SSLCertificate>

            <ServerCertFile>c:\certifs\svca.pem</ServerCertFile>

            <TruststoreName>c:/certifs/java/keystore.jks</TruststoreName>

            <TruststorePwd>

               <Encrypted>false</Encrypted>

               <Password>changeit</Password>

            </TruststorePwd>

         </SSLCertificate>

      </Transport>

   </Service>

</Configuration>


This configuration file provides the information required for secure connection (SSL; server authentication) in both a C/Windows and Java context.


Notes:

- In a C/Windows context, directories are separated by a back slash [\].

- In a Java context, directories are separated by a forward slash [/].


Example 3:


<!-- Timeout modification; global scope -->
<?xml version="1.0"?>
<Configuration>
   <Global>
      <Transport>
         <Timeout>30000</Timeout>
      </Transport>
   </Global>
</Configuration>


<!-- Timeout modification; service scope -->
<?xml version="1.0"?>
<Configuration>
   <Service>
      <AdeliaName>AX2_DOLS</AdeliaName>
      <Epr>https://vmwas7:8443/axis2/services/AX2_DOLS</Epr>
      <Transport>
         <Timeout>30000</Timeout>
      </Transport>
   </Service>
</Configuration>

<!-- Timeout modification; operation scope -
->
<?xml version="1.0"?>
<Configuration>
   <Service>
      <AdeliaName>AX2_DOLS</AdeliaName>
      <Epr>https://vmwas7:8443/axis2/services/AX2_DOLS</Epr>
      <Operation>
         <Name>OPER_1</Name>
         <Timeout>30000</Timeout>
      </Operation>
   </Service>
</Configuration>



↑ Top of page





↑ Top of page