โ06-27-2017 07:38 PM
Iโm trying to execute an Ultra pipeline with an XML payload, but Iโm getting the error below:
Document input views only accept JSON-encoded data
Resolution
Please raise a defect with the following information, Pipeline Ruuid:d3c6dcc2-a498-4517-8df9-54910d504959
Reason
Snap failed unexpectedly and did not provide any reason
What steps can be taken to make Ultra parse an XML payload?
โ06-28-2017 06:31 AM
You can place an XML Parser snap at the head of the pipeline to parse the XML request content. To send an XML response back to the client, youโll need to use an XML Formatter with an unlinked output and clear the โRoot elementโ field so that a separate binary document will be created for every document that flows through the XML Formatter.
โ06-28-2017 06:36 AM
All my existing pipelines (which were functional in non-Ultra) were using XML Parser snaps alreadyโฆ My client program which was making requests to SnapLogic was setting the โContent-Typeโ header to โapplication/xmlโ which I suspect might have been causing this error.
I switched my client program to send a JSON payload and also modified the Content-Type header to send application/json and my Ultra pipeline accepts the payload.
Can you confirm if an Ultra pipeline that is sent an XML payload should also set the Content-Type header to application/xml or will that cause problems?
โ06-28-2017 07:31 AM
The Content-Type should always match what is in the payload.
โ06-28-2017 10:29 AM
@tstack, thanks so much for your inputโฆ so Iโve built the following pipeline which successfully executes in Ultra:
In my original pipeline I was passing in a URL parameter which was being captured as a pipeline parameter. In Ultra, I want to capture this pipeline parameter by passing a parameter to the โPipeline Executeโ snap in my pipeline. However, based on the documentation for Ultraโฆ I have two questions: