Top Banner
Create SAP Web Service wi th SAP .Net Connector in 5 minutes Dennis Wang Microsoft / EAS /SAP
17

UI_CreateWebServices_5min(2)

Apr 09, 2018

Download

Documents

Shiva Kumar
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 1/17

Create SAP Web Service with SAP .Net

Connector in 5 minutes

Dennis Wang

Microsoft / EAS /SAP

Page 2: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 2/17

What is SAP .NET Connector  SAP product. Based on Microsoft .NET

Technology

Interact with SAP via RFC/SOAP Fully integrated with Visual Studio.NET

Managed Code

Page 3: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 3/17

Feature Highlight

Generates C# Proxy Classes for any .NET

application integrations

Supports RFC and SOAP Supports qRFC, tRFC

Supports asynchronous SOAP calls

RFC client or RFC server 

Page 4: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 4/17

Common Language

Runtime

.NET

Connector 

Runtime

Web

Services

VB C++ C# «

Visual Studio.NET

Microsoft .NET

Proxy

Class

Generator 

SAP System

BOR

DDIC

Interface

repository

RFC

SOAP

RFC Layer Application

Run

time

.NET Connector 

Component (generated)

Design

time

SOAP Layer 

Page 5: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 5/17

Feature of Web Service

It is ASP.Net Web Service

Hosted by IIS. Using HTTP protocol

Secure: SSL for connection. NTLM for 

authentication. Role base authorization.

Single sign via NTLM GSSAPI

Platform Neutral. Can be accessed via http

protocol. Strong versioning via XML Namespace

Page 6: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 6/17

Steps to Create Web Service for 

RFC_Customer_Get Create a C# project for ASP.Net Web Service

Generate SAP Proxy via SAP .Net Proxy

Generator for RFC_Customer_Get

Open Proxy1.cs and change the following line

public void Rfc_Customer_Get(«) to

public virtual void Rfc_Customer_Get («)

Page 7: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 7/17

Page 8: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 8/17

Client

DomainA\dennisw 

Run Window app and

Call Web Service

Web Service runs under 

DomainA\ProcAcct

credential. This account

then calls SAP RFC

1. SAP check

DomainA\ProcAcct in

USRSYSACL

2. SAP check

DomainA\dennisw in

vusrextid

3. SAP check dennisw in

USRACL

4. Run SAP process under 

dennisw account

How SAP Single Sign On work

under ASP.Net Web Service

Page 9: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 9/17

Page 10: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 10/17

Set up single sign on for web service -

Continue

GSS Library ± Requires on the server where Web Service is

located.

 ± Copy the GSSNTLM.DLL to c:\windows\system32 ± If the GSSNTLM.DLL was copied to a folder other 

then within the environment search path, you needto add the following line in system environmentSNC_LIB=´file path\GSSNTLM.dll´

Make sure to replace the gssapi32.dll with thisGSSNTLM.dll if the old gssapi32.dll exists. Theold gssapi32.dll does not work.

Page 11: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 11/17

Set up single sign on for web service -

Continue

Create Entry in Table SNCSYSACL via SNC0

This table contains a list of trusted domain accounts or SNC.

Start SAP and run SNC0

Make sure to enable the RFC/CPIC/Ext ID options

Page 12: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 12/17

Set up single sign on for web service -

Continue

Make sure all users who access SAPwill have their User Accounts inUSRACL or via SU01

Mapping external users into SAPusers

Run SM30 and table VUSREXTID

Value: Work Area=NT. Value: External ID =

MYDomain\dennisw

Page 13: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 13/17

Set up single sign on for web service -

Continue

Program The Connection String with thefollowing value:

 ± SNC_MODE=1;

 ± SNC_PARTNERNAME="p:" +System.Security.Principal.WindowsIdentity.GetCurrent().Name; µ Web Service Process

 Account 

 ± EXTIDDATA=User.Identity.Name; µCaller credential 

 ± EXTIDTYPE=³NT´;

Page 14: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 14/17

 Access SAP Web Service via Microsoft

InfoPath

ERPERP ± ± RDBMSRDBMS ± ± HRHR -- CRMCRM

Information WorkersInformation Workers Enterprise ApplicationsEnterprise Applications

XMLXML

WebWeb

ServicesServices

 You can use intelligent forms to interact with your existing applications You can use intelligent forms to interact with your existing applications

Page 15: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 15/17

How does InfoPath 2003 connect to SAP?

Utilize SAP RFC and BAPI.

Generate RFC/BAPI proxy by using SAP .Net Connector 

Create Web Service Wrapper around the proxy Hosting/Publish the web service via WSDL

InfoPath Consume the web service

Page 16: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 16/17

Demo

Page 17: UI_CreateWebServices_5min(2)

8/7/2019 UI_CreateWebServices_5min(2)

http://slidepdf.com/reader/full/uicreatewebservices5min2 17/17

Resource

SAP .Net Connector: https://websmp103.sap-ag.de/connectors InfoPath 2003 SDK

 ± Available on microsoft.com under downloads

InfoPath 2003, Technical Webcasts, Technical White Papers, Development

Guides

 ± MSDN ± http://msdn.microsoft.com/office/understanding/InfoPath 2003/

Visit http://microsoft-sap.com for information on:

 ± SAP at Microsoft

 ± SAP .Net Connector 

 ± Upcoming customer workshops