Expand my Community achievements bar.

Consume SAP Web service with parameters in Forms using JS

Avatar

Former Community Member

Hi All

I am trying to execute a call to a webservice using javascript from my adobe form .

I can get this working by creating a DataConnection and mapping input fields on the form to the Request structure (XFA method) .

But when I use JS, i cannot get it working while using paramters.

Here is my sample code.

var cUrl = http://XXXXXXX:XXXX.........;
var service = SOAP.connect(cUrl);
var inputVal = {IvMatnr:MATNR.rawValue, Ivlgort:LGORT.rawValue, IvWerks:WERKS.rawValue};
var result = service.ZppTestGetBatchNumbers(inputVal);
//xfa.host.messageBox("Success");

txtResult.rawValue = result;
xfa.connectionSet.<DataConnectionName>.execute(0);

Any help would be greatly appreciated

Regards,

ArMen

1 Reply

Avatar

Former Community Member

Hi,

Instead of using parameters, I am now using hidden text fields on the foem which I have bound to the web service call.

This is a work around that is working fine for me..

Cheers..