I am currently working on a solution that requires a Dynamics NAV client to communicate with Dynamics NAV web service.  This I have done before with the classic client and have used automation objects for the job.  Now I wanted to do this with dotnet only objects in the Role Tailored Client.  Took some time to put all things together but here it is.  This version is running the request from the client.


8 thoughts on “A DotNet Interop Soap Web Request

  1. JAJ says:

    Hi Gunnar,

    Thanks for your post. It was very useful for me. But I have a doubt. How I can manage a error 500 with HttpWebRequest.GetResponse sentece?. If my webservice return a error, I can not manage it.

    Thank in advance.

  2. Nazar says:

    the same problem
    how to emulate on RTC this code:
    IF WinHTTP.status 200 THEN BEGIN

  3. Thank you for your replies. I finally got on the task. The result are in my newest blog entry -> http://www.dynamics.is/?p=1255

  4. Prajeesh says:

    Hi Gunner,

    I need a help from you. while using XML automation variable i a have written a piece of code for finding the StatusCode in the Response XML.
    I have used the following code for that.

    //Check for statusCode, validating if the Request was successful
    NodeList := Source.getElementsByTagName(‘statusCode’);
    Node := NodeList.nextNode;
    Status += Node.text;
    IF Status ‘Success’ THEN
    Error(‘The Response is unsuccessful full’);

    I want to change this code to Dot Net since i am using Dot Net variable instead of XML automation variables. Please help me. Thanks

  5. Nuno Silva says:

    Just a quick question, this solution works with any webservice or just NAV to NAV WS

    1. Should work with any SOAP service

  6. Dag Viggo says:

    Hi Gunnar, where can I download this example? Copying to text file and importing in NAV doesn’t work 🙁

    1. Hi Dag,
      I have updated the post, you should be able to copy the objects now.

Leave a Reply

%d bloggers like this: