web service creation

13
8/4/2019 Web Service Creation http://slidepdf.com/reader/full/web-service-creation 1/13 SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT CREATING A PURCHASE ORDER STORE RECORD WEB SERVICE Exercise / Solution I TAI SADAN ,SOLUTION OFFICE, SAP AMERICA

Upload: donrex

Post on 07-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 1/13

SAP BEST PRACTICES AND SERVI CE SOLUTI ON

MANAGEMENT

CREATING A PURCHASE ORDER STORE

RECORD WEB SERVICE

Exerc ise / Solut ion

ITAI SADAN , SOLUTION OFFICE, SAP AMERICA

Page 2: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 2/13

SAP BEST PRACTICES AND SERVICE SOLUT ION

MANAGEMENT

1

Exposing an RFC as a web ser v ice

In this exercise you will expose an existing RFC as a web service using the Web Service Creation Wizard.

Procedure

1. In order to logon to mySAP ERP you will need to create an entry in the SAP Logon, if one has not been created for

you already. Please open your SAP Logon and check if you have an entry called ESA Discovery System. If such

entry exists you can skip steps a and b.

a. Please create a new system with the following data (replace <hostname> with the hostname the instructor

provides you with):

b. Leave all other values to default and click next and finish until you have created the system

Page 3: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 3/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 2

c. Login using the system you have created (ESA Discovery System).

d. Enter the following data:

Client: 200

User: ADMIN

Password: ADMINLanguage: EN

2. Expose the RFC xxx as a web service

a. Enter transaction code SE37

b. From the drop down list select the RFC ZSPECIALPRODUCT_APPROVAL_REC and click on Display.

c. The RFC source code should be displayed on the screen.

d. Click on the Attributes Tab and verify that the Remote-Enabled Module radio button is selected. This is

required in order to expose the RFC as a service.

Page 4: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 4/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 3

e. In order to start the Web Service Creation Wizard, please click on the top navigation bar on Utilities(M)>>More

Utilities>>Create Web Service>>From the Function Module.

f. The wizard will open, click Continue.

g. Enter the following name for your web service

Service Definition: ZWS_SPECIALPRODUCT_APPR_REC_<your two digit student number>

EndPoint Type: Function Module

Page 5: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 5/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 4

h. Leave the default endpoint name on this screen and click Continue.

i. Leave profile as Basic Authentication: SOAP Profile and checkbox the Release Service for Runtime.

Click on continue.

 j. Click on Complete.

Page 6: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 6/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 5

k. The following pop-up will be displayed. Click on Local Object.

l. In a few mouse clicks you have successfully created and released your web service.

3. Testing Your Service

a. Enter transaction code wsadmin

b. Find your service under SOAP Application for RFC-Compliant FMs.

c. We will need to change the security settings. Double click on the WS as described below:

Page 7: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 7/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 6

d. Double click on the URL field, as described below:

e. Double click on the web service name

Page 8: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 8/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 7

f. Select Logon Data tab, click on icon for editing and add the following values:

Client 200

User: ADMIN

Password: ADMIN

Language: English

g. Save and click back (F3) until you return to the wsadmin window.

Page 9: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 9/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 8

h. Make sure the web service is highlighted and click on the Web Service Home Page icon.

In the pop-up that appears leave selection on Document Style and click OK.

i. The Web Service Navigator should have successfully opened.

Page 10: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 10/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 9

4. Test Your Service

a. Click on the WSDL file URL in order to view the web service you have created.

b. Close the window of the wsdl file.

c. Go back to the Web Service Navigator and Copy and Past the WSDL url into notepad, you will need it in the

next exercise.

d. In order to test the web service, please click on Test on the top navigation.

Page 11: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 11/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 10

e. Select the only operation for this web service

f. The input parameters of the web service are displayed.

g. Please enter any values in the fields below and click Send.

Page 12: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 12/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 11

h. If the web service executed successfully you should get “X” as a return value.

Summary:

You have successfully exposed an RFC as a web service and tested it.

Page 13: Web Service Creation

8/4/2019 Web Service Creation

http://slidepdf.com/reader/full/web-service-creation 13/13

SAP BEST PRACTICES AND SERVICE SOLUTION MANAGEMENT 12

Copyright 2006 SAP AG. Al l Right s Reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the

express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components

of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,

OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and

Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other

countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or

registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web

Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented

and implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services

mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in

Germany and in several other countries all over the world. All other product and service names mentioned

are the trademarks of their respective companies. Data contained in this document serves informational

purposes only. National product specifications

may vary.

The information in this document is proprietary to SAP. No part of this document may be reproduced,

copied, or transmitted in any form or for any purpose without the express prior written permission of SAP

AG.

This document is a preliminary version and not subject to your license agreement or any other agreement

with SAP. This document contains only intended strategies, developments, and functionalities of the SAP®

product and is not intended to be binding upon SAP to any particular course of business, product strategy,

and/or development. Please note that this document is subject to change and may be changed by SAP at any

time without notice.

SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy

or completeness of the information, text, graphics, links, or other items contained within this material. This

document is provided without a warranty of any kind, either express or implied, including but not limited to

the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or

consequential damages that may result from the use

of these materials. This limitation shall not apply in cases of intent or gross negligence.

The statutory liability for personal injury and defective products is not affected. SAP has no control over the

information that you may access through the use

of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide

any warranty whatsoever relating to third-party Web pages..

SAP assumes no responsibility for errors or omissions in these materials