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

Consume SAP Web service with parameters in Forms using JS

Avatar

Not applicable

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

0 Replies

Avatar

Not applicable

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..