Axapta 2009 WCF service
I am trying to add a service reference to开发者_如何学运维 axapta 2009. All is working well, its a simple web method(external webservice) that gets executed on the server tier(necessary, otherwise clr interop error)
But I've ran into the following problems :
- is it possible to close the proxy one way or another? Because this option is not available in the generated service object in AX (only the webmethods and a tostring).
- at a certain moment, i ran into a service with faulted state. Normally, you create the service object again, but this didnt solve anything, until i restarted the AOS. Is this normal behaviour? Is the service object cached or something like that on server side?
Thx in advance.
This is due to the fact that the WCF service is throwing Faults, probably unhandled faults.
Do you have access to the WCF Service? If so then have a look at this link: How do I prevent a WCF service from enter a faulted state?
Try to catch any exceptions within the WCF Service and log them.
Unfortunately Ax cannot catch FaultExceptions thrown by WCF so you will be limited to modify the WCF Service with an object encapsulating the return message, along with a flag if the method processed successfully or if an exception was thrown.
Yes it is normal behavior for a faulted WCF service to stay in the Faulted state. You may have to restart the IIS service or just recycle the AppPooll the WCF Service is running under.
精彩评论