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.  Get Document Type Name during runtime

    Posted Tue May 11, 2004 12:18 PM

    Hello Experts,

    I hope you can help me with my problem. I am using webMethods 6.1 and I have built a service that will convert the contents of a document into XML string and save it to an Oracle database. I now have to write a service to retrieve the XML string from the database and convert it back to a document and then publish it. The only problem I have is that I don’t know how to get the documentTypeName (dynamically) which is a required field for the publish step.

    These services have to be able to handle different document types.

    I was thinking that I could get the document type name dynamically at the start and insert it into the database as a varchar, then I can retrieve it and publish the document.

    I’ve been reading and searching for 2 days now but I still can’t find what I need.

    Thanks in advance for your help,

    Xochi


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


  • 2.  RE: Get Document Type Name during runtime

    Posted Tue May 11, 2004 05:00 PM

    I was thinking that I could get the document type name dynamically at the start and insert it into the database as a varchar, then I can retrieve it and publish the document.

    Can you tell us where you got stuck in the flow?

    When you are inserting the XML string to database at that time itself store the corresponsing docType and some ID,and later retrieve the doctypename,xmlstring using the ID before publishing.So that you will have some hold while publishing the corresponding document.

    HTH,


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


  • 3.  RE: Get Document Type Name during runtime

    Posted Wed May 12, 2004 03:41 AM

    Hello RMG,

    Thanks you very much for your reply. I am essentially looking for a way to get the doc type name of a document given just the document object itself. I want my service to take any document as input and save it as XML to the database together with the document type name. If possible, I want to be able to extract the doc type name(namespace) of the document from the document itself and not have the calling service supply it explicitly.


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


  • 4.  RE: Get Document Type Name during runtime

    Posted Fri June 11, 2004 01:03 PM

    I am also searching for such a service …
    Did you find any way to get the document type from the document object ?
    maybe using the Java API (IDataUtil, etc) …


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


  • 5.  RE: Get Document Type Name during runtime

    Posted Fri June 11, 2004 01:50 PM

    Hi,

    There is a service in WmPublic “pub.xml:getXMLNodeType” which gives you the root node, namespace etc of the document.
    For e.g, if the following xml is converted to node using “pub.xml:xmlStringToXMLNode” and by calling “pub.xml:getXMLNodeType” , you get “inv” as the root node.

    <?xml>
    <inv>
    <invheader>
    </invheader>
    <invdetail>
    </invdetail>
    <summary>
    </summary>
    </inv>

    I think that you are looking for this. If I wrongly understood you then excuse.

    Regards,
    Kalyan


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