Hello
I get an error 401 - not authenticated when calling a web service from within Ax 2012. I not allowed to call the web service as "Anonynous" as I am doing not.
How can I pass credentials to the 'client'?
Best regards
Lars
CodeAccessPermission permission; System.Exception ex; ; permission =
new
InteropPermission(InteropKind::ClrInterop);
permission.assert();
// Always try and catch errors as CLR exceptions
try
{
// Retrieve the X++ type for the service client object.
clientType = CLRInterop::getType(
"CmsService.GN.Services.CmsServiceSoapClient"
);
// Use the AifUtil class to create an instance of the service client object.
_client = AifUtil::CreateServiceClient(clientType); request =
new
CmsService.GN.Services.GetThirdPartyProductsRequest();
*This post is locked for comments