Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Creating and interacting with an OData V4 unbound action

(1) ShareShare
ReportReport
Posted on by
Hello,
 
I want to send an xml file (in a text parameter) to a codeunit procedure which is published as a webservice
 
 
Similar to this wel known procedure, except the "InputJson: Text", needs to be an "inputXml: text" parameter
procedure GetLengthOfStringWithConfirmation(inputJson: Text): Integer
 
I try this in Postman
But I get the error: "A supported MIME type could not be found that matches the content type of the response"
The xml is in the body below.
 
Thanks for helping
  • Creating and interacting with an OData V4 unbound action
    Thanks!!!
  • Verified answer
    SidharthanCP Profile Picture
    SidharthanCP 10 on at
    Creating and interacting with an OData V4 unbound action
    Hi, 
        XML files cannot be directly sent as text files via webservice, rather you can convert them as base64 string and send that via Webservice.
    To convert your XML file stored in a field into Base64 string you can use the Standard Base 64 CodeUnit and to decode them in your end system, you can use any online 'Base64 to XML Converter' or implement the conversion logic yourself by using mime type as 'text/plain' or 'application/xml'. Thank you.

    Regards,
    Sidharthan 
    Congruent Info-tech - https://www.congruentsoft.com/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,361 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,392 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans