Tuesday, May 29, 2012

Architecture for BizTalk Adapter 3.0 for mySAP Business Suite



#1)Understanding BizTalk Adapter 3.0 for mySAP Business Suite


The BizTalk Adapter Pack enables service-oriented programmatic access in order to interact with an external system. The adapters provide the following advantages to clients:
  • Consistent design-time experience. The adapters provide a common and user-friendly design time experience for browsing, searching, and retrieving metadata of LOB artifacts.
  • Varied programming options. The adapters provide a choice of programming model including Windows Communication Foundation (WCF) channel model, WCF service model, ADO.NET, web services, or BizTalk supported models.
  • Uniform experience across LOBs. The adapters standardize on using the WCF and Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK and hence provide a uniform experience of gaining access to any LOB system.
As mentioned, the adapters are built on top of the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK. The WCF LOB Adapter SDK provides a common basis for building integration adapters that a variety of client applications such as BizTalk Server and Microsoft Office can consume. The WCF LOB Adapter SDK aligns the adapter strategy with the Microsoft Services strategy by exposing integration adapters as Windows Communication Foundation (WCF) channels. For more information about the WCF LOB Adapter SDK, see the WCF LOB Adapter SDK documentation. The documentation is installed along with the WCF LOB Adapter SDK, typically under :\Program Files\WCF LOB Adapter SDK\Documents.
To perform operations on an SAP system, adapter clients must have access to the relevant Remote Function Calls (RFCs), Business Application Programming Interfaces (BAPIs), and IDOCs (or intermediate documents). An SAP R/3 system exposes RFCs, BAPIs, and IDOCs for business integration. RFCs are remote function modules that implement specific business logic. This logic can be invoked from an external application such as BizTalk Server or a .NET application. BAPIs are method interfaces to SAP business objects, which are in turn exposed through standard RFC interfaces. IDOCs are a mechanism to abstract the electronic data interchange (EDI) communication layer for communication between SAP and non-SAP systems. With Microsoft BizTalk Adapter 3.0 for mySAP Business Suite, you can access the RFCs, BAPIs, and IDOCs exposed by an SAP system.
The SAP adapter also includes .NET Framework Data Provider for mySAP Business Suite, which provides an ADO interface to the SAP system.
This section lists the features for the SAP adapter and the .NET Framework Data Provider for mySAP Business Suite.

#2) Overview of BizTalk Adapter 3.0 for mySAP Business Suite


The Microsoft BizTalk Adapter 3.0 for mySAP Business Suite exposes the SAP system as a WCF service. Adapter clients can perform operations on the SAP system by exchanging SOAP messages with the adapter. The adapter consumes the WCF message and makes appropriate calls to the SAP system to perform the operation. The adapter returns the response from the SAP system back to the client in the form of SOAP messages.
The SAP adapter surfaces metadata of SAP artifacts (RFC, BAPI, IDOC) that describes the structure of a SOAP message in the form of WSDL. The SAP adapter uses the Add Adapter Service Reference Visual Studio Plug-in and Consume Adapter Service BizTalk Project Add-in to enable adapter clients to retrieve metadata for operations and generates programming artifacts that can be used in your programming solution.
The SAP adapter uses the Unicode RFC library, librfc32u.dll, to communicate with the SAP system, in addition to using other supporting DLLs. For a complete list of SAP DLLs that the adapter requires, see the BizTalk Adapter Pack installation guide. The installation guide is typically installed at \Program Files\BizTalk Adapter Pack\Documents. You can use the SAP adapter to communicate with the SAP system in the following ways:


#3) Architecture for BizTalk Adapter 3.0 for mySAP Business Suite


The Microsoft BizTalk Adapter 3.0 for mySAP Business Suite implements a Windows Communication Foundation (WCF) custom binding, which contains a single custom transport binding element that enables communication with an SAP system. The SAP adapter is wrapped by the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK runtime and is exposed to applications through the WCF channel architecture. The SAP adapter communicates with the SAP system through either the 64-bit or 32-bit version of the SAP Unicode RFC SDK (librfc32u.dll). The following figure shows the end-to-end architecture for solutions that are developed by using the SAP adapter.


SAP End-to-End Architecture
The SAP adapter exposes the SAP system as a WCF service to client applications. Client applications exchange SOAP messages with the SAP adapter through WCF channels to perform operations and to access data on the SAP system. The preceding figure shows four ways in which the SAP adapter can be consumed.
  • Through a WCF channel application that performs operations on the SAP system by using the WCF channel model to exchange SOAP messages directly with the SAP adapter. For more information about developing solutions for the SAP adapter by using WCF channel model programming, see Developing Applications by Using the WCF Channel Model.
  • Through a WCF service model application that calls methods on a WCF client to perform operations on the SAP system. A WCF client models the operations exposed by the SAP adapter as .NET methods. You can use the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK or the svcutil.exe tool to create a WCF client class from metadata exposed by the SAP adapter. For more information about WCF service model programming and the SAP adapter, see Developing Applications by Using the WCF Service Model.
  • Through a BizTalk port that is configured to use the BizTalk WCF-Custom adapter with the SAP Binding configured as the binding for the WCF-Custom transport type in a BizTalk Server 2006 R2 application. The BizTalk WCF-Custom adapter enables communication between a BizTalk Server application and a WCF service. The BizTalk WCF-Custom adapter supports custom WCF bindings through its WCF-Custom transport type, which enables you to configure any WCF binding exposed to the configuration system as the binding used by the BizTalk WCF-Custom adapter. For more information about how to use the SAP adapter in BizTalk Server solutions, see Developing BizTalk Applications. BizTalk transactions are supported by the BizTalk Layered Channel binding element which can be loaded by setting a binding property on the SAP Binding.
  • Through an IIS-hosted Web service. In this scenario, the SAP adapter is exposed through a WCF Service proxy, which is hosted in IIS by using one of the standard WCF HTTP bindings.
  • Through the .NET Framework Data Provider for mySAP Business Suite. The Data Provider for SAP runs on top of the SAP adapter and provides an ADO.NET interface to an SAP system.
The SAP adapter and the SAP RFC library are always hosted in-process with the application or service that consumes the adapter.
WCF presents a programming model based on the exchange of SOAP messages over channels between clients and services. These messages are sent between endpoints exposed by a communicating client and service.
An endpoint consists of an endpoint address which specifies the location at which messages are received, a binding which specifies the communication protocols used to exchange messages, and a contract which specifies the operations and data types exposed by the endpoint. A binding consists of one or more binding elements that stack on top of each other to define how messages are exchanged with the endpoint.
At a minimum, a binding must specify the transport and encoding used to exchange messages with the endpoint. Message exchange between endpoints occurs over a channel stack that is composed of one or more channels. Each channel is a concrete implementation of one of the binding elements in the binding configured for the endpoint.
For more information about WCF and the WCF programming model, see "Windows Communication Foundation" at http://go.microsoft.com/fwlink/?LinkId=89231.
The Microsoft BizTalk Adapter 3.0 for mySAP Business Suite exposes a WCF custom binding, the SAP Binding (Microsoft.Adapters.SAP.SAPBinding). By default, this binding contains a single custom transport binding element, the SAP Adapter Binding Element (Microsoft.Adapters.SAP.SAPAdapter), which enables operations on an SAP system. When using the SAP adapter with BizTalk Server, you can set the EnableBizTalkCompatibilityMode binding property to load a custom binding element, the BizTalk Layered Channel Binding Element, on top of the SAP Adapter Binding Element. The BizTalk Layered Channel Binding Element is implemented internally by the SAP adapter and is not exposed outside the SAP Binding.
Microsoft.Adapters.SAP.SAPBinding (the SAP Binding) and Microsoft.Adapters.SAP.SAPAdapter (the SAP Adapter Binding Element) are public classes and are also exposed to the configuration system. Because the SAP Adapter Binding Element is exposed publicly, you can build your own custom WCF bindings capable of extending the functionality of the SAP adapter. For example, you could implement a custom binding to support Enterprise Single Sign-On (SSO) in a WCF channel or a WCF service model programming solution, to aggregate database operations into a single multifunction operation, or to perform schema transformation between operations implemented by a custom application and operations on the SAP system.
The SAP adapter is built on top of the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK and runs on top of the WCF LOB Adapter SDK runtime. The WCF LOB Adapter SDK provides a software framework and tooling infrastructure that the SAP adapter leverages to provide a rich set of features to users and adapter clients.
The SAP adapter connects with the SAP system through the SAP Unicode RFC SDK Library (librfc32u.dll). The SAP adapter supports both the 32 bit and the 64 bit versions of the SAP RFC SDK. The SAP RFC SDK enables external programs to call ABAP functions on a SAP system.
You establish a connection to an SAP system by providing a connection URI to the SAP adapter. The SAP adapter supports the following kinds of connections to an SAP system:
  • An application host–based connection (A), in which the SAP adapter connects directly to an SAP application server.
  • A load balancing connection (B), in which the SAP adapter connects to an SAP messaging server.
  • A destination-based connection (D), in which the connection to the SAP system is specified by a destination in the saprfc.ini configuration file. A, B, and R type connections are supported.
  • A listener connection (R), in which the adapter receives RFCs, tRFC and IDOCs through an RFC Destination on the SAP system that is specified by a listener host, a listener gateway service, and a listener program ID, either directly in the connection URI or by an R-based destination in the saprfc.ini configuration file.


No comments:

Post a Comment