Axis Free Mediation
Axis Free Mediation and WSStack are used to process REST services. The advantage of using Axis Free Mediation is that it supports HTTP patch. However, by default, WSStack is used.
Axis Free Mediation is specified by selecting the VSD format. When a new REST service is published, CentraSite publishes the service to the Axis Free Mediation. When a service is republished, CentraSite considers the mediation stack that the service has been published to. Therefore, republishing a service does not modify the mediation stack of a service.
Note: | The republished services do not show any different behavior because of switching between the mediation stack. However, if CentraSite is publishing a service to Mediator 9.10 or earlier versions, it publishes and republishes the REST services to the WSStack Mediation stack. |
To change the deployment method for REST services, the restServiceStack configuration parameter in the centrasite.xml file has to be set. By default the configuration parameter is set to wsstack. When changing it to Axis-free, any newly published REST service goes to Axis Free Mediation. Redeploying a REST service is not sufficient to change the mediation stack. To change the mediation stack for an already deployed service, it has to be unpublished first and then republished.
Compared to WSStack, Axis Free Mediation exposes different endpoints. The Axis Free endpoints must have the /mediator directive. The endpoints of published REST services are important for consumer applications as any change can impact the existing setups. To minimize the impact, services published to Axis Free Mediation can be invoked using the WSStack endpoints. Therefore, requests are redirected to Axis Free Mediation. You can use the Mediator configuration property, pg.mediator.rest-service-redirect in the pg-config.properties file to deactivate the redirection of the REST service request to AXIS Free Mediation. The default value is true.
Note: | To migrate from WSStack to Axis Free, you must unpublish and then republish the service. |
Limitations
Axis Free Mediation does not have all the functions of WSStack. It has the following limitations:
Transformation of requests with content type
multipart/form-data is not supported.
Error messages are converted into xml or json format only.
Badgerfish format is not supported as an error message format.
When an IS service is called inside a virtual service with the request or response, the content of the current request or response is written to the IS service. Existing services for reading and updating have to be adjusted according to the Axis Free REST service variables.
Axis Free REST Service Variables
The existing WSStack variables that are supported for Axis Free REST services are:
proxy.name: The name of the virtual service.
EnvelopeString: Contains the SOAP envelope as a string.
JSONRESTContentString: Appears only for the REST services with the Content-Type as application/json or application/json/badgerfish.
UpdatedJSONRESTContentString: Appears only for REST services with the Content-Type as application/json or application/json/badgerfish.
MessageContext:
Mediator automatically places a MessageContext variable into the pipeline before executing the webMethods IS service call. MessageContext is of the JAVA type com.softwareag.pg.rest.RestMessageContext.
The variables introduced in
Mediator version 9.12 for Axis Free REST services are:
RESTContentType: The Content-Type of the REST service, for example, application/xml application/json.
RESTContentString: The content string of the REST service.
UpdatedRESTContentType: You can update the Content-Type in the IS service and add the updated content-type into the pipeline's input variable, UpdatedRESTContentType. This variable is sent to the native service.
UpdatedRESTContentString: You can update the content string in the IS service and add the updated content to the pipeline's input variable, UpdatedRESTContentString. This variable is sent to the native service.
The variables that are not supported by Axis Free REST services are:
SOAPEnvelope
EnvelopeString
UpdatedSoapRequest