Web Services (New)

The reason why a new web service module was created is that the old one is tightly connected with Camel routes. This was sufficient in past. But now, when dealing with a larger number of operations, it is very hard to maintain. The aim of this new module is to implement step-by-step all operations which are available in the pfx-api component.

 Not all functionality of the old Web Services module is available.

Operations

Supported operations:

  • delete

Configuration

Enable Web Services

Property

Value

Property

Value

integration.webservices.enabled

true

Server Setup

The web services run on the same port as the IntegrationManager application. The port can be changed:

Property

Value

Property

Value

integration.server.port

8080

It is not advised to change the port since other functionality might rely on it.

Authentication

Authentication is the same as in REST API. Properties:

Property

Value

Property

Value

integration.webservices.username

xx

integration.webservices.password

xx

Setting the properties will result in a stateless Basic authentication scheme.

Properties

Other properties which can be set:

Property

Value

Description

Property

Value

Description

integration.webservices.publishedEndpointUrlPrefix



When set, the web service will be available at a given URL. E.g. setting the value https://my.webservice.com will result in the web service available at https://my.webservice.com/ws instead of https://0.0.0.0/ws.

integration.webservices.payloadBackupDirectory

Default value is /var/pricefx/data/im-name/webservices, respectively ${integration.data}/webservices where integration.data is a property

When set, payloads will be stored to a specified directory.

WSDL

After IntegrationManager starts, the web services are available at:

Web services

WSDL from internal network

WSDL for customers

Web services

WSDL from internal network

WSDL for customers

PfxApiDelete

https://0.0.0.0:8080/ws/pfxApiDelete.wsdl

https://servername.pricefx.eu/ws/pfxApiDelete.wsdl

Storing Payloads

When the property integration.webservices.payloadBackupDirectory is set, payloads (request, response) will be stored to a directory. If the directory does not exist, IntegrationManager will try to create it. If the process fails, the startup of the application will also fail.

Format

The payloads are stored in following format:

hash_timestamp_type.txt

where:

  • hash – Hash of the request. For both request and response, the hash is the same (as the request is same). Thus request/response are coupled together and you can immediately see if the response is missing.

  • timestamp – Timestamp of the payload storage in ISO format.

  • type – Determines whether the payload is request or response.

Debug

You can enable the debug mode of the web services module to trace requests and responses in logs. You must set the following class to the DEBUG log level in the logger setup:

net.pricefx.integration.autoconfigure.webservicesspring.LogRequestInterceptor

You can also do that by setting the property:

logging.level.net.pricefx.integration.autoconfigure.webservicesspring.LogRequestInterceptor=DEBUG

Examples

Delete

POST https://0.0.0.0:8080/ws

Delete request

Response:

Delete response

Delete with Filter Definition

You may also define the filter within a web service call.

POST https://0.0.0.0:8080/ws

Delete request with filterDef

IntegrationManager version 5.8.0