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

DataConnection.execute(0) does not return any value

dylan_vr
Level 2
Level 2
Hi



I have a WSDL data connection when I try and programmatically execute the web service the method says it will return a boolean but nothing gets returned after the web service fails execution because the host isn't avaliable. Why doesn't the boolean get returned. Here is the code snippet i'm using.



var check = false;

check = xfa.connectionSet.DataConnection.execute(false);

var xml = txtXml.rawValue;



if (check)

{

xfa.datasets.data.loadXML(xml,false,true);

txtId.rawValue = appRef;

app.alert("Contract received and uploaded! ");

//this.access = "readOnly";

//xfa.layout.relayoutPageArea(0);

}

else

{

app.alert("Application failed to execute web service call.");

}



Please help!



Dylan
8 Replies
Not applicable
Try wrapping the statement in a try/catch:



try {

check = xfa.connectionSet.DataConnection.execute(false);

} catch (error) {

app.alert("error caught");

}



Ernest

Adobe Systems
dylan_vr
Level 2
Level 2
Ernest I cannot thank you enough. It works.



Regards,



Dylan
Not applicable
Hi,



Is it possible to access database from a stand-alone PDF template.?



Please suggest me in this regard.
dylan_vr
Level 2
Level 2
Hi Punugubati



It is posible, you would just need to reader extend the pdf(NB) and then create a data connection to the database.
Not applicable
Dear Dylan,



Tnx for the solution.



But I confused with pdf(NB)..?



what Pdf(NB) stands for..?
Not applicable
Dear Mr. Dylan,



What I thought to develop is to write a JDBC connection in the Stan-alone PDF template and access database.



example: PDF is designed in such a way that it should have "USERNAME" , "PASSWORD" , "LOGIN BUTTON" , so that PDF stand-alone template on every desktop should access the database on entering the correct credentials.



is it possible..?



if possible , please provite the solution..?