Property | Description |
Condition | Conditions are used to specify when the policy has to be executed. You can add multiple conditions with logical operators. Available values are: ![]() ![]() Click Add Condition and provide the following information and click ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() For details about the variables available in API Gateway, see
Variables Available in API Gateway. |
Transformation Configuration: Specifies various transformations to be configured. | |
Header/Query/Path Transformation for REST API and Header Transformation for SOAP API | Specifies the Header, Query or path transformation to be configured for incoming requests. You can add or modify header, query or path transformation parameters by providing the following information: ![]() ![]() You can add multiple variables and corresponding values by clicking ![]() You can remove any header, query, or path transformation parameters by typing the plain value or value with a syntax. Note: Software AG recommends you not to modify the headers ${request.headers.Content-Length} and ${request.headers.Content-Encoding} as API Gateway adds the right values for these headers before sending the response back to client. For details about the variables available in API Gateway, see
Variables Available in API Gateway. Note: Payload transformation does not happen automatically for content-type transformation. When you change the content type, ensure that you do payload transformation. For example, if you change the content-type header from application/xml to application/json, you must also change the respective payload from application/xml to application/json. |
Method transformation for REST API | Specifies the method transformation to be configured for incoming requests. Select any of the HTTP Method listed: ![]() ![]() ![]() ![]() ![]() ![]() Note: When CUSTOM is selected, the HTTP method in incoming request is sent to the native service. When other methods are selected, the selected method is used in the request sent to the native service. Note: Only Method Transformation happens when configured, but you have to take care of adding payload during transformations involving method change like GET to POST, and so on. |
Payload Transformation | Specifies the payload transformation to be configured for incoming requests. Provide the following information: ![]() ![]() As this property supports variable framework, you can make use of the available variables to transform the request messages. For example, consider the native API accepting two integer values value1 and value2, and you want to pass these two values from API Gateway to the native API, you can configure the payload field as follows: { "value1" : 12, "value2" : 34 } You can also configure the payload field using one or more variables by using variable framework. Let us see another syntax. For example, for the same native API seen in the previous example, if your client sends both the values through headers val1 and val2, and you want to add it to payload for the native API to recognize the input, you can do so by configuring the payload field as follows: { "value1" :${request.headers.val1}, "value2" :${request.headers.val2} } For details about the variables available in API Gateway, see
Variables Available in API Gateway. Note: If your payload content-type is different from the incoming payload's content-type, you need to transform the content-type of the header using Header Transformation. ![]() ![]() Click Browse to browse and select a file. ![]() ![]() You can add more XSLT features and xslt documents by clicking ![]() Note: API Gateway supports XSLT 1.0 and XSLT 2.0. ![]() ![]() When the incoming request is in JSON, you can use a XSLT file similar to the below sample: <?xml version="1.0" ?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/" > <xsl:element name="fakeroot"> <xsl:element name="fakenode"> <!-- Apply your transformation rules based on the request from the Client--> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> When the incoming request is in XML, you can use a XSLT file similar to the below sample: <?xml version="1.0" ?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <xsl:output method="xml"/> <xsl:template match="/" > <xsl:element name="soapenv:Envelope"> <xsl:element name="soapenv:Body"> <!-- Apply your transformation rules based on the request from the Client--> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> |
Advanced Transformation | Specifies the advanced transformation to be configured for incoming requests. Provide the following information: ![]() You can add multiple services by clicking ![]() For details about usage of Invoke webMethods IS policy in versions 10.2 and higher, see
Invoke webMethods IS Policy. Note: The webMethods IS service must be running on the same Integration Server as API Gateway. ![]() ![]() ![]() |
Transformation Metadata: Specifies the metadata for transformation of the incoming requests. For example, the namespaces configured in this section can be used when you provide the syntax for XPath ${request.payload.xpath} For example: ${request.payload.xpath[//ns:emp/ns:empName]} | |
Namespace | Specifies the namespace information to be configured for transformation. Provide the following information: ![]() For example, specify the namespace prefix as SOAP_ENV. ![]() For example, specify the namespace URI as http://schemas.xmlsoap.org/soap/envelope/. This declaration defines SOAP_ENV as an alias for the namespace: http://schemas.xmlsoap.org/soap/envelope/. Note: You can add multiple namespace prefixes and URIs by clicking ![]() |