IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How can I determine the fully qualified name space of a document type at runtime

    Posted Thu July 21, 2005 04:09 PM

    I am writing a service that takes as input a generic document type. I need to be able to determine the fully qualified name of the document that is passed in as input to this service. The end goal of the service is to be able to take a generic document, determine its fully qualified name, and resolve that name to the broker document type that is associated with the document. The broker document type name (minus the “::”) is being used as the topic name that I will be publishing this document to in Tibco EMS.

    Troy


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Thu July 21, 2005 10:31 PM

    Troy,

    Well, you can, of course, get the local name of the document type without the namespace (folder.subfolder) qualification using just the IDataCursor.getKey() method.

    You could use the isValidService example to determine if that name was, in fact, the fully qualified name of a document type.

    However, I don’t know of a way to derive a fully qualified document type name without using some external repository. If your service is called with only the non-qualified document type name, say PurchaseOrder, you would not have any way of knowing whether the correct document type was pub.accounting:PurchaseOrder or pub.inventory:PurchaseOrder.

    The pub.publish:publish service takes an additional parameter so that it knows the correct document to publish to the broker. If you want to do the same thing, but derive the document type name you’ll have to either restrict the problem space (only documents in these folders, for example) or come up with a way to look up the name in some repository (xml file, database, etc.).

    HTH,

    Mark


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Fri July 22, 2005 08:19 PM

    The best approach, IMO, would be for the service to be passed the fully-qualified document type name. As Mark pointed out, all the wM-supplied services that need to know the document type name expect the caller to pass it in. The document type name cannot be determined by the document’s name in the pipeline.

    One possibility is to use, or implement something similar, TN document type recognition. It is able to determin a TN doc type (which is different from an IS doc type) based on recognition rules you set up. Once you know the TN doc type, you can look up the IS doc type if the TN document type definition has been set up properly. Probably not a path to go down, however. Would highly recommend that your generic “publish to TIB” service have a required “documentTypeName” parameter.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Fri May 06, 2011 08:00 AM

    Hi Troy and Carlson,

    Is there any service “to find the services ,that publishes a particular document” when you give the document as input.
    i.e… When I give a document name,I should get the services that publishes this document. ??

    Thnx
    Sajeevan


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Fri May 06, 2011 05:28 PM

    I’ve never found such a facility. One could be created but it would involve using non-public services/Java classes to do it.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Wed August 24, 2011 06:23 AM

    you can do this by writing a java service with Service.DoInvoke() method, The service name you can set it to “pub:publish”.

    Regards,
    Pradeep


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: How can I determine the fully qualified name space of a document type at runtime

    Posted Wed August 24, 2011 05:11 PM

    How would this help “to find the services ,that publishes a particular document”?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB