Expand my Community achievements bar.

problem connection to web service

Avatar

Level 2

Hi ,

I need your help. I would like to check the list item from the web service to validate the licence field. However I got the message

getAllServiceNames is not function. I dont' know why??? I have spend a lot to time to fix but I it is not successful.  Please help.

SOAP.wireDump = false;
var cListURL = "http://......wsdl/";
var e;
try
{
console.println("Start list retrieval");
var service = SOAP.connect(cListURL);
if(typeof service != "object")
console.println("Couldn't get List object");
if(service.getAllServiceNames == "undefined")
console.println("Couldn't get getAllServiceNames Call");
// Make the query
var result = service.getAllServiceNames();
if(result == null)
console.println("List returned nothing");
var count = 0;
var limit = 10;

form1.class1.body.licenceInfo.wellLicence.rawValue = limit;

}
catch(e)
{
console.println("Problem with list Call: " + e);
}

Thanks in advance, Cindy

1 Reply

Avatar

Level 10

Hi Cindy,

The SOAP.connect() function should return a JavaScript object that is a proxy for the webservice and so should have a method called getAllServiceNames (if that is an operation defined by the webservice).

I assume if you paste the WDSL address into a browser you see the WSDL definition.

The error you are getting suggests you are getting as far as the line "var result = service.getAllServiceNames();".  Seems strange that you are getting past the line "if(service.getAllServiceNames == "undefined")".Maybe you could try a console.println(service.getAllServiceNames.toSource()) at this point and seeing what it actually is.

You could also try setting SOAP.wireDump to true which will add some debugging information

Are you seeing any of the 'Yellow Message Bar' messages in Reader (just under the toolbar).  If your form has been generated from a different domain than the website you can get some cross domain issues.  There is a log file under Acrobat's Preferences ... Security (Enhanced) ... "Cross domain log file" (you may have to restart Acrobat before the "View" button is enabled.

Regards

Bruce