Options

Consuming NAV Webservice from SAP

JanGDJanGD Member Posts: 12
edited 2011-03-02 in NAV Three Tier
Hello,

we are currently trying to implement a Webservice-"way" from SAP to NAV.
We already succeeded in creating it from NAV to SAP.
But the NAV webservice demands AD-Credentials.
Is there any workaround for webservices to get a connection or is the only way to write a webservice proxy that makes an AD auth with the name/password and forward that to the NAV webservice then?

Thanks for your help
Yours sincerely
Jan

Comments

  • Options
    MrWhoMrWho Member Posts: 59
    Hi!

    Not sure if I could catch which way you are referring to about who is calling who. But here is an example from a ASP .NET web site calling NAV web service from another domain. Hope this brings you further. Not sure which possibilities there are in SAP of course.
           //WS_DynamincsNav_MyInvoices.MyInvoices       
    
            MyInvoices myInvoicesService = new MyInvoices();
            
            myInvoicesService.UseDefaultCredentials = false;
            NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
            myInvoicesService.Credentials = credentials;
            myInvoicesService.PreAuthenticate = true;
            
            string xmlBT = "";
            
            myInvoicesService.GetMyInvoices(ref xmlBT);
    
  • Options
    JanGDJanGD Member Posts: 12
    Well SAP wants to use NAV Webservice, so SAP consumes NAV Webservice.
    But SAP (afaik) does not support AD Auth, which is required for NAV.
    Your code consumes a webservice from C#. But C# in SAP? I don't think so ;-)

    Cheers,
    Jan
  • Options
    matteo_montanarimatteo_montanari Member Posts: 189
    JanGD wrote:
    Well SAP wants to use NAV Webservice, so SAP consumes NAV Webservice.
    But SAP (afaik) does not support AD Auth, which is required for NAV.
    Your code consumes a webservice from C#. But C# in SAP? I don't think so ;-)

    Cheers,
    Jan

    Hi

    "MrWho" showed an example of NTLM authentication, providing User&Password instead of current Windows Authentication (kerberos) credentials... :)

    Matteo
    Reno Sistemi Navision Developer
  • Options
    JanGDJanGD Member Posts: 12
    Still, you can't program C# in SAP.
  • Options
    deV.chdeV.ch Member Posts: 543
    Who said you should do it in c#? ;)
    it's just to show that its possible to do without windows auth...
  • Options
    kinekine Member Posts: 12,562
    I am afraid that they cannot do that directly in SAP... :-) I assume that SAP have some own environment for calling the webservices and it doesn't knowhow to do the authentication... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    JanGDJanGD Member Posts: 12
    kine wrote:
    I am afraid that they cannot do that directly in SAP... :-) I assume that SAP have some own environment for calling the webservices and it doesn't knowhow to do the authentication... :-)

    Thanks for understanding me. So it is verified. I was afraid about the answer.
    Well, SAP knows only the Basic Auth, means "i give userid and password, let me in", instead of "Here is my kerberos ticket" *door opens* ;-)

    Seems i have to write a WS Proxy service for adding that Credentials.
  • Options
    kinekine Member Posts: 12,562
    There is property in the NAV server config file to enable NTLM instead for authentication. May be it will help you to use the basic to pass the login and password and not the Kerberos ticket... try it, it is used e.g. when connecting from Java...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ara3nara3n Member Posts: 9,255
    Here is a web proxy for nav 2009 before NTML config setting was added ton NAV 2009.

    http://mibuso.com/blogs/ara3n/2009/05/0 ... b-service/


    It's basically a windows service that communicates with nav web service.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.