Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Webservice, Soap and VS Code

Posted on by 997

We have a case where in we need to connect to a SOAP 1.1 web service with anonymous authentication, but in the soap request message we need to pass in the token and then send in the request to the web service. In response we will get the response of authentication result, if it is successful then we need to send another soap message with the same connection. How can this be done in VS Code? Can we make use of XML Document to frame the messages & send it with the Http Client?

*This post is locked for comments

  • Claus Macali.dk Profile Picture
    Claus Macali.dk 997 on at
    RE: Webservice, Soap and VS Code

    Hi Stafano, no,  we will give it a go

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Webservice, Soap and VS Code

    Have you tryed with HttpClient for calling the WS, then HttpResponseMessage for parsing the response?

    For passing a custom Header to your request, you can use HttpClient.DefaultRequestHeaders.Add(....)

  • Claus Macali.dk Profile Picture
    Claus Macali.dk 997 on at
    RE: Webservice, Soap and VS Code

    Sure its al code, but if we have make a clean extension 2 app, we just have the al code to use. If we did not have to keep it alive no problem

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Webservice, Soap and VS Code

    Do you say “VS CODE” because you want do all these tasks in AL? It’s quite difficult to do everything only with AL now. Maybe you can call an Azure Function and here you can create the interaction with the external WS as you want (here you have full C#).

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans