This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

The Address endpoint is an endpoint defined by specifying the EPR (Endpoint Reference) and other attributes of the configuration.



XML Configuration

Note

You can configure the Address Endpoint using XML. Click on the "Switch to source view" link in the "Address Endpoint" page.

<address uri="endpoint address" [format="soap11|soap12|pox|rest|get"] [optimize="mtom|swa"]
    [encoding="charset encoding"]
    [statistics="enable|disable"] [trace="enable|disable"]>

    <enableRM [policy="key"]/>?
    <enableSec [policy="key"]/>?
    <enableAddressing [version="final|submission"] [separateListener="true|false"]/>?

    <timeout>
        <duration>timeout duration in milliseconds</duration>
        <responseAction>discard|fault</responseAction>
    </timeout>?

    <markForSuspension>
        [<errorCodes>xxx,yyy</errorCodes>]
        <retriesBeforeSuspension>m</retriesBeforeSuspension>
        <retryDelay>d</retryDelay>
    </markForSuspension>

    <suspendOnFailure>
        [<errorCodes>xxx,yyy</errorCodes>]
        <initialDuration>n</initialDuration>
        <progressionFactor>r</progressionFactor>
        <maximumDuration>l</maximumDuration>
    </suspendOnFailure>
</address>
Address Endpoint Attributes

Attribute

Description

uri

EPR of the target endpoint.

format

Message format for the endpoint.

optimize

Method to optimize the attachments.

encoding

The charset encoding to use for the endpoint.

statistics

This enables statistics for the endpoint.

trace

This enables trace for the endpoint.


UI Configuration

1. In the "Add Endpoint" tab, click "Address Endpoint" (See Adding an Endpoint). The "Address Endpoint" page appears with its default view.

Address Endpoint

The following fields are specific to the Address Endpoint:

  • Name - The unique name of the endpoint.
  • Address - The URL of the endpoint.

Tip

You can test the availability of the given URL on the fly by just clicking the "Test" button.

2. In case you want to configure the advanced options, click on the "Show Advanced Options" drop down pane.

3. Then the page with all the available Address Endpoint options appears.

4. Specific Address Endpoint details are as follows:

  • Format- The message format for the endpoint. The available values are:Leave As-Is - No transformation is done to the outgoing message.
    • SOAP 1.1 - Transforming message to SOAP 1.1.
    • SOAP 1.2 - Transforming message to SOAP 1.2.
    • Plain Old XML (POX) - Transforming to plain old XML format.
    • Representational State Transfer (REST) - Transforming to HTTP Get Request.
    • GET
  • Optimize- Optimization for the message, which transfers binary data. The available values are:
    • Leave As-Is - No special Optimization. Keep the original message.
    • SwA - Optimized as a SwA (SOAP with Attachment) message.
    • MTOM - Optimized as a MTOM (message transmission optimization mechanism).

Note

The rest of the fields are general for Address, WSDL, Default endpoints. See the description of common options in Adding an Endpoint.


QoS for the Endpoint

QoS (Quility of service) aspects such as WS-RM(WS-Reliable messaging), WS-Security and WS-Addressing may be enabled on messages send to an endpoint using enableRM, enableSec and enableAddressing elements. Optionally, the WS-RM and WS-Security policies could be specified using policy attribute.

QoS Configuration

enableRM [policy="key"]

This enables WS-Reliable messaging for the message which goes for the endpoint. The optional policy attribute specify the WS-RM policy.

enableSec [policy="key"]

This enables WS-Security for the message which goes for the endpoint. The optional policy attribute specify the WS-Security policy.

enableAddressing [version="final | submission"] [seperateListener=" true | false"]

This enables WS-Addressing for the message which goes for the endpoint. User can specify to have separate listener with version final or submission.


Endpoint Timeout

Address endpoints can timeout if the response fails to arrive at Synapse by a predefined timeout duration specified in milliseconds. The timeout action specifies whether to discard response that arrives later, or to trigger a fault. Synapse has a periodic timeout handler that triggers itself at each 15 seconds interval. Thus endpoint timeout will have a +/- erroce on trigger time. Though this can be minimized by setting a System property synapse.timeout_handler_interval (This property can be set in synapse.properties synpase property file which is located in conf directory inside repository once you unzipped WSO2 ESB ) to a millisecond duration below the desired endpoint timeout.

Note

A lesser value may have a higher overhead on the system.

Timeout Configuration

duration

Timeout duration in milliseconds.

responseAction

Once a timeout occurs the action to perform, available options are discard (discard the response which arrives late) or fault (trigger a fault) .


Marking Endpoint for Suspension

As described before (see description on Timeout state above) this configuration element describes the configuration for a timeout endpoint.

markForSuspension Configuration

errorCodes

A comma separated error code list which can be returned by the endpoint. See SynpaseConstant class for a possible list of error codes.

retriesBeforeSuspension

Number of retries before go into suspended state.

retryDelay

The delay between each try.

Suspending Endpoint on Failure

Leaf endpoints(Address and WSDL) endpoint can be put into suspended state if it is detected as failed. An endpoint that fails may be suspended for a specified duration after such a failure, during which new messages will not be processed through the endpoint. The amount of time waiting before next attempt follows the following formula.

next suspension time period = Max (Initial Suspension duration * (progression factor* try count*), Maximum Duration)

All the variables in the above formula are configuration values used to calculate the try count. Try count means, how many tries occurred after the endpoint is "Suspended". As the try count increases, the next suspension time period will also increase. This increase is bound to a maximum duration.

suspendOnFailure configuration

errorCode

A comma separated error code list which can be returned by the endpoint.

initialDuration

Initial duration(in milliseconds) to suspend the endpoint.

progressionFactor

The progression factor for the geometric series. See above formula for a more detailed description.

maximumDuration

Maximum duration(in milliseconds) to suspend the endpoint.

Following are the sample address URI definitions.

Transport

Sample Address

HTTP

http://localhost:9000/services/SimpleStockQuoteService

JMS

jms:/SimpleStockQuoteService?
transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&
java.naming.provider.url=tcp://localhost:61616&
transport.jms.DestinationType=topic

Mail

guest@host

VFS

vfs:file:///home/user/directory\ vfs:file:///home/user/file\ vfs:

FIX

fix://host:port?BeginString=FIX4.4&SenderCompID=WSO2&TargetCompID=APACHE

  • No labels