XML formatter replaces " to "
I have an input to the XML formatter which looks like this 🙂 { “@SEGMENT”: “1”, “code”: “B00001”, MVodafone 150" BLACK “test_p”: [ ] } when this input is passed to XML formatter, it gives output as below: “code”: “B00001”, MVodafone 150amp;quot; BLACK Note** I have edited the output to place it in the forum. Is there any way, where we can stop xml formatter from replacing the " to " ?Solved3.9KViews0likes3CommentsPosting xml to webservice via rest post snap
Hi All, There is a requirement to post xml to a webservice , the input for the pipeline is xml and need to pass this xml as it is to webservice. I am using xml formatter and binary to document and trying to post via rest post snap to webservice but somehow am receiving 400 error everytime. The same xml when we are trying to post via postman , it is getting posted successfully to webservice. Below are the screenshots of pipeline:4.5KViews0likes2CommentsRetaining unparsed data after XML parsing/conversion
In Ultra pipelines, is there a way to retain data that wasn’t parsed by the XML parser? I would also like to retain data that wasn’t converted to XML. Consider this example pipeline: The Binary to Document1 snap output looks like this: [ { "task_name": "...", "content-length": "164190", "origin": "chrome-extension://aicmkgpgakddgnaphhhpliifpcfhicfo", "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><integrationMessage>...</integrationMessage>", "accept-language": "en-US,en;q=0.9", "method": "POST", "query": {}, "mytoken":"ABCD1234ABCD1234" ... } ] I want to be able to send mytoken in the header of a later REST Post, after I’m done extracting some data from the parsed XML. Is there a way mytoken can be retained? The other challenge I have is that the REST endpoint in question only accepts XML request body which means I need to use the convert to XML snap. The problem is that I need to pass mytoken in the request header but it shouldn’t be in the body. In my testing I found that the entire document is converted to XML by the convert to XML snap so I’m in a bit of bind. Before Convert To XML: [{ "REQUEST": { "REQUEST_DETAILS": { "REQUEST_DETAIL": [ { "ENTITY_ID": "123456123", "FIRST_NAME":"John", "LAST_NAME":"Doe" } ... ] } } }] The output of Convert To XML: [ { "content-type": "text/xml; charset=utf-8", "content": "<?xml version='1.0' encoding='UTF-8'?><REQUEST>...</REQUEST>" } ] Is there a way to get something like this? [ { "mytoken":"ABCD1234ABCD1234" "content-type": "text/xml; charset=utf-8", "content": "<?xml version='1.0' encoding='UTF-8'?><REQUEST>...</REQUEST>" } ] I would then be able to send mytoken in the REST Post request header.1.8KViews0likes0CommentsAn XML Generator & XML Formatter Snaps example
Here’s an example illustrating the use case of the snaps XML Generator, XML formatter and File writer. The 1st snap “XML Generator” of the pipeline generates a document format data with the given xml input configured in the snap on “Edit XML *” in snap settings. The 2nd snap “XML Formatter” accepts the document format and encapsulates the data into XML formates and provides the the binary output which can be an input to the File writer snap which accepts the binary input. Attached is the .slp for pipeline reference.XMLGenerator_Formatter_2017_03_1.slp (4.1 KB)4.6KViews1like1Comment