RSS

Monthly Archives: September 2012

AIF: web service operations was not visible in Basic->Setup->AIF->Service.

At a customer’s site, I was creating  AIF Web services. i as trying to regenerating the web service.but i am not able to see the operation of that webservice in Basic->Setup->AIF->Service.

 

After a certain amount of regenerating and deleting the web service project and nearly giving up,  after lots of efforts i have  discovered that the AIF Wizard have imported the AIF operation’s with wrong id’s in AifAction table.

 

It probably means you have regenerated you classes using the AIF document wizard, or that you have imported the AIF classes with wrong id’s.

 

You can use this job to fix the class id’s in the AIFAction table:

static void FixAIFActions(Args _args)
{
AIFAction aIFAction;
AIFService aifService;
ClassId classId;


// inner method:
// spit string at delimeter, keep left substring
str lSplit( str _s, str _delimeter )
{
str s = "";
int pos;
int len = strlen( _s );

pos = strfind( _s, _delimeter, 0, len );
s = strdel( _s,pos,len-pos+1);

return s;
}
;
//Select Web service name
select aifService where aifService.Name == "BiliingDeterminantsService";
// fix all actions
while select aIFAction
{
// check if classid and classname matc.
if(lSplit(aIFAction.ActionId, '.') == aifService.Name)
{
// update classid
ttsbegin;
aIFAction.selectForUpdate(true);
aIFAction.ClassId = classId;
aIFAction.update();

info(strfmt('Action %1 updated', aIFAction.ActionId));
ttscommit;
}
}

info('done');
}

 

Tags: ,

AIF: HTTP Error 404.3 – Not Found

I have deployed the web service on IIS, I got an error when I tried to browse my web service http://mdm-stg-01.rajdiscoms.com/MicrosoftDynamicsAXAif50/RdmCrmQuery.svc.
The error was:

HTTP Error 404.3 – Not Found

When I tried to add a web reference the svc in visual studio .NET, I got a similar error:

HTTP Error 404 – Not Found

I solved it by using the method described on the AIF blog:
http://blogs.msdn.com/aif/archive/2008/12/12/http-error-404-3-is-received-when-calling-a-web-service.aspx

Basically, execute the following command on your web server:



ServiceModelReg.exe -i -x

 

Related Links

[1] http://msdn.microsoft.com/en-us/library/ms732012.aspx

 

Tags: ,