Skip to Content
avatar image
Former Member

Call Webservice in interactive form

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Sep 28, 2009 at 02:24 PM

    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 );

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 29, 2009 at 11:25 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Oct 08, 2009 at 08:08 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2009 at 12:44 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • avatar image
    Former Member
    Nov 24, 2009 at 09:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 24, 2009 at 12:22 PM

    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|calling-webservice-from-adobe-interactive-form].

    Regards

    Pradeep Goli

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Amith Menezes

      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