we have a requirement where I will get an IDOC and need to map the required fields to an xml document and post it to trading partner through https post.
Now, What I need is:
How to create the XML document. Do I need to create the xsd? If yes, How to create it.
I will be submitting the xml to TN console where based on the processing service. The Processing service will do the https post.
If possible, pls let me know how we can submit xml to trading https post.
How to create the XML document. Do I need to create the xsd? If yes, How to create it —> You can create/build XML either XSD/DTD using XML editor tools (xmlspy or others) based on the mapping fields (meaning full names) and load/reference it to create IS Document Type or directly IS Document type (manual way) in the wM Developer.
I will be submitting the xml to TN console where based on the processing service. The Processing service will do the https post. → You should create the document in the TNConsole reference the XML data file which you have created above and follow the comments below.
Routing service to TN:wm.tn.doc:routeXML (node) Http service:pub.client:http (The Processing service wrapper should contain this service which posts the xmldata to your TP) …
Also review the Built-In-Services guide for more info on how to use the above mentioned services.
They may not have an XSD. But strictly speaking, you don’t have to have one. It’s a good idea to have one (generally) but you can just define an IS document type directly that matches the layout/element names of the XML you need to process.
The TN doc type will only need to know how to identify the document. The root tag is usually sufficient. Will the XML document have sender and receiver information in it? If so, define the doc type to extract those so TN can determine the sender and receiver. If the XML document will not have this information, there are a couple of approaches you can use–post again if you need help on that.
Configure the delivery for the TN profile of the partner. Define a rule that indicates when TN gets such a document, deliver it to the partner.
Of course you’ll want to review the wM docs on all of this.
Just as an example, I removed sender,receiver etc in my previous post. Yes, the sender and receiver are getting recognized. The processing rule is getting invoked and everything looks fine.
Just concerned about the load in the WrapperDoc. The load xmldata looks fine…but after mapping to WrapperDoc and converting it to node and submitting it to TN. The load doesn’t come properly…I mean the xml.
As in your previous reply. I have set the encoding to false when I was converting the WrapperDoc to xml and traced till there. The xmldata is appearing perfect and after converting it to node and submitting it to TN.
I am getting error saying. missing end tag.
This RealData field is the string field in WrapperDoc to which the actual xml load is mapped.
I am not able to submit to TN. If i Set encoding to true…I am able to submit it to TN.
If i Set encoding to true…I am able to submit it to TN.–> This setting is must for you.
You need to have Sender/Receiver fields in your xmldata and set the extraction in the TN Document Type section or pass the info in the TN_Params of routeXML/tn:receive as Rob pointed above.
Can you post the exact XML being used? If needed, you can replace sensitive data but try to leave any non-alpha or non-numeric characters in place. I suspect that there is a character in the original XML that isn’t encoded but needs to be.
Yes, If I set encoding to true I can submit successfully to TN. But the content is not appearing perfect. I mean the actual xml load is not appearing properly.
But when I have set encoding to false, The WrapperDoc after converting to xml is appearing fine. The actual load which was mapped to WrapperDoc is also appearing perfect but cannot submit it to TN.
Now, I have successfully posted the WrapperDoc xmldata to TN and the processing rule invoked the processing service.
Now, I have converted the bizdocToRecord and then documenttoxmlstring and then pub.client.http service.
Now, I am giving the inputs for url ( https://hhhhhhhh… still dont know the url). then
method = post
loadas = bytes
mapping the xmldata above to string field in data.
auth doc. type= BASIC
user and pass.
Is this enough to give these inputs or Do i need to give anyother inputs. Also, Will I get any confirmation back if the post is successful…for the error handling purpose.