Expand my Community achievements bar.

Web Service call

Avatar

Former Community Member

Hi there,

I am trying to call a web service programmatically from a form but keep getting this error: service has no properties.

Can someone perhaps assist me with what I could be doing wrong?

My code is as follows:

try{

var cURL = “http://webservices.daehosting.com/services/TemperatureConversions.wso?WSDL”;

SOAP.wireDump = false;

var service = SOAP.connect(cURL);

var Input = {nFahrenheit:33};

var result = service.FahrenheitToCelcius(Input);

xfa.host.messageBox(result);

} catch (e) {

xfa.host.messageBox(“The web service could not be invoked. This may either be because you are running in Reader instead of Acrobat,”

+ ” or you do not have a ReaderEnabled form, or the Web Service is unavailable.Underlying error: ” + e);

}

Thanks,


R

1 Reply

Avatar

Former Community Member

I just ran the script successfully AFTER fixing the cURL. Try removing the space between ? and WSDL

http://webservices.daehosting.com/services/TemperatureConversions.wso? WSDL

Steve