WSRR Registry Endpoint Lookup from WebSphere Message Broker

Using WebSphere Registry and Repository inside an WebSphere Message Broker Flow

Step 1: Build an Message Broker flow that looks like the following:

Step 2: Configure WSRR_IN and specify an MQ Queue

Step 3: Configure the Endpoint Lookup One Node to the following

The customer WSDL is loaded into WSRR below with namespace http://jkhle.itso.ibm.com

Step 4: SOAP Request Node looks like the following:

Step 5: The InformWSResult contains the following ESQL code to notify that the WSRR lookup was successful.

CREATE COMPUTE MODULE WSRR_Connectivity_InformWSResult

CREATE FUNCTION Main() RETURNS BOOLEAN

BEGIN

— CALL CopyEntireMessage();

CALL CopyMessageHeaders();

— The response from the WebService contains a HTTP Header

— Remove the HTTP header and create a MQMD header in order to propagate the message to a MQ output node

SET OutputRoot.HTTPResponseHeader = NULL;

CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN ‘MQMD’;

— Retrieve the MQMD that was stored earlier

SET OutputRoot.MQMD = Environment.MQMD;

SET OutputRoot.XMLNSC = InputRoot.SOAP.Body;

RETURN TRUE;

END;

Alternatively Step 5:  If failure occurred during WSRR call the following Message will be shown:

“Failure to retrieve Service from WSRR”

CREATE COMPUTE MODULE WSRR_Connectivity_InformFailure

CREATE FUNCTION Main() RETURNS BOOLEAN

BEGIN

CALL CopyMessageHeaders();

CREATE LASTCHILD OF OutputRoot DOMAIN ‘XMLNSC’;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = ‘1.0’;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = ‘UTF-8’;

CREATE LASTCHILD OF OutputRoot.XMLNSC NAME ‘LookupResults’;

SET OutputRoot.XMLNSC.LookupResults.WSRR_Request = InputRoot.XMLNSC.WSRR_Request;

SET OutputRoot.XMLNSC.LookupResults.ServiceRegistry = ‘Failure to retrieve Service from WSRR!’;

SET OutputRoot.XMLNSC.LookupResults.Exception = InputExceptionList;

RETURN TRUE;

END;

Alternative Step 5:  No matching Service Exist in WSRR the following error will occur: “No match services!”

CREATE COMPUTE MODULE WSRR_Connectivity_InformNoMatch

CREATE FUNCTION Main() RETURNS BOOLEAN

BEGIN

CALL CopyMessageHeaders();

CREATE LASTCHILD OF OutputRoot DOMAIN ‘XMLNSC’;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = ‘1.0’;

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = ‘UTF-8’;

CREATE LASTCHILD OF OutputRoot.XMLNSC NAME ‘LookupResults’;

SET OutputRoot.XMLNSC.LookupResults.WSRR_Request = InputRoot.XMLNSC.WSRR_Request;

SET OutputRoot.XMLNSC.LookupResults.ServiceRegistry = ‘No matching services!’;

RETURN TRUE;

END;

10 Comments

  1. Dinesh says:

    Hi Michels,
    Im getting below exception during end point look up,kindly please help,than in advance
    ExceptionList
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\ImbDataFlowNode.cpp
    Line:INTEGER:1073
    Function:CHARACTER:ImbDataFlowNode::createExceptionList
    Type:CHARACTER:ComIbmMQInputNode
    Name:CHARACTER:EndpointLookupFlow#FCMComposite_1_1
    Label:CHARACTER:EndpointLookupFlow.Service Request
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:2230
    Text:CHARACTER:Node throwing exception
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp
    Line:INTEGER:1178
    Function:CHARACTER:ImbJniNode::evaluate
    Type:CHARACTER:SRRetrieveITServiceNode
    Name:CHARACTER:EndpointLookupFlow#FCMComposite_1_2
    Label:CHARACTER:EndpointLookupFlow.EndpointLookup
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:2230
    Text:CHARACTER:Caught exception and rethrowing
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp
    Line:INTEGER:1845
    Function:CHARACTER:ImbJavaExceptionUtils::throwableToNativeException
    Type:CHARACTER:
    Name:CHARACTER:
    Label:CHARACTER:
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:4367
    Text:CHARACTER:Unhandled exception in plugin method.
    Insert
    Type:INTEGER:5
    Text:CHARACTER:evaluate
    Insert
    Type:INTEGER:5
    Text:CHARACTER:EndpointLookup
    Insert
    Type:INTEGER:5
    Text:CHARACTER:java.lang.NullPointerException
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp
    Line:INTEGER:1863
    Function:CHARACTER:ImbJavaExceptionUtils::throwableToNativeException
    Type:CHARACTER:
    Name:CHARACTER:
    Label:CHARACTER:
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:4395
    Text:CHARACTER:Unhandled exception in plugin method
    Insert
    Type:INTEGER:5
    Text:CHARACTER:java.lang.NullPointerException
    Insert
    Type:INTEGER:5
    Text:CHARACTER:com.ibm.broker.plugin.MbService
    Insert
    Type:INTEGER:5
    Text:CHARACTER:getLogMessages
    Insert
    Type:INTEGER:5
    Text:CHARACTER:MbService.java
    Insert
    Type:INTEGER:2
    Text:CHARACTER:444

  2. Dinesh says:

    Hi Michels,
    Im getting below exception during end point look up,kindly please help,than in advance
    ExceptionList
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\ImbDataFlowNode.cpp
    Line:INTEGER:1073
    Function:CHARACTER:ImbDataFlowNode::createExceptionList
    Type:CHARACTER:ComIbmMQInputNode
    Name:CHARACTER:EndpointLookupFlow#FCMComposite_1_1
    Label:CHARACTER:EndpointLookupFlow.Service Request
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:2230
    Text:CHARACTER:Node throwing exception
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp
    Line:INTEGER:1178
    Function:CHARACTER:ImbJniNode::evaluate
    Type:CHARACTER:SRRetrieveITServiceNode
    Name:CHARACTER:EndpointLookupFlow#FCMComposite_1_2
    Label:CHARACTER:EndpointLookupFlow.EndpointLookup
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:2230
    Text:CHARACTER:Caught exception and rethrowing
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp
    Line:INTEGER:1845
    Function:CHARACTER:ImbJavaExceptionUtils::throwableToNativeException
    Type:CHARACTER:
    Name:CHARACTER:
    Label:CHARACTER:
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:4367
    Text:CHARACTER:Unhandled exception in plugin method.
    Insert
    Type:INTEGER:5
    Text:CHARACTER:evaluate
    Insert
    Type:INTEGER:5
    Text:CHARACTER:EndpointLookup
    Insert
    Type:INTEGER:5
    Text:CHARACTER:java.lang.NullPointerException
    RecoverableException
    File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp
    Line:INTEGER:1863
    Function:CHARACTER:ImbJavaExceptionUtils::throwableToNativeException
    Type:CHARACTER:
    Name:CHARACTER:
    Label:CHARACTER:
    Catalog:CHARACTER:BIPmsgs
    Severity:INTEGER:3
    Number:INTEGER:4395
    Text:CHARACTER:Unhandled exception in plugin method
    Insert
    Type:INTEGER:5
    Text:CHARACTER:java.lang.NullPointerException
    Insert
    Type:INTEGER:5
    Text:CHARACTER:com.ibm.broker.plugin.MbService
    Insert
    Type:INTEGER:5
    Text:CHARACTER:getLogMessages
    Insert
    Type:INTEGER:5
    Text:CHARACTER:MbService.java
    Insert
    Type:INTEGER:2
    Text:CHARACTER:444

  3. Thys Michels says:

    Hi, can you send me the flow or the ImbDataFlowNode.cpp?I need more info to see what you are trying todo.

  4. Dinesh says:

    Michel,
    Im geeting below error in windows event log,can u please correct me
    One or more service endpoints retrieved from WSRR by the EndpointLookup node ‘EndpointLookupFlow.EndpointLookup’ could not be processed. The number of endpoints not processed was ‘1’.

    A number of service endpoint entities were retrieved from WSRR, but one or more of these did not have a relationship that is required for it to be processed by the EndpointLookup node. An entity that is not processed will not appear in the LocalEnvironment and is therefore not available to subsequent nodes.

  5. Thys Michels says:

    Hi Denish, can you give me more info on how your lookup node looks?Look at this article:
    http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac55830_.htm

  6. zhupujoy@gmail.com says:

    I get the same exception

  7. Thys Michels says:

    Let me know if you need more assistance to solve the problem.

  8. Hari says:

    I am also getting the same error.

    ( MB7BROKER.WSRRConnectivitySample ) A WSRR query has failed. The configuration is: EndpointAddress: ‘https://localhost:9443/WSRR6_3/services/WSRRCoreSDOPort’; UserId, pw = ‘wasadmin’, ‘******’; TrustStore, pw = ‘C:\wsrr\DummyClientTrustFile.jks’, ”; KeyStore, pw = ‘C:\wsrr\DummyClientKeyFile.jks’, ‘******’. The WSRR exception is: ‘ServiceRegistryException’

    The query sent to WebSphere Service Registry and Repository (WSRR) has failed. This may be because the connection is not available, or because the query was badly formed. The EndpointAddress is the URL to the WSRR server. The other configuration settings listed in the message text specify details for the JMS connection: the name of the security identity (the UserId) and TrustStore and KeyStore in use, together with an indication whether their passwords are set.

    Check the WSRR Node configuration is set correctly. If security is enabled, make sure the user id, password and, if required by chosen security implementation, the Broker trust store and key store are set.

  9. Venkat says:

    Venkat,

    I am also getting the same exact error. We are using WSRR v8 and WMB v8. I have noticed that WMB 8 packages WAS 7 jars, under the directory ‘wsrrclient’. I have replaced with WSRR 8 jars to see if it makes a difference. Any inputs are welcome!

  10. Akshay Patil says:

    I am using IIB V10.0.0.3 and WSRR 8.5.6 BUT, I am still getting the same error. Here is what I caught:-

    Node throwing exception : sample.soap.flow.SampleMessageFlow.Endpoint Lookup Unhandled exception in plugin method : evaluate Endpoint Lookup <com.ibm.broker.plugin.MbRecoverableException class:EndpointLookup(SRRetrieveITServiceNode) method:evaluate source:com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure) key:com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure) message: Unable to resolve message: Source: com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure)Key: com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure) > Unhandled exception in plugin method : com.ibm.broker.plugin.MbRecoverableException EndpointLookup(SRRetrieveITServiceNode) evaluate Undefined -1 Throwable occurred when persisting entities from the query result com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure) com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager (initialization failure) : Flow (sample.soap.flow.SampleMessageFlow) Node (Endpoint Lookup)

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s