A DotNet Interop Soap Web Request

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 Replies to “A DotNet Interop Soap Web Request”

  1. 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. 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

Leave a Reply