Hi all,
I have created a form using LC Designer ES2 which will call a web service from a 3rd party and display the results returned from it.
Actually the form is created with the guidelines from following references :
http://forms.stefcameron.com/2007/05/21/connecting-to-a-web-service/
http://forms.stefcameron.com/2009/03/23/pre-process-web-service-responses/
My form will access a 3rd party's web service via WSDL connection and I try to catch any error when making the call :
xfa.connectionSet.{WebServiceDataConnectionName}.execute();
Actually if I successfully call the web sercice (it returns a TRUE state), then I can get the response from it.
In case of failure, I can also catch error from above call (usually due to network problem). However, if the problem is on 3rd party side, say problems on their application server, I have encountered following different cases:
(1) no error could be catched but above execution call returns a FALSE state
(2) no error could be catched but above execution call still returns a TRUE state, but with undefined response body of following :
xfa.datasets.connectionData.{WebServiceDataConnectionName}.Body
I would like to ask if there is any further code that I could add to check for following execution run:
xfa.connectionSet.{WebServiceDataConnectionName}.execute();
Either the failure may be due to connection timeout (then what is the behavior of above call), or the 3rd party temporarily redirect the web service request to a html page in case of failure (seems that nothing is returned on the form). Is there any coding that I could use to check further information on calling a web service?
At the moment, the only thing that I can do is check for FALSE return state or undefined response to determine that the web service is unavailable such that I can display an alert message instead of showing no response.
In fact I found very little information on the web about web service API call from a form created by LC Designer, I hope somebody could help me out there.