When i try to consume a web service that i created in AX 2012, i get this error:
'System.ServiceModel.Security.MessageSecurityException' occurred in mscorlib.dll
Additional information: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'.
In Ax i created a new Inbound port, Enhanced, and with HTTP as Adapter and selected one Service operation that i want to call from C#.
I then add the URI to Visual Studio : http://axserver/MicrosoftDynamicsAXAif60/ServiceRSH/xppservice.svc
And put in this code in C#
axWebService.CallContext callContext = new axWebService.CallContext(); axWebService.TripTrapServiceClient client = new axWebService.TripTrapServiceClient(); string tmp = client.mattias(callContext); Console.WriteLine(tmp); Console.ReadKey();
So why do i get the error?