Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to check error type in accessing web service?

Avatar

Level 3

Dear all,

I have created a form using WSDL connection to access web service in SOAP protocol.

But I have difficulties in error handling when acccessing web service.

I try to put a try catch block for the following statement :
ie. xfa.connectionSet.WebServiceDC.execute(false);
in case for any error, I can only catch message saying GeneralFault only.

Is there any extra object in the script that I can catch to handle for different error type?
e.g checking SOAP.? and where should I put the codes in?

Actualy I want to detect if network connection is not ok or if it fails to find ecert which is required under https connection


Rgds.

0 Replies

Avatar

Level 3

Have you tried the try catch block ?

See the error codes it responds with.

Then look through the properties of the Exception

try
{
    doInit();
} catch(err)
{
    var vDebug = "";
    for (var prop in err)
    { 
       vDebug += "property: "+ prop+ " value: ["+ err[prop]+ "]\n";
    }
    vDebug += "toString(): " + " value: [" + err.toString() + "]";
    status.rawValue = vDebug;
}

function doInit()
{
    doWebServiceCallThatFails();
}

Have fun with these articles

http://blogs.adobe.com/formfeed/2009/06/collected_form_development_and.html

http://blogs.adobe.com/formfeed/2009/03/handling_javascript_exceptions.html