cancel
Showing results for 
Search instead for 
Did you mean: 

Call Webservice in interactive form

Former Member
0 Kudos

Hi,

I have a webservice created from BAPI. I have created interactive form by creating DataConnection and binded the fields in the form.

I'm trying to call webservice on exit of the one of the fields and pass that entered value to webservice and that webservice will return one value and I want that value to be captured and put in to other field.

The following is the script I have written on exit event of the field but it is not calling webservice:

var cURL = "http://fqdn:8000/sap/bc/srt/wsdl/bndg_4ABC986C5E1000BAE1008000AC11420B/wsdl11/allinone/ws_policy/document?sap-client=100" ;

var service = SOAP.connect(cURL);

xfa.connectionSet.DataConnection.execute(0);

Am I missing something?

Appreciate your help.

Regards,

Ravi

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Ravi,

Try to get the WebService URL from Transaction "SOAMANAGER". When you open the respective WebService through transaction there you will find one link "Open WSDL document for Selected binding", navigate to this link and simply copy the URL link or save the XML code to a file with extension "filename.wsdl" and in creation of Data Connection use the file or the link and create the data connection in Adobe Form.

If the Data Connection stills says "Cannot load" the try adding extension at the end of the URL link of WebService "&sap-user=sapsystemuserid&sap-password=sapsystempassword". Try check this if it works then maintain anonymous user in SICF for the webservice for node SOAP Runtime. And for this anonymous user give roles and profiles of SAP_ALL or follow this thread for roles and profiles for WebService [Calling webservice from Adobe interactive form|].

Regards

Pradeep Goli

former_member198445
Participant
0 Kudos

Hi Pradeep,

I had faced this "Cannot load' problem. Then usaed &sap-name= "" sap-password="" like you sugested and it worked fine.

But all this was in the sandbox system. My question is, if I do somehting like this in the dev system and then transport the form to Quality and then production, will I have to do the same procedure in these systems?

I would have to load this URL in each system right? and while doing so, would I also have to create an anonymous user in each syste to load this WSDL?

Please answer my query..

Regards, Amith

0 Kudos

hi,

any solution for this?

I also facing this "Cannot load' problem.

wondering this &sap-name= "" sap-password="" cannot be loaded while transported to production or my id no longer active.


appreciate your reply.


Best Regards,

Kathy

Former Member
0 Kudos

Hi Ravi,

We also faced the similar problem while developing the interactive forms using webdynpro ABAP.

The probelm is solved when we developed it in SAP Netweaver 04s.

Select the Form Interface type ZCI layout.

And also in the Form layout, select the option Utilities ->insert the WebDynpro script

If you are using ABAP Workbench, then use Adobe Acrobat 8 Professional

Former Member
0 Kudos

Hi Ravi,

The issue you faced i am also facing a same issue. Did you get the solution?

I am not able to pass the WSDL URL dynamically when i transport the adobe application to other systems and currently i am doing that manually after going into data connection.

Please let me know if there is a better way of doing this and how you corrected the issue you are currently facing.

My solution is working in development envirnment however doesnt works when i pass it to different system.

Please help.

Regards,

Amit Gupta

Former Member
0 Kudos

Amit, did you ever figure out how to transport the adobe form with the WSDL URL to different clients in SAP?

chintan_virani
Active Contributor
0 Kudos

As per my knowledge there is no automatic transport, you will have to do the steps manually and change the WSDL URL in your applications.

Chintan

Former Member
0 Kudos

im also getting that error message. Is your form working already?

Former Member
0 Kudos

Already resolved. In the Document Services License Service configuration for ADS, the checkbox (THIS SERVER IS LICENSED FOR THE USE OF SAP INTERACTIVE FROMS BYADOBE), after that Im no longer receiving that error when using webservices.

NoJo
Active Participant
0 Kudos

When you created a new dataconnection, how did you import the WSDL to the form?

try to export the wsdl from soamanager and store it locally. then add a new service with reference to the locally stored WSDL. perhaps it helps...

NoJo
Active Participant
0 Kudos

did you test your webservice outside the form?? did you configure your service correctly using SICF and SOAMANAGER??

try to add the button that has been added automatically in your data connection and then call the service in that way..

Former Member
0 Kudos

Hi,

I have tested the webservice externally and it is giving proper response. But if I use the web service in the form it is not calling the webservice. Even I tried with the button which came automatically from my data connection but it is not tiggering the webservice.

But there are few observations which might causing the problem:

When I open the form using life cycle desinger outside SAP Environment, it is displaying error while opening like:

Cannot load

"http://XXXX:8000/sap/bc/srt/wsdl/bndg_4ABC986C5E1000BAE1008000AC11420B/wsdl11/allinone/ws_policy/document?sap-client=100"

check the path is correct and the file is a valid WSDL file" .

But If I go to that URL directly it is opening properly after giving Username and password.

If I open the form in SFP and try to activate I'm getting the same above error..

Do I need to do any configuration?

What configuration need to be done in sicf for my webservice?

Any other pointers will be appreciated

Regards,

Ravi

Edited by: Ravi Devarasetty on Oct 7, 2009 11:47 AM

darren_bambrick2
Active Participant
0 Kudos

Hi Ravi

try xfa.connectionSet.DataConnection.execute(1);

also see what the contents of the field is when you exit.

xfa.host.messagebox( this.rawValue );