Can we pass XML payload to rest connector in Azure Data Factory? or How to pass XML payload to rest connector in Azure Data Factory

Ramakrishna Tumati 1 Reputation point
2021-09-24T05:08:47.827+00:00

Hi,

I am trying to get data from Rest API service, it uses payload in XML format. So, when using Azure Data Factory I am trying to pass this payload as request body.

But getting this error "Error occurred when deserializing source JSON file ''. Check if the data is in valid JSON object format. Unexpected character encountered while parsing value: <. Path '', line 0, position 0."

So, I want to check if XML can be passed as request body? or Is there any other way to solve this?

Any information regarding this issue will be very helpful.

Thank you
Ramakrishna Tumati

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,521 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
313 questions
{count} votes

1 answer

Sort by: Most helpful
  1. svijay-MSFT 5,201 Reputation points Microsoft Employee
    2021-09-27T08:03:21.923+00:00

    Hello @Ramakrishna Tumati ,

    When I passed the XML in request body Payload, and I was not encountering the issue. However, you could check the format of the response body.

    If the response body is XML, you re likely to encounter this issue as the REST connector supports only JSON body for the response body.

    135501-image.png

    If this your case - the workaround would be to make use of the HTTP as a source

    135620-httpconnector.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators