Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Problem consuming web service from AX2012

$
0
0

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?


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>