You are on page 1of 14

Copyright of Shell International Petroleum

9/9/2014 1


WEB SERVICE
VASANTH

Copyright of Shell International Petroleum Ltd
WEB SERVICE
2
To a great extent, communication between B2B and e-Commerce applications is based on manually declared interfaces, message
formats, and arrangements between business partners. Using Web services, this process can be simplified. They enable you to
combine functions in a single process, even if they are implemented in widely differing software components. Web services are
standalone, executable entities that can be published, searched for, and called, across a network.

Web service enables to:

Publish RFC-enabled function modules, BAPIs, or XI message interfaces. It can be used across the entire Internet using standard
protocols and can easily be added to any development environment. ( See Web service Provider).

Web services can be consumed regardless of where they are stored or how they are implemented. Business processes can be
implemented across several systems, either within an enterprise or across several enterprises. ( See Web service consumer)


Web service Architecture
Copyright of Shell International Petroleum Ltd
WEB SERVICE
Lets see how to create Service provider and consumer Step by step!!!
Service provider creation
Assume already RFC enabled function module is available if not create a new function module Via SE37.
Go to transaction code SE80 with the function group name.






Right click on the function module name and select Create Enterprise Service.




3





Copyright of Shell International Petroleum Ltd
WEB SERVICE


4






In web service creation wizard provide the service name and description and then continue.








Check the Map name to map the Function module.











Copyright of Shell International Petroleum Ltd
WEB SERVICE

5





Continue with the configure Service step to generate SOAP.








Service is transportable, Package and transport number can be given in the next screen.









Copyright of Shell International Petroleum Ltd
WEB SERVICE

6





Choose finish to complete the Service creation Wizard.







Activate the web service to enable the service in SOAMANAGER.








Generated XML can be seen in the WSDL tab and Security settings can be made in Configuration tab.






Copyright of Shell International Petroleum Ltd
WEB SERVICE

7





Lets do the binding and UDDI registration for web service in SOAMANAGER !
Binding defines message format and protocol details for operations and messages defined by a particular port Type; a port Type is
defined as a set of abstract operations, where each operation refers to an input and output message. Several bindings can be grouped
into one service implementing alternative ways for accessing a Web Service. A service must have at least one binding.
The binding information is used to support the configuration of WS consumers in the form of a WSDL document. Each configured ABAP
WS provider configuration (a binding) can describe its settings via a WSDL document. A WSDL document describes a WS in an XML
document format. It gets mostly used to pass the binding's information to a WS consumer to support the setup of the consumer's
binding, which is referenced via a Logical Port.



Start SOAMANAGER
Use the transaction code SOAMANAGER to start the ABAP SOA Manager.

From the main screen, Go to Service Administration tab.










Choose Web service Configuration.

Select Service definition from the search by menu and specify the service definition.
Give the name of the service created in above step thro SE80 ( Example . ZMATERIAL )




















Copyright of Shell International Petroleum Ltd
WEB SERVICE

8






















Select GO button, Service definition matches the name is displayed in the search Results.





Select the row and press Apply selection
Existing services and bindings are displayed






Choose create for new bindings. A dialog box will be displayed where we need to specify the Binding name, Service name and
description.








Copyright of Shell International Petroleum Ltd
WEB SERVICE

9





Choose apply settings , Configuration view is displayed where the details for the new binding get specified. You may need to scroll
down in the browser window to see this view completely
Go to provider Security tab where we can do the security settings.
The provider security settings fall into two main categories:
Communication security, i.e. settings dealing with the security while the message is on the network, and
Authentication method to be used for identifying the user environment on the Web Service provider system.

Attached screen contains the minimum security settings required to call Web service.










Various options available ( HTTP or HTTPS / No authentication or User id etc.. ) in both settings. We can choose the relevant one
depends on the requirement.
Details for the each option can be obtained from the following link
http://help.sap.com/saphelp_nw04s/helpdata/en/b0/787748cf3a4200bb1ba32a62aa8519/frameset.htm







Copyright of Shell International Petroleum Ltd
WEB SERVICE

10





Save the binding
When the binding gets saved, it is displayed in the list of configurations belonging to the selected service definition. The new binding is
now accessible under its access URL by WS consumers.




To display the WSDL URL for binding select Show /Hide selected Bindings or service WSDL URL.






To consume the Web service above mentioned WSDL URL needs to be used.
Before consuming the web service , Validation on the URL can be done using the WSDL Analyzer in the Tools tab.



Copyright of Shell International Petroleum Ltd
WEB SERVICE

11





Specify the URL , User id and Password.























Copyright of Shell International Petroleum Ltd
WEB SERVICE - CONSUME

12





A web service can be consumed by a client application. Different types of client applications can consume a web service. In today?s software
environment, almost every application need a web service to enhance its functionality. The important advantage of a web service is that it returns its
results in xml format, which can be consumed by different types of clients like browser based clients, rich desktop clients, spreadsheets, wireless
devices, interactive voice response(IVR) systems and other business applications.
For a client to consume a Web service, the client must know;
Where the Web service is located
How to invoke the methods of a web service
Creating a soap message

A proxy class is a local representation (on the client computer) which perform the above tasks. So, Proxy classes serve as an intermediate step
between the web page running on the client and the actual Web service on the web server. The proxy class is created from the wsdl document by the
client application developer. In short, the Web service's WSDL document contains the information to create proxy class. The proxy class helps the
client application to use all the services provided by the web service.
The proxy class of an XML web service contains instructions for calling all the XML Web service methods. The proxy also contains code that allows
client application to interface with the SOAP runtime located on the web host. The physical representation of the proxy class is the .wsdl file.
Let see how to generate proxy class and consume the web service using SOAPUI .

Get the WSDL which is generated in the binding step of the service creation.































Copyright of Shell International Petroleum Ltd
WEB SERVICE - CONSUME

13





Create new SOAPUI Project

You might also like