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

web service returning dataset

Not applicable
I have an asp.net web service I used for all my asp.net forms. I would like to use the same service for pdf forms. I have a test method which takes no parameters and sends an email. This works fine. Can I use a method which returns a dataset and if yes how? I tried the following code but get an error, oItems has no properties. How do I get values out of a dataset?



SOAP.wireDump = false;

var oListURL = "https://ao-wapps/webservices.asmx?wsdl";

var e;

try

{

var service = SOAP.connect(oListURL);

var oItems = service.GetInv("smith");

var nCount = 0;

var nLimit = 10;

for(var nItemCount in oItems)

{

for(var nItemNode in oItems[nItemCount])

{

if (nItemNode == "inet")

DropDownList2.addItem(oItems[nItemCount][nItemNode]);

}

if (++nCount >= nLimit)

break;

}

}

catch(e)

{

xfa.host.messageBox("Problem with list Call: " + e);

}
0 Replies
pguerett
Level 10
Level 10
PDF Forms only support simple types through a web service (i.e. strings, int, float, xml wrapped in CData as examples). There is no container to hold the recordset hence it does not know what to do with the return.
Not applicable
ok, so how would I return data from a table with a web service?
pguerett
Level 10
Level 10
If the DB can return XML then you can do that (wrap it in a CData section or the SOAP envelope will get confused). If not then returning a record at a time and assigning each column to a variable is also an option.