How to write Flow Service,to send an xml doc to TN

Good Day People,I’m working on wM TN 6.5,and i’m able to create partner profiles,documents,processing rules,TPA’s and i’m submitting the document through the WmTNWeb i.e through browser. But as to my requirement i need to work with flow services i.e i need to know the sequence of flow steps through which i can send an xml file to the TN and also i wnat to know the receiving process of the bizdoc so that i could write my own business logic on it.Thanking You,tbhushan

For routing xml file to TN:
pub.xml:xmlStringToXMLNode (set your xmldata string here)
pub.tn.doc.xml:routeXML (this service routes any XML,EDI document to TN) before routing to TN make sure particual TN profiles,documenttype,processing rule criteria … are exists and enabled.

For receiving/extracting XML document from TN:
Your receiving flow(processing rule action service) input should/must have (bizdoc input use wm.tn.rec:BizDocEnvelope) bizdoc will be in the pipeline
use Map step(bizdoc/Content(bytes))
bytesToString(This step extracts the xmldata to a String)
pub.xml:xmlStringToXMLNode (Parsing starts here)
pub.xml:XMLNodeToDocument (This will output IDATA object ie parses to IS Document where you can use this in the downstream steps for mapping process to target document etc…)

Also please see the TradingNetworksUserguide for more baisc info and processing side etc…

HTH,
RMG

GoodDay People,Thank you rmg for your expertise help in giving the solution,for the above query.Now the problem is i’m using wM6.5 and it doesn’t have WmSamples package,so i don’t have a “writeToFile” service,instead of it i’m using “savePipelineToFile” and here i’m getting all the data in the pipeline,so i dropped all the unnessary variables but still i’m not getting the desired ouput i.e when TN sends a bizdoc,i’m doing all the steps as you mentioned previously and i mapped them to the output doc structure and i’m getting the output along with the other values in it.So,i want to know how to get the particular xml values from the output document.With Regards,tbhushan

You can download the WmSamples package from Advantage in the Best Practices → Utilities and Samples section.

Else you can also download PSUtilities package (lots of useful services/functions) get it from Advantage site.Its worth having it.

HTH,
RMG

GoodDay People,

Thank you Mr.Carlson for your advice,as you’ve said i’ve downloaded WmSamples from advantage site and i’m able to work with “writeToFile” service.

Now i’ve a problem,it is like this when i’m sending an xml doc to TN,the processing rule is executing fine and a service is called. In that service i’m catching the bizdoc and doing some mapping and writing the xmldata to file by using the “writeToFile” service,but when i open the output xml file it is same doc which i have sent to TN,i’m not getting the desired output.Please help me. ASAP.

With Regards,
tbhushan

Check your mapping logic. There seems to be some problems with your mapping logic.

“doing some mapping and writing the xmldata”

Did you checked DocumentToXMLString outbput (xmldata)string in the pipeline before you call writeToFile service??You can check there to get better understanding and crosscheck your mapping before you call DocumentToXMLString step.

HTH,
RMG

Hi all,

i have seen solution for sending xml to tn but iam facing problem when iam sending xml doc using a flow service from developer to tn. In result panel it displaying both sender and receiver as zero's(000000000) so that  my receiver unnable to get that document
  please guide me how to write a flow service for sending xml doc to TN and also in receiving the xml doc

Please help me in the above problem

With regards,
Sitaram

create TN XML document type for the equivalent xml document(with root element, extract sender and receiver. Do you have equivalent TN XML internal document types…

Sitaram,

Please search in this forum there are quite lot of threads discussed on the same procedure that you are looking for.I am sure you can find it.

use tn.doc.xml:routeXML a WmTN service for (sending XML document to TN) just convert your XML string to node using XMLStringToXMLNode and map it to node input of routeXML service and make sure you have already created TN DocumentType,Profiles (ExternalID’s–used for recognition senderid/receiverid) and processing rules etc…for XML document recognition in the Transaction Analysis section)…

Incase if the config value changes at latter point of time just you need to update the property file and save it to take into effect and this way no changes in the map.

HTH,
RMG

hi rmg, thanks for ur response i will try with ur solution

with regards,
sitaram