Generate a webservice in SAPCreate a pakage Z_WEB_TUTO in SE80.Create a function group Z_WEB_TUTO_FG:Create a funtion modu...
Check « Remote-Enabled Module »:Parameters have to be passed by value:
Now we can create a webservice from this function module...Call webservice wizard:Select Service Provider:
Enter the name of the service, choose Function Module Endpoint Type
Choose function module: if you check Mapping der Namen, name of the parameters will beconverted in uppercase without under...
Profile define security parameters: it can be redefined later in transaction SOAMANAGER.If you check « Deploy service », t...
new configuration interface for webservices.Select « Single Service Administration » in « Application and Scenario Communi...
You can now test your webservice:in my case I use a software called soapUI but you can testclicking on « Open Web Service ...
You obtain this:Double-click...and enter user & password for endpoint:Now we can test Request 1:Launch request with green ...
Consume a webservice in SAPWe will create a proxy class dedicated to consume the webservice that we have created.In SE80, ...
Enter the URL of the WSDL:Enter pakage and a prefix for objets which will be generated.
The lient proxy is created:Now you have to activate: activate anyway if you have this kind of messages.
Now we have to configure Consumer Proxy in SOAMANAGER:
In tab configuration, create a new logical port:You can enter use and password to avoid to get a connexion popup at servic...
Click on Save.We can now test the webservice call: execute with F8
Fill Logical port name:Request is displayed:If you want to edit request, click on XML-editor(CTRL+F2)
Execute...To use proxy class in a program:
Execute:
19255987 web-services-in-abap
Upcoming SlideShare
Loading in …5
×

19255987 web-services-in-abap

1,214 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,214
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
93
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

19255987 web-services-in-abap

  1. 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. 2. Check « Remote-Enabled Module »:Parameters have to be passed by value:
  3. 3. Now we can create a webservice from this function module...Call webservice wizard:Select Service Provider:
  4. 4. Enter the name of the service, choose Function Module Endpoint Type
  5. 5. Choose function module: if you check Mapping der Namen, name of the parameters will beconverted in uppercase without underscore
  6. 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. 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. 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. 9. You obtain this:Double-click...and enter user & password for endpoint:Now we can test Request 1:Launch request with green button:
  10. 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. 11. Enter the URL of the WSDL:Enter pakage and a prefix for objets which will be generated.
  12. 12. The lient proxy is created:Now you have to activate: activate anyway if you have this kind of messages.
  13. 13. Now we have to configure Consumer Proxy in SOAMANAGER:
  14. 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. 15. Click on Save.We can now test the webservice call: execute with F8
  16. 16. Fill Logical port name:Request is displayed:If you want to edit request, click on XML-editor(CTRL+F2)
  17. 17. Execute...To use proxy class in a program:
  18. 18. Execute:

×