Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top