View Full Version : how to activate Contract Invocation Log
I have created a runtime policy with action of Contract Invocation Log, and set to log request and response. The policy is activated. But nothing seem to be logged in the tables.
Do I need to create a contract to trigger it? or just activating the policy is enough? I am using the default hsql database as console db.
Any idea?
brapacki
10-30-2007, 11:49
My best guess is that you need to create a contract, as it is not a policy which is being invoked and sends perfmormance/usage metrics, but a contract. Also make sure that contract is certified.
My best guess is that you need to create a contract, as it is not a policy which is being invoked and sends perfmormance/usage metrics, but a contract. Also make sure that contract is certified.
I thought of creating a contract as well. But I would need a wsdl file to do so. Which wsdl file I should use for the contract?
Thanks.
brapacki
10-31-2007, 02:17
How could you create a valid policy without first creating a web service from wsdl? In runtime policy you need to have a step likw Advanced Routing or Load Balancing, and in these steps you define which web service(s) are the end points.
Yes, that is another reason I could not create a contract because I don't have a web service to define for Advanced Routing. Now I have a policy with only 1 action -- Contract Invocatin Log. Nothing else. What should I do to trigger it?
brapacki
11-13-2007, 01:57
When you create a runtime policy you basically need there somewhere either Advance Routing or Load Balancing step (these steps actually call web service(s)). Other steps are pretty much optional. So first upload some wsdls for web services, add Load Balancing step to Policy (as the last one probably), fill all policy's steps parameters and activate policy. Now you can create a contract for that policy (choose appropriate x-broker or other mediator, be sure that the name for target is the same as in reg-info file in x-broker directory). When you certify the contract, onlty then it will be deployed on xbroker for execution. Until that time policy and contract will be just CentraSite entities, not really being enforced.
HTH,
Bart
But the user guide does not mention where to get the wsdl for Contract Invocation Log. Therefore, I cannot do Advanced Routing.
brapacki
11-13-2007, 10:53
Hmmm all runtime policies are built on top of custom web services which are uploaded into CentraSite. So when you define runtime policy you must know which web services it will hit, the other actions in run time policy are optional and are there to provide better performance or security management. So you can't just build runtime policy to invoke a step "Contract Invocation Log", you build runtime policy to run a web service (created and uploaded by you) and inside that you put a step Contract Invocation Log to add some data to contract log when it is hit.
So you mean, instead of creating a policy for Contract Invocation Log, I should simply add this action to the policies that I want to log? That sounds reasonable. I will try that. The wording in the user guide is kind of misleading.
brapacki
11-13-2007, 11:54
Yes, I agree documentation is not yet ready. Lots of things users must learn themselves by trying.
Finally, I think we are in the right direction. I have added Contract Invocation Log to my existing policy action. When I submit a request to my contract, xbroker tries to connect to my smtp host. However, I do not have a SMTP host. Therefore, the xbroker console shows the error that it could not connect to SMTP host.
Actually, I don't need it to send any email. I have removed the email address in the parameter list of Contract Invocation Log. I don't understand why it tries to connect to SMTP. Is there any way to skip the SMTP connection so that I won't get the error.
brapacki
11-15-2007, 10:36
I haven't tried it yet. You might consider sending it to Software AG as an SR. Keep in mind this is still FCS version not GA.