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

getAllServiceNames Web service problems

Avatar

Level 2
var


oListURL = "http://localhost:3612/WebSite18/Service.asmx?WSDL";

var

e;

try

{

xfa.host.messageBox("starting List Retrieval.");

var

service = SOAP.connect(oListURL);

if

(typeof service != "object")
{

xfa.host.messageBox("Couldn't get List object.");

}


if

(service.getAllServiceNames == "undefined") {
xfa.host.messageBox("Couldn't get getAllServiceNames Call.");

}


var

oItems = service.getAllServiceNames();

if

(oItems == null) {xfa.host.messageBox("List empty.");
}

var

ncount = 0;

var

nLimit = 10;


for

(var nItemCount in oItems)
{



for

(var nItemNode in oItems[nItemCount]){

if

(nItemNode == "name")
DropDownList1.addItem(oItems[nItemCount][nItemNode]);

}


if

(++nCount >= nLimit)

break

;}
}

catch

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

+ e);}

I keep getting an error of

getAllServiceNames is not a function here is my code is straight out of the book. im basically trying to do a webservice call to and get the info via a webservice. any help would be appreciated.

what im i doing wrong?

1 Reply

Avatar

Level 10

I am not sure that this will help, anyways just try to add a line of code at the top of your script and try again.

SOAP.wireDump = false;

NITH

DISCLAIMER:

========================================================================

"This communication is intended only for the named recipient and others authorized to receive it.

It contains confidential or legally privileged information. If you are not the intended recipient, please notify us immediately, and note that any disclosure, copying, distribution or action you may take in reliance on this communication is strictly prohibited and may be unlawful. Unless indicated otherwise, this communication is not intended, nor should it be taken to create any legal and/or contractual relation or otherwise. Ministry of Finance (MOF) is neither liable for the proper and complete transmission of the communication, nor for any delay in its receipt.

Whilst MOF undertakes all reasonable efforts to screen outgoing e-mails for viruses, it cannot be held liable for any viruses transmitted by this e-mail."