How to enable dynamic invocation of an endpoint with a wired HTTP data binding import.
You can create a mediation module that includes the dynamic endpoint, by performing tasks in WebSphere® Integration Developer.
epr = EndpointReferenceFactory.INSTANCE.createEndpointReference(); epr.setAddress(uri); epr.setBindingType(bindingType); Service dynamicService = (Service) ServiceManager.INSTANCE.getService(refname, epr); DataObject customer = createCustomer(refname, "twoway", uri);The HTTP URI has the same prefix as a WebServices SOAP/HTTP endpoint address. Identify the correct endpoint type by adding a binding type attribute to the endpoint reference. If you do not specify the binding type attribute for the HTTP URI, the address is interpreted as a SOAP / HTTP endpoint, even when the endpoint reference is wired to a HTTP import.
The HTTP endpoint used in the dynamic invocation is structured according to the HTTP URI standard.
Dynamic invocation takes place when the POJO is invoked in a request-response operation, with Export 3 identified as the endpoint in the message. The POJO extracts the endpoint from the message, and identifies Export 3 as the endpoint, rather than the Export 2 endpoint specified in the original deployment. The POJO uses the SCA Endpoint Reference API, and the reference wired to the Import, to invoke the remote service specified by the endpoint in the message. The binding type is set to HTTP, to ensure that the correct address type is used. After the service is invoked, a response is returned to the POJO.
A one-way invocation message works the same way as a two-way message, except that no response message is returned.