1 / 17

Create SAP Web Service with SAP .Net Connector in 5 minutes

Create SAP Web Service with SAP .Net Connector in 5 minutes. Dennis Wang Microsoft / EAS /SAP. 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. Feature Highlight.

palani
Télécharger la présentation

Create SAP Web Service with SAP .Net Connector in 5 minutes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Create SAP Web Service with SAP .Net Connector in 5 minutes Dennis Wang Microsoft / EAS /SAP

  2. 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

  3. 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

  4. VisualStudio.NET SAP System Microsoft .NET BOR DDIC Interface repository Proxy Class Generator VB C++ C# … Design time CommonLanguage Runtime Web Services .NET Connector Runtime Application RFC RFC Layer SOAP .NET Connector Component (generated) SOAP Layer Run time

  5. 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

  6. 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 (…)

  7. Steps to Create Web Service for RFC_Customer_Get (Continue) • Open Service1.asmx and do the following modification • public class Service1 : SAPProxy1 • public override void Rfc_Customer_Get (…) • Add these code in this mothed this.Connection = SAP.Connector.SAPConnectionPool.GetConnection (MyConnectionString); base.Rfc_Customer_Get(Kunnr,Name1, ref Customer_T); • Compile the code and you have the web service for this RFC.

  8. How SAP Single Sign On work under ASP.Net Web Service Web Service runs under DomainA\ProcAcct credential. This account then calls SAP RFC Client DomainA\dennisw Run Window app and Call Web Service • SAP check DomainA\ProcAcct in USRSYSACL • SAP check DomainA\dennisw in vusrextid • SAP check dennisw in USRACL • Run SAP process under dennisw account

  9. Set up single sign on for web service • IIS Configuration • Disable anonymous access • Set up Windows Integrated Authentication • Web Service Configuration • Generate encrypted user name and password via aspnet_setreg.exe program. This value will then be set up in registry. Here we assume the user name is SAPCMDEV • Add the following line in Web.Config • <identity impersonate=”true” sername=”registry:HKLM\Software\SapWebService\Identity\ASPNET_SETREG,sername” • password=”registry:HKLM\Software\SapWebService\Identity\ASPNET_SETREG,password” />

  10. 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 need to add the following line in system environment SNC_LIB=”file path\GSSNTLM.dll” • Make sure to replace the gssapi32.dll with this GSSNTLM.dll if the old gssapi32.dll exists. The old gssapi32.dll does not work.

  11. 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

  12. Set up single sign on for web service - Continue • Make sure all users who access SAP will have their User Accounts in USRACL or via SU01 • Mapping external users into SAP users • Run SM30 and table VUSREXTID • Value: Work Area=NT. • Value: External ID = MYDomain\dennisw

  13. Set up single sign on for web service - Continue • Program The Connection String with the following 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”;

  14. XMLWebServices Access SAP Web Service via Microsoft InfoPath You can use intelligent forms to interact with your existing applications Information Workers Enterprise Applications ERP – RDBMS – HR - CRM

  15. 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

  16. Demo

  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

More Related