UDDI Endpoint Lookup mediation primitive

Use the UDDI Endpoint Lookup mediation primitive to dynamically route messages to appropriate service endpoints.

Introduction

You can use the UDDI Endpoint Lookup mediation primitive to retrieve service endpoint information from a UDDI version 3 registry. The service endpoint information relates directly to web services.

To use the UDDI Endpoint Lookup mediation primitive you might need to add service endpoint information to your registry.

The UDDI Endpoint Lookup mediation primitive lets you retrieve service endpoint information that relates to the following:
  • Web services using SOAP/HTTP.
  • Web services using SOAP/JMS.

When the UDDI Endpoint Lookup mediation primitive receives a message it sends a search query to the registry. The search query is constructed using the UDDI properties that you specify and the query might return nothing, or it might return one or more service endpoints. You can choose whether to be informed of all endpoints that match your query, or just one endpoint that matches your query.

The UDDI Endpoint Lookup mediation primitive has one input terminal (in), two output terminals (out and noMatch), and a fail terminal (fail). The in terminal is wired to accept a message and the other terminals are wired to propagate a message. If an exception occurs during the processing of the input message, the fail terminal propagates the input message, together with any exception information. If service endpoints are retrieved from the registry, the out terminal propagates the original service message object (SMO) modified by the service endpoint information. If no services are retrieved from the registry, the noMatch terminal propagates an unmodified message.
Note: For the runtime environment to implement dynamic routing on a request, you must set the Use dynamic endpoint if set in the message header property in the callout node or Service Invoke mediation primitive. You can specify a default endpoint that the runtime environment uses if it cannot find a dynamic endpoint. You specify a default endpoint by wiring an import that has the default service selected.

Details

The UDDI Endpoint Lookup mediation primitive uses the Endpoint Reference structure defined by the WS-Addressing specification. For more information, see: http://schemas.xmlsoap.org/ws/2004/08/addressing.

Updates made to the SMO by the UDDI Endpoint Lookup mediation primitive are dependent on the success of the registry query (matches are found during the registry query) and the match policy.

The UDDI Endpoint Lookup mediation primitive can make updates to both the SMO context (the primitiveContext element) and to SMO headers:
  • /headers/SMOHeader/Target/address.
    • Can contain the address of a service to call dynamically (the dynamic callout address).
  • /context/primitiveContext/EndpointLookupContext.
    • Can contain the results of the UDDI query.
  • /headers/SMOHeader/AlternateTarget
If the UDDI Endpoint Lookup mediation primitive updates the SMO with one or more endpoint addresses, it will also update the SMO so that each endpoint address has an associated bindingType. The bindingType set by the UDDI Endpoint Lookup mediation primitive is WebService.

To define the UDDI servers and specify the connection information: in the Administrative console, navigate to Service integration > Web services > UDDI References.

Usage

You can use the UDDI Endpoint Lookup mediation primitive, together with other mediation primitives, to add security to dynamic routing. For example, you could use the UDDI, Message Filter and Mapping mediation primitives to check whether an endpoint is external or internal, and remove any internal information from public messages. To do this you must:
  1. Wire the matching output terminal of the UDDI Endpoint Lookup mediation primitive to the input terminal of the Message Filter mediation primitive.
  2. Use the Message Filter mediation primitive to check whether the URL was internal or external, and route external messages to the Mapping mediation primitive (by wiring one of the Message Filter output terminals to the Mapping mediation primitive).
  3. Use the Mapping mediation primitive to remove private information from messages.

SOAP/HTTP example

The URI format in the case of an export with a web service binding, is as follows:
http://<host>:<port>/<moduleName>/sca/<exportName>
The URI format in the general web service case, (when a web service is not implemented by an export with a web service binding), is as follows:
 http://<host>:<port>/<service>
Consider the following example WSDL.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SOAP_HTTPExport_BigEchoHttp_Service" targetNamespace="http://big.com/Binding3" 
		xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
		xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
		xmlns:Port_0="http://big.com" 
		xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
		xmlns:this="http://big.com/Binding3" 
		xmlns="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:import namespace="http://big.com" location="BigEcho.wsdl"/>
  <wsdl:binding name="SOAP_HTTPExport_BigEchoHttpBinding" type="Port_0:BigEcho">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="echo">
      <soap:operation/>
      <wsdl:input name="echoRequest">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="echoResponse">
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="BadBoyException">
        <soap:fault name="BadBoyException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SOAP_HTTPExport_BigEchoHttpService">
    <wsdl:port name="SOAP_HTTPExport_BigEchoHttpPort" binding="this:SOAP_HTTPExport_BigEchoHttpBinding">
      <soap:address location="http://testhost:9080/RegistryWeb/sca/SOAP_HTTPExport"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

The port declaration contains a soap:address location of http://testhost:9080/RegistryWeb/sca/SOAP_HTTPExport. This indicates that it is an export with a web service binding. To enable dynamic routing, update the /headers/SMOHeader/Target/address field in the message with the location value in the soap:address element.

SOAP/JMS example

The URI format in the case of an export with a web service binding, is as follows:
jms:/queue?destination=jms/WSjmsExport&connectionFactory=jms/WSjmsExportQCF&targetService=WSjmsExport_ServiceBJmsPort
The URI format in the general web service case, (when a web service is not implemented by an export with a web service binding), is as follows:
 jms:/queue?destination=<destName>&connectionFactory=<factory>&targetservice=<service>
Consider the following example WSDL.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SOAP_JMSExport_BigEchoJms_Service" targetNamespace="http://big.com/Binding4" 
		xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
		xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
		xmlns:Port_0="http://big.com" 
		xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
		xmlns:this="http://big.com/Binding4" 
		xmlns="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:import namespace="http://big.com" location="BigEcho.wsdl"/>
  <wsdl:binding name="SOAP_JMSExport_BigEchoJmsBinding" type="Port_0:BigEcho">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
    <wsdl:operation name="echo">
      <soap:operation/>
      <wsdl:input name="echoRequest">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="echoResponse">
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="BadBoyException">
        <soap:fault name="BadBoyException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SOAP_JMSExport_BigEchoJmsService">
    <wsdl:port name="SOAP_JMSExport_BigEchoJmsPort" binding="this:SOAP_JMSExport_BigEchoJmsBinding">
      <soap:address location="jms:/queue?destination=jms/SOAP_JMSExport&;connectionFactory=jms/SOAP_JMSExportQCF&;targetService=SOAP_JMSExport_BigEchoJmsPort"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>