RSS

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

19 Sep

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');
}

Advertisements
 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: