You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Introduction

The Soap Service Client 1.1 and Soap Service Client 1.2 example projects contain methods for all the new features of the AQ_SoapServiceClient.

Out of the box, the new SoapServiceClient comes with:

  •  Document attachments
  •  Timeout exceptions
  •  Dynamic URLs
  •  Soap faults
  •  Standard spring security

Configuration

To be able to run these projects the following configurations has to be made:

  1. The path for the filesystemconnection and the path for the keystore has to be set in the application.properties file. The example keystore can be downloaded in the downloads section.
  2. The various connections used by the example project have to be configured (see example below)
  3. To start the soap-service use soap-service/soap-service.bat


blueriq.connection.filesystemconnection.filesystem.path=D:/path/to/uploads

# timeout
blueriq.connection.GetPerson11.soap.timeout=2000
blueriq.connection.GetPerson12.soap.timeout=2000

# dynamic urls
blueriq.connection.TenantA11.soap.url=http://localhost:8080/soap11/a
blueriq.connection.TenantB11.soap.url=http://localhost:8080/soap11/b
blueriq.connection.TenantA12.soap.url=http://localhost:8080/soap12/a
blueriq.connection.TenantB12.soap.url=http://localhost:8080/soap12/b

# security: basic authentication
blueriq.connection.basic11.soap.url=http://localhost:8080/soap11/basicAuthentication
blueriq.connection.basic11.soap.username=user
blueriq.connection.basic11.soap.password=password
blueriq.connection.basic12.soap.url=http://localhost:8080/soap12/basicAuthentication
blueriq.connection.basic12.soap.username=user
blueriq.connection.basic12.soap.password=password

# security: username token + plain password
blueriq.connection.usernameTokenPlain11.soap.url=http://localhost:8080/soap11/userNameToken
blueriq.connection.usernameTokenPlain11.soap.security.implementations=UsernameTokenPlain
blueriq.connection.usernameTokenPlain12.soap.url=http://localhost:8080/soap12/userNameToken
blueriq.connection.usernameTokenPlain12.soap.security.implementations=UsernameTokenPlain

# security: username token + password digest
blueriq.connection.usernameTokenDigest11.soap.url=http://localhost:8080/soap11/userNameToken
blueriq.connection.usernameTokenDigest11.soap.security.implementations=UsernameTokenDigest
blueriq.connection.usernameTokenDigest12.soap.url=http://localhost:8080/soap12/userNameToken
blueriq.connection.usernameTokenDigest12.soap.security.implementations=UsernameTokenDigest

# security: signature
blueriq.connection.signing11.soap.url=http://localhost:8080/soap11/signature
blueriq.connection.signing11.soap.security.implementations=Signature
blueriq.connection.signing12.soap.url=http://localhost:8080/soap12/signature
blueriq.connection.signing12.soap.security.implementations=Signature

# security: timestamp
blueriq.connection.timestamp11.soap.url=http://localhost:8080/soap11/timestamp
blueriq.connection.timestamp11.soap.security.implementations=Timestamp
blueriq.connection.timestamp12.soap.url=http://localhost:8080/soap12/timestamp
blueriq.connection.timestamp12.soap.security.implementations=Timestamp

# security: encryption
blueriq.connection.encryption11.soap.url=http://localhost:8080/soap11/encryption
blueriq.connection.encryption11.soap.security.implementations=Encryption
blueriq.connection.encryption12.soap.url=http://localhost:8080/soap12/encryption
blueriq.connection.encryption12.soap.security.implementations=Encryption

# security: signature + timestamp + encryption
blueriq.connection.signingTimestampEncryption11.soap.url=http://localhost:8080/soap11/x509
blueriq.connection.signingTimestampEncryption11.soap.security.implementations=Signature,Timestamp,Encryption
blueriq.connection.signingTimestampEncryption12.soap.url=http://localhost:8080/soap12/x509
blueriq.connection.signingTimestampEncryption12.soap.security.implementations=Signature,Timestamp,Encryption

# security implementations
blueriq.soap.security.usernametoken.UsernameTokenPlain.username=user1
blueriq.soap.security.usernametoken.UsernameTokenPlain.password=password1
blueriq.soap.security.usernametoken.UsernameTokenPlain.password-type=PasswordText

blueriq.soap.security.usernametoken.UsernameTokenDigest.username=user1
blueriq.soap.security.usernametoken.UsernameTokenDigest.password=password1
blueriq.soap.security.usernametoken.UsernameTokenDigest.password-type=PasswordDigest

blueriq.soap.security.signature.Signature.keystore-alias=keypair1
blueriq.soap.security.signature.Signature.keystore-password=welcome
blueriq.soap.security.signature.Signature.identifier=IssuerSerial

blueriq.soap.security.timestamp.Timestamp.timestampPrecisionInMilliseconds=true

blueriq.soap.security.encryption.Encryption.keystore-alias=keypair1
blueriq.soap.security.encryption.Encryption.identifier=IssuerSerial
blueriq.soap.security.encryption.Encryption.algorithm=http://www.w3.org/2001/04/xmlenc#aes128-cbc

blueriq.security.keystore.location=D:/path/to/keystore.jks
blueriq.security.keystore.password=welcome

NOTE

In production, the passwords should be encrypted.

REMINDER

Do not forget to updated the paths for the filesystemconnection connection and the keystore.


Document attachment

This functionality can be used in two ways:

  1. On the “Send file” tab, a request can be made with an uploaded plain text file and in the Response widget, the content of the file is displayed.
    1. Note: Multiple text files can be sent at once.
  2. On the “Retrieve file” tab, a request can be made with a given string and a plain text file is returned in the Response widget, containing the entered string. This file can be downloaded or deleted.

Timeout handling

To simulate the timeout handling of the AQ_SoapServiceClient, you need the following settings:

  • For Soap 1.1: set the blueriq.connection.GetPerson11.soap.timeout property from application.properties to 2000 milliseconds
  • For Soap 1.2: set blueriq.connection.GetPerson12.soap.timeout property from the application.properties to 2000 milliseconds

 

Example Runtime application.properties
blueriq.connection.GetPerson11.soap.timeout=2000
blueriq.connection.GetPerson12.soap.timeout=2000

 

The soap service is configured to wait 10 seconds until it sends the response, so any timeout value under 10 seconds will cause the call to timeout.


On the “Timeouts” tab click the Send button. The timeout exception is displayed in the Response widget.

If the timeout property is set to a value greater than 10 seconds the following names can be entered in the Name field in order to get valid responses: “Rick”, “Mihai” or “Alexandra”. For any other name entered a Soap fault code and a Soap fault message will be displayed in the Response widget.

Dynamic URLs

In the “Dynamic urls” tab is a drop-down field in the Request widget from where a tenant can be selected (A or B). The soap service responds with the URL of the endpoint that was invoked. Depending on which tenant is selected, a different response is received in the Response widget. 

Soap fault handling

On the “Soap faults” tab, the user is asked to enter person details which consist of name, age and gender. The validation is made on the value introduced in the “Age” field. A value under 26 will not meet the criteria and a Soap fault code and Soap fault message will be returned in the Response widget. A value of 26 or above will be accepted.

Security

In the “Security” tab, in the Request widget is a drop-down from where the following authentication options can be selected. The soap service endpoint returns the URL that was invoked. Depending on which option is selected, an endpoint with those security requirements is called.


Basic Authentication

When Basic Authentication option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/basicAuthentication for Soap Service Client 1.1 project or http://localhost:8080/soap12/basicAuthentication for Soap Service Client 1.2 project.

 

Username Token and Plain Password

When Username Token + Plain Password option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/userNameToken for Soap Service Client 1.1 project or http://localhost:8080/soap12/userNameToken for Soap Service Client 1.2 project.

 

Username Token and Password Digest

When Username Token + Password Digest option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/userNameToken for Soap Service Client 1.1 project or http://localhost:8080/soap12/userNameToken for Soap Service Client 1.2 project.

 

X.509 Profile and Signing

When X.509 Profile + Signing option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/signature for Soap Service Client 1.1 project or http://localhost:8080/soap12/signature for Soap Service Client 1.2 project.

 

X.509 Profile and Timestamp

When X.509 Profile + Timestamp option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/timestamp for Soap Service Client 1.1 project or http://localhost:8080/soap12/timestamp for Soap Service Client 1.2 project.

 

X.509 Profile and Encryption

When X.509 Profile + Encryption option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/encryption for Soap Service Client 1.1 project or http://localhost:8080/soap12/encryption for Soap Service Client 1.2 project.

 

X.509 Profile, Signing, Timestamp and Encryption

When X.509 Profile + Signing + Timestamp + Encryption option is selected and the Send button is clicked, the following URL will be returned in the Response widget: http://localhost:8080/soap11/x509 for Soap Service Client 1.1 project or http://localhost:8080/soap12/x509 for Soap Service Client 1.2 project.

 

Downloads

No files shared here yet.

 

 

 

 

 

 

 

 

 

 

 

  • No labels