Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Request XML via Http

Posted on by Microsoft Employee

I have a URL which I need to send a request for to get the XML document.  I know you need to send a request with the URL etc but I can't find the correct variable sub types etc. Secondly I need to save this document in a folder, how would you do that. 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Request XML via Http

    .

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Request XML via Http

    Made a wrong post

  • Suggested answer
    Marcellus Profile Picture
    Marcellus 2,735 on at
    RE: Request XML via Http

    Check Arend-Jan Kauffmann's blog: www.kauffmann.nl/.../web-services-examples-part-1-the-basic-pattern

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Request XML via Http

    I have something like this so far..

    Request DotNet System.Net.HttpWebRequest.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    IncomeText BigText

    NewInstream InStream

    Request := Request.HttpWebRequest;

    Request := Request.Create(strURL);

    Request.UseDefaultCredentials := TRUE;

    Request.Method('GET');

    Request.ContentType('text/xml');

    NewInStream :=  Request.GetResponse().GetResponseStream();

    IncomeText.READ(NewInstream);

    How can I save this as an XML document?

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

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans