19255987 web-services-in-abap

1. Generate a webservice in SAPCreate a pakage Z_WEB_TUTO in SE80.Create a function group Z_WEB_TUTO_FG:Create a funtion module Z_WEB_TUTO_SUM:note that parameters have…
of 19
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
  • 1. Generate a webservice in SAPCreate a pakage Z_WEB_TUTO in SE80.Create a function group Z_WEB_TUTO_FG:Create a funtion module Z_WEB_TUTO_SUM:note that parameters have to be passed by value andfunction module has to be RFC callable.
  • 2. Check « Remote-Enabled Module »:Parameters have to be passed by value:
  • 3. Now we can create a webservice from this function module...Call webservice wizard:Select Service Provider:
  • 4. Enter the name of the service, choose Function Module Endpoint Type
  • 5. Choose function module: if you check Mapping der Namen, name of the parameters will beconverted in uppercase without underscore
  • 6. Profile define security parameters: it can be redefined later in transaction SOAMANAGER.If you check « Deploy service », the end point for this service will be autatically created inSOAMANAGER.Now the webservice is created.Launch transaction SOAMANAGER: this transaction launches a webdynpro application that is the
  • 7. new configuration interface for webservices.Select « Single Service Administration » in « Application and Scenario Communication »Select service Z_WEB_TUTO_SUM and clik on Apply Selection: in « Configuration », you can seethe end point that has been created.You can see more information or change it whenever you want.The WSDL of this service is available in « Overview », Diplay selected Bindings WSDL URL:
  • 8. You can now test your webservice:in my case I use a software called soapUI but you can testclicking on « Open Web Service navigator for selected binding »(using Minisap, the service fortesting is not available in SICF).With soapUI, you can test this way:Enter WSDL location:Enter user & password:
  • 9. You obtain this:Double-click...and enter user & password for endpoint:Now we can test Request 1:Launch request with green button:
  • 10. Consume a webservice in SAPWe will create a proxy class dedicated to consume the webservice that we have created.In SE80, create a proxy object:Selet Service Consumer:Select URL/HTTP destination (you can also import WSDL from local file, ESR are standardservices)
  • 11. Enter the URL of the WSDL:Enter pakage and a prefix for objets which will be generated.
  • 12. The lient proxy is created:Now you have to activate: activate anyway if you have this kind of messages.
  • 13. Now we have to configure Consumer Proxy in SOAMANAGER:
  • 14. In tab configuration, create a new logical port:You can enter use and password to avoid to get a connexion popup at service call.
  • 15. Click on Save.We can now test the webservice call: execute with F8
  • 16. Fill Logical port name:Request is displayed:If you want to edit request, click on XML-editor(CTRL+F2)
  • 17. Execute...To use proxy class in a program:
  • 18. Execute:
  • 1808-7660-1-PB.pdf

    Jul 23, 2017


    Jul 23, 2017
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks