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
Expand all | Collapse all

submit to TN via File Polling

  • 1.  submit to TN via File Polling

    Posted Thu November 16, 2006 04:50 PM

    Here is my process

    1. webMethods creates my xml invoices
    2. I wait for a .tif file
    3. The files are moved to a folder for sending when both the invoice and tif exist
    4. I have a service that will be ran daily looking for files in the folder and confirming both files exist.
    5. I am using pub.file:getFile to retrieve the file(loadAS) tried both stream and bytes
    6. wm.tn.doc.xml:recordToBizdoc - to get the body
    7. wm.tn:submit - submit the document

    I have TWO problems

    1. the document, sender and reciever are all unknown
    2. I am unable to see the contents of the file

    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 2.  RE: submit to TN via File Polling

    Posted Thu November 16, 2006 05:12 PM

    The service wm.tn:submit does not do the recognition part - it assumes that the document is already recognized. Use wm.tn.doc.xml:routeXml instead which recognizes the XML and submits it for processing.

    Since routeXML takes xml node as an input, use documentToXMLString and xmlStringToXMLNode in conjunction to get xml node from your xml document - if your invoice is an IS document or just xmlStringToXMLNode if the invoice is just an xml string.

    Hope this helps
    ~Rohit


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 3.  RE: submit to TN via File Polling

    Posted Thu November 16, 2006 05:27 PM

    Can you comment on best practice

    1. Schedule this to run once a day list files and sending

    or

    1. File Poller that pulls the file looks for .tif then processes it

    I am really kind of lost on the approach to take.

    As always a big thanks
    Cheryl


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 4.  RE: submit to TN via File Polling

    Posted Thu November 16, 2006 06:59 PM

    In general I think the scheduled task would work better since processing has to wait until 2 separate files are present. You have more control over how the file is handled. You might want to see [thread=9950]this[/thread] thread which discusses a similar situation.

    Tim


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: submit to TN via File Polling

    Posted Thu November 16, 2006 10:28 PM

    Scheduled task it is… Thanks for the article.

    I have been fighting all day with getting my document sender reciever recognized. My process includes

    1. get File
    2. xmlStringToXMLNode
    3. routeXml
      on side note…
    4. I do have a document set up
    5. I do have the trading partner set up

    My xml data is making it to TN as Unknown Unknown Unknown. I can see the xml data and it looks great.

    I notice that routeXml has two services in it
    recognize
    routeBizdoc

    I do not see a way to set TN_param sender and reciever data like you would in a flat file. Can someone tell me what I am missing?

    Thanks in Advance
    Cheryl


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: submit to TN via File Polling

    Posted Thu November 16, 2006 11:21 PM

    More specifically after recongnize bizdoc loses the Sender Reciever Document
    setting.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 7.  RE: submit to TN via File Polling

    Posted Fri November 17, 2006 12:10 AM

    In the TN Document Type that you have setup for your Invoice, check if the document identification is properly set and also double check the extraction queries SenderID and ReceiverID for that Document type. Then resubmit the data to TN using routeXML and see if it works.

    I am pretty sure you would find your solution in one of the above.

    ~Rohit


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 8.  RE: submit to TN via File Polling

    Posted Fri November 17, 2006 04:09 PM

    Reason for your unknown recognizition is because it is TN defaultrule is selected.Are you sure your TN setup (profiles,externalid’s,documenttype recognition,processing rule are confirgured properly??).Please make sure step by step and see whats going on in the Activitylog/IS logs.

    Rohit’s comments above are also pointing in the same direction.Pls check the same.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 9.  RE: submit to TN via File Polling

    Posted Fri November 17, 2006 04:36 PM

    Cheryl,

    If your document, sender, and receiver are not getting recognized, then first focus on figuring out why the document is not getting recognized. If TN can’t recognize the document type, then it definitely won’t recognize the sender/receiver, since sender/receiver identification queries are stored in the document type definition.

    I suggest opening the TN console, going to the Document Types screen, and using the “Test document types” button to run your XML through. If a message comes back saying “1 Document Type found”, then you know that something your service is causing the problem. Otherwise, you’ll probably have to change your document type defintion (ie. the Root Tag and/or identification queries).

    • Percio

    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 10.  RE: submit to TN via File Polling

    Posted Fri November 17, 2006 06:41 PM

    Okay, let’s take an example… assume your xml looks like the following:
    <?xml version="1.0"?>

    110022333
    66999665
    110022333-c0a87a66f70d6a8b0015d850-Product Provider
    110022333_d6a8b0015d850R_Request.rno
    WmUsers-Member

    <RNET_TransactionId>TXN-ID-EXAMPLE</RNET_TransactionId>
    Request
    REGISTRATION-NUM
    DEBIT-NO
    000000009385.21
    0001
    INVOICE-NUM-102562
    2006-11-17 08:09:18
    0000095
    ROSETTANET
    Quote-Num-102562
    40-TrackNum
    CUSTOMER
    USD
    D


    Now, in the TN Document type for above XML, the identification can be based on the Root Tag - ie,
    Root Tag = DesignClaimRequest

    The SenderID Query (under Extract tab) should be set to
    DesignClaimRequest/SenderID and

    The ReceiverID Query (under Extract tab) should be set to
    DesignClaimRequest/ReceiverID

    Besides, let’s say you want to extract RNET_TransactionId, the query for that would be:
    DesignClaimRequest/DesignClaim/RNET_TransactionId

    So you see, you have to set an identification criteria that uniquely identifies your document and then, you set up extraction query, which is the path of the attribute in your XML, to get the attribute(s) that you want to extract.

    HTH, Rohit


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 11.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 04:54 PM

    Thanks to all who have so patiently helped me.
    Percio… I had no idea you could test a document thanks for the tip.

    I have it recognizing the document type but something is WRONG.
    (PIDX 1.0)
    root tag Invoice
    It finds the document type and handles it

    HOWEVER
    If any identifying queries are added via the Test Query it STOPS working.

    My thinking is… In document set up if I load the file, Test the Query, and have the program insert the Identifying Query when I test that same document IT SHOULD WORK. But is isn’t


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 12.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 04:57 PM

    attached is the document I am trying to process… I will continue to look into this.

    Cheryl
    34072330.FRST.200611150952.zip (1.63 KB)


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 13.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 05:14 PM

    Cheryl,

    Q1: What is the identifying query you are tyring to use?
    Q2: Do you really need an identifying query? In other words, will there be more than one document type that have the root tag Invoice?

    • Percio

    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 14.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 06:03 PM

    Chill,

    I believe the root tag should be "pidx:Invoice"?? and not just Invoice as per your PIDX XML document.Did you tried this??What is your current identifying queries set to Sender/Receiver/DocumentID etc…recognition??

    HTH,
    RMG



    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 15.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 06:12 PM

    I suspect that the identifying queries may be failing due to namespace issues. Make sure you have the namespace stuff configured in your doc type, if you want to use identifying queries instead of just the root tag.


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 16.  RE: submit to TN via File Polling

    Posted Mon November 20, 2006 06:19 PM

    It is the namespace.

    You all have been a tremendous help in giving me useful knowledge/tool and solving this issue.

    Sincerely

    Cheryl


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 17.  RE: submit to TN via File Polling

    Posted Thu December 14, 2006 05:54 PM

    As always this was great quidance. Thanks


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 18.  RE: submit to TN via File Polling

    Posted Thu December 14, 2006 05:55 PM

    As always this was great guidance. Thanks


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 19.  RE: submit to TN via File Polling

    Posted Tue December 19, 2006 09:59 PM

    This is a great example. I have a couple of questions.

    1. The xml I am receiving has no dtd or xsd associated with it. Does this matter?
    2. It has no <?xml version="1.0"?>. Does that matter
    3. In XML spy it is a well formatted document. I can query the document in TN but when I run the document not document type is found.

    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 20.  RE: submit to TN via File Polling

    Posted Wed December 20, 2006 01:42 AM

    FYI…In general any XML document must/should have this tag starting with <?xml version="1.0"?> otherwise even xmlspy or any other product cannot validate or consider it as proper XML doc nor be well formed.

    HTH,
    RMG


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB