1

I am developing an app under Java that has to call at some point a web service developed under navision that requieres domain user/pass which I have been provided with.

Right now this WS is not public, and I have to connect to certain VPN with different user/pass to be able to call the web service so I can properly test my code.

Every time I call it, I get a 401 code as a response, refusing my authentication.

I have tried using java.net.authenticator setting a default authenticator and org.apache.commons.httpclient setting default credentianls in the proper scope and still no positive answer was received.

I have also tried using external testing with soapUI without success, although I am not 100% configutation is correct.

Anyway, how can I identify the source of my authentication problem?

I am not sure if this is due to the fact that I am testing under vpn connection or ratther navision web services require some kind of special treatment, or both of these situations simultaneously.

I will welcome any thoughts, approaches, or comments.

Thanks

RVB
  • 13
  • 6

1 Answers1

1

One thing to check is the "WebServicesUseNTLMAuthentication" setting in NAV's middle-tier "CustomSettings.config" file. My understanding is this property needs to be set to "true" when you are not (or can't) use SPNEGO to authenticate, which is Microsoft's preferred and default method.

Some additional detail can be found in this MSDN article.

Also, Freddy Kristiansen (a software architect on the NAV team) wrote a great series of articles on his blog about how to connect to NAV web services from a variety of different platforms. The one's most relevant to your project are connecting to NAV web services in general and connecting to NAV web services from Java.

Hope that helps.

  • I does help indeed, as those articles may help me improve my understanding of this issue. Although after new trials I think my call to the web service is somehow ignoring my Authenticator credentials, which drives me to think my problem is more system related rather than code related. – RVB Jul 17 '12 at 07:05
  • Are you having these authentication problems in an environment where the web services are running on a different machine then the SQL Server? If so, you have to be very careful to ensure your domain accounts are delegated properly. [Here](http://blog.sonomapartners.com/2007/04/kerberos_and_de.html) is a good article on the subject in general, and [here](http://blogs.msdn.com/b/nav_developer/archive/2009/08/17/troubleshooting-multi-machine-installations-of-nav-2009.aspx) is a NAV-specific article. – anthonyhassard Jul 19 '12 at 14:50