Skip to content

Proxy Service Properties

Introduction

Proxy services are virtual services that receive messages and optionally process them before forwarding them to a service at a given endpoint. This approach allows you to perform necessary transformations and introduce additional functionality without changing your existing service.

Just as REST APIs and Inbound Endpoints, the proxy service uses mediators and sequences to define the mediation logic for processing messages. You can also enable WS-Security to a proxy service so that it serves as a security gateway to your actual services.

Any available transport can be used to receive and send messages from the proxy services. A proxy service is externally visible and can be accessed using a URL similar to a normal web service address.

Properties

See the topics given below for the list of properties that can be configured when creating a proxy service.

General properties

Listed below are the main properties that are required when creating a proxy service of any type.

Property Description
Proxy Service Name A unique name for the proxy service.
Transports The transport protocols that are used to receive messages. Once you have selected the required transports, you can later add service parameters relevant to each transport type.
Target Endpoint The proxy service uses an Endpoint artifact inline to define the location to which messages should be routed. You can choose one of the following options to specify the endpoint.
  • If you have a predefined Endpoint artifact in WSO2 Micro Integrator (WSO2 MI), provide the name of the artifact.
  • If you have a predefined Endpoint artifact that is saved in the registry, provide the link to the artifact.
See Endpoint Properties for the complete list of properties you can define for the Endpoint artifact.

Service parameters

  • See the list of transport parameters you can configure at the service level for a proxy service:

  • You can also configure the following service-level property to expose an Inbound Endpoint through a proxy service:

    Service Parameter Description
    inbound.only Whether the proxy service needs to be exposed only via inbound endpoints. If set to true all requests that the proxy service receives via normal transport will be rejected. The proxy service will process only the requests that are received via inbound endpoints.

    The default setting is false.

  • To publish a custom WSDL for a proxy service, select one of the WSDL types.

    WSDL Type Description
    INLINE Enter the WSDL definition in the WSDL XML field.
    SOURCE_URL

    Enter the URI of the WSDL in the text box, and then click Test URI to ensure it is available. A URI consists of a URL and URN. The URL defines the host address of the network resource (can be omitted if resources are not network-homed), and the URN defines the resource name in local "namespaces."

    For example URI = ftp://ftp.dlink.ru/pub/ADSL, w here URL = ftp://ftp.dlink.ru and URN = pub/ADSL

    REGISTRY_KEY

    If the WSDL is saved as a registry entry, select this option and choose the reference key of that registry entry from the governance Registry or configuration Registry.

    ENDPOINT -

    Following are additional service parameters you can use to configure the service WSDL.

    Parameter

    Description

    useOriginalwsdl

    If this parameter is set to true, the original WSDL published via the publishWSDL parameter is used instead of the custom WSDL.

    modifyUserWSDLPortAddress

    If true (default), the port addresses will be modified to the current host. Effective only with useOriginalwsdl=true .

    ApplicationXMLBuilder.allowDTD If this parameter is set to true, it enables data type definition processing for the proxy service.
    Data type definition processing is disabled in the Axis2 engine due to security vulnerability. This parameter enables it for individual proxy services.

    enablePublishWSDLSafeMode

    If this parameter is set to true when deploying a proxy service, even though the WSDL is not available, you can prevent the proxy service from being faulty. However, the deployed proxy service will be inaccessible since the WSDL is not available.

    Note that this is only applicable when you publish the WSDL (i.e., via the publishWSDL property) either as a URI or as an endpoint.

    showAbsoluteSchemaURL If this parameter is set to true, the absolute path of the referred schemas of the WSDL is shown instead of the relative paths.
    showProxySchemaURL If this parameter is set to true, the full proxy URL will be set as the prefix to the schema location of the imports in proxy WSDL.

    If your WSDL has dependencies with other resources (schemas or other WSDL documents), you can link them using the Wsdl Resources property. You can enter the registry key and the location of the dependent resource: The location is available in the WSDL. When you have the location, you can find the registry key corresponding to the location from the registry.

    In the following example, the WSDL imports a metadata schema from the metadata.xsd file. Therefore, the location is metadata.xsd.

    <xsd:import namespace=http://www.wso2.org/test/10 schemaLocation="metadata.xsd" />
    

    In the following example, the WSDL is retrieved from the registry using the key my.wsdl. This WSDL imports another WSDL from http://www.standards.org/standard.wsdl. This dependent WSDL is retrieved from the registry using the standard.wsdl registry key.

    <publishWSDL key="my.wsdl">
        <resource location="http://www.standards.org/standard.wsdl" key="standard.wsdl"/>
    </publishWSDL>