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
BedrockMission!

Learn More

View all

Sign in to view all badges

web service returning dataset

Avatar

17-03-2009

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);

}

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

17-03-2009

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.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

17-03-2009

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.