Sap
Short Description
sap...
Description
Mastering SAP NetWeaver® XI—Programming Marcus Banner, Halil-Cem Gürsoy, Heinzpeter Klein
Contents
1
Introduction
4
Programming Mappings in .................................... SAP NetWeaver XI ....................................
19
4
3.1 3.1
..................................... ABAP Mapping .....................................
19
........................ Scenario to Be Mapped ........................
19
............................................ ................................................ ....
3
............................ Content of This Book ............................ ................................ Acknowledgments ................................
3
Architecture of SAP NetWeaver ......................... Exchange Infrastructure Infrastructure .........................
5
............................ in SAP NetWeaver XI ............................
21
1.1 1.1
.................................... SAP NetWeaver ....................................
5
......... Creating an ABAP Mapping Class .........
23
1.2
Process Integration Integrati on Using
... ABAP Mapping Using the iXML Library ...
24
Activating the ABAP Mapping Function
................................ SAP NetWeaver XI ................................
6
Integrating the ABAP Mapping in the
1.3
...... Architecture Architec ture of SAP NetWeaver XI ......
6
........................................ XI Repository ........................................
27
1.4
SAP NetWeaver XI Landscape Landscap e
............... ..... Customizing the XI Directory ..........
29
........................................ Java Mapping ........................................
33
............................................... Topology ...............................................
3.2
7
Implementing the Java Mapping
2
SAP NetWeaver Development Developmen t Infrastructure—Basic Infrastructure—Basic Principles 2.1
......... ...........
9
Architecture Architec ture of the SAP NetWeaver
3.3
Development Infrastructure Infrastructure .................
9
................................... Design of NWDI ...................................
10
......................... Components of NWDI .........................
11
............................... Component Model ...............................
12
4
2.2
4.1 4.1
13
Tips for Installing SAP NetWeaver .................................. Developer Studio ..................................
33
Testing the Mapping Class ....................
37
Graphical Mapping Editor ....................
39
Developing an Adapter
Development Process in SAP NetWeaver .................................. Developer Studio ..................................
...................................................... .......... Class ............................................
4.2 13
.......................... ..........................
45
.................................. Theoretical Basics ..................................
45
......................... XI Adapter Framework .........................
45
............... ..... J2EE Connector Architecture ..........
46
Special Features of SAP NetWeaver XI ...
47
... Preparing the Partner Connectivity Connectivit y Kit ...
48
................................... User Permissions ...................................
48
......................................... aii.properties .........................................
49
2.3
Environment for Adapter Develop-
..................................................... ........ ment .............................................
15
....................... Enabling the CPA Cache .......................
49
................................................... ........ Eclipse ...........................................
15
.............. .... Adaptations in the XI Adapter ..........
50
........................................... Subversion ...........................................
16
4.3
Preparing the Development Environ-
............................................... Subclipse ...............................................
16
..................................................... ...... ment ...............................................
50
........................................... Apache Ant ...........................................
16
......................... Integrating XI Libraries .........................
51
........................... Java Development Kit ...........................
17
.... Integrating Muse Libraries in Eclipse ....
51
....................... Jabber Server and Client .......................
52
........................................... Apache Ant ...........................................
53
www.sap-press.com
1
Contents
Ant Task for SDA Creation ....................
53
Remote Deployment Using the SDM API ............................................... 4.4
53
Deployment of the Muse Libraries in SAP NetWeaver AS ...............................
54
4.5
Creating a New Eclipse Project ............
56
4.6
Versioning the Project ..........................
58
4.7
Adapter Skeleton of SAP ......................
59
4.8
Refactoring of Source Code and Descriptors ............................................
4.9
5
ConnectionFactory ...............................
70
ConnectionManager .............................
71
ManagedConnectionFactory ................
71
ManagedConnection ............................
73
Connection Object ...............................
75
Interaction ............................................
75
Source Files ...........................................
76
Deployment Descriptors ......................
76
connector-j2ee-engine.xml ..................
76
log-configuration.xml (RAR) .................
77
ra.xml ....................................................
77
© Galileo Press 2007. All rights reserved.
79
log-configuration.xml (SDA) .................
80
CPA Cache Metafile ..............................
80
Build and Deployment of the 82
4.14
Testing in the Partner Connectivity Kit .........................................................
83
Adapter Module ...................................
86
Implementation ....................................
86
Testing the Adapter Module .................
89
Application Options of a Module .........
90
69
SLD API 5.1
6
.........................................................
91
Configuring the Java Integrated Development Environment (IDE) .........
91
5.2
Implementing the CIM Client ..............
93
5.3
Testing the CIM Client ..........................
94
Debugging XI Applications
...................
97
6.1
Debugging ABAP Components ............
97
6.2
Debugging Java Components ...............
99
7
List of Abbreviations ...............................
103
Index ..............................................................
105
More Adaptations to the
2
[Package Name]-dd.xml .......................
Uploading CPA Cache Metadata ..........
61
Implementation of javax.resource.cci.
4.11
78
4.13
Integration of Communication in the Adapter ...........................................
application-j2ee-engine.xml .................
81
4.15
60
78
Adapter .................................................
Implementing Jabber Communication ....................................
4.10
4.12
application.xml .....................................
Introduction
This SAP PRESS Essentials guide, Mastering SAP
Today, SAP NetWeaver XI 3.0 with SP 16 is definitely a
NetWeaver XI—Programming, is intended to complement
product that must be considered as a serious competitor
and enhance the topics that were not discussed in further
to the established range of EAI products such as SeeBe-
detail in the book Mastering SAP XI—Administration,1
yond, which recently was acquired by Sun Microsystems,
since that book focused on other areas. This Essentials
or IBM WebSphere.
guide can be regarded both as a practical guide to pro-
And yet, larger companies that had already decided on
gramming and as an ideal addition to the aforementioned
another EAI tool prior to the release of SAP NetWeaver
book. This time, our focus is on development. As in the
XI 3.0 are very reluctant to consider changing to SAP
practical guide for administration, we will make extensive
NetWeaver XI. Here, concerns about asset and invest-
use of a real-life example that you can reproduce yourself
ment protection play a considerable role. For companies
with relatively little effort in a minimal installation.
that otherwise extensively employ SAP products, these
For developers, a minimal installation consists of SAP
considerations often represent the biggest obstacle.
NetWeaver Developer Studio (NWDS), which is based
Meanwhile, from a technical point of view, these compa-
on the development environment Eclipse; SAP Partner
nies for the most part can find no plausible reason against
Connectivity Kit (PCK) for the development of adapt-
the use of SAP NetWeaver XI 3.0 and in favor of using a
2
ers; Subversion and Subclipse for version management ;
third-party software product in the EAI environment.
and Apache Ant as an indispensable aid that acts in the
With this in mind, our intent in this book is to provide
background. For each of the development tools speci-
you with some valuable tips and tricks along the way for
fied above, this book contains an extensive and com-
development in SAP NetWeaver XI.
prehensible description of their functions as well as the
One of the focuses of this book is on developing your
Web addresses you need to download the tools free of
own XI adapters. Because the documentation that is offi-
charge.
cially (and unofficially) available for this topic is very lim-
The SAP PRESS Essentials guide Mastering SAP XI—
ited and insufficient, one of our primary concerns was to
Administration was published in January 2006. At that
integrate this subject in this book. Our own experience
time, we explained in the foreword that, compared with
has shown that many SAP consultants who deal with SAP
Version 2.0, SAP NetWeaver Exchange Infrastructure
NetWeaver XI and even want to do their own develop-
(XI) 3.0 had been substantially improved and that with
ment with it originally have come from an ABAP envi-
increasing support package (SP) levels it would have the
ronment. Because of this, they often encounter prob-
potential of becoming a strong competitor to existing
lems when working in the Java world and when using its
Enterprise Application Integration (EAI) vendors. After a
development environments and tools. We have tried to
year that saw some good (and not-so-good) SP updates,
take these issues into account and to formulate examples
our prediction proved to be true.
in such a way that anyone with a basic knowledge of Java
1 Marcus Banner and Heinzpeter Klein, Mastering SAP XI— Administration, SAP PRESS Essentials 11 (Bonn: Galileo Press, 2006). 2 Alternatively, you can also use Concurrent Versions System (CVS) or SAP Design Time Repository (DTR).
can understand them. Readers who are experienced Java developers should skip the rather comprehensive descriptions of processes in the development environments and
www.sap-press.com
3
Introduction
also the Java code, which has deliberately been kept as
Chapter 4 focuses on how you can develop an adapter
simple as possible.
using the PCK. In this chapter we provide you with a
We hope that this book inspires the development of
description of the most common problems that can
some new XI adapters and that we will soon have the
occur during development, offer possible solutions, and
pleasure of meeting some developers on the Web! You
delve deeply into functionality. For those of you who
can download the source code for the sample adapter
are experienced ABAP and Java developers, it will take
from the websites that accompany this book: www.sap-
only a short period of time to familiarize yourselves with
press.com and www.sap-hefte.de/1478 .
everything you need to be able to implement customer requirements in your own applications.
Content of This Book
Other special topics such as the System Landscape
This book describes the basic principles of structuring and
Directory (SLD) application programming interface (API)
performing the development of SAP adapters using Java
(integrating Java classes into the XI environment) and
as well as different options for mapping and debugging.
debugging in SAP NetWeaver XI are described in detail in
Chapter 1 provides a brief and concise description of
Chapter 5 and Chapter 6.
SAP NetWeaver XI, while Chapter 2 deals with the architecture and infrastructure of SAP NetWeaver Develop-
Acknowledgments
ment Infrastructure (NWDI). In addition, Chapter 2 also
Marcus Banner would like to thank his family for the
describes the SAP client installation for SAP NetWeaver
understanding they showed during the time this book
Developer Studio (NWDS). At this stage, we kept the
was being written: You both mean the world to me!
descriptions of Change Management Services (CMS)
Heinzpeter Klein would like to express his thanks to
and the Design Time Repository (DTR) relatively short,
his friends and family for the tolerance and understand-
as we used different development tools. These tools
ing they showed during all those days and nights when
comply with standard SAP requirements. Nevertheless,
he was absent: They haven‘t seen me in a long time.
we didn‘t want to completely deprive you of the inte-
Dr. Halil-Cem Gürsoy would like to thank his family for
grated SAP solution with CMS and DTR. Chapter 2 closes
all their patience and support as well as say thanks to CDI
with a detailed description of the set of tools used in the
AG and its employees for their support by providing the
adapter development environment (Eclipse, Subclipse,
infrastructure and food for thought.
Apache Ant, Java Development Kit). After this discussion of basic principles, Chapter 3 deals with XI mapping for ABAP and for Java. These two options are comprehensively described using numerous real-life examples.
4
© Galileo Press 2007. All rights reserved.
We, the authors, hope you will have a lot of fun reading this book. Hopefully, the topics discussed in this book will spare you much tedious trial and error.
4 Developing an Adapter
deployment of a Resource Adapter Archive (RAR) is supported, an Enterprise Application Archive (EAR) is not—in contrast to the JCA specification. The reason for this is that the JCA specification in this case stipulates a bundling with an application (that is also contained in the EAR), where the adapter may only be visible to this application (see JCA 1.0, Section 10.2). In SAP NetWeaver XI, however, we do not deploy any applications; that is, the application that accesses the adapter is the AF. This would mean that in such a case, the adapter would have to be deployed in an EAR bundled with the AF. Instead, you can use the SAP-
Figure 4.3 Login Screen of the J2EE Engine Visual Administrator
specific format Software Delivery Archive (SDA), which apart from the RAR contains additional information about
After you have connected to the system, you can i mme-
the adapter. This SDA can then be deployed as usual via
diately go to the user permission management area to
the Software Deployment Manager (SDM). SAP recom-
give the user who is to develop the adapters the neces-
mends this method, and we will use an SDA in our exam-
sary permissions. In the left navigation menu, select Ser-
ple as well.
vices Security Provider Policy Configurations.
Then you can select the appropriate component in the
4.2 Preparing the Partner Connectivity Kit
center area as well as the Security Roles tab to assign
After all this theory, we will now get practical and develop
4.1 shows the permissions to be assigned.
your user the proper permissions (see Figure 4.4). Table
our own adapter. We will not reinvent the wheel but rather follow SAP’s recommendation and use the sam-
Component
Role
ple adapter, which is included in every installation of the
sap.com/com.sap.af. app*AdapterFramework
Xi_af_adapter_monitor
Partner Connectivity Kit (PCK), as a starting point and modify it according to our needs. The development will be performed using the PCK.
sap.com/com.sap.af.app*CPACache Xi_af_cpa_invalidate sap.com/com.sap.af.app*CPACache Xi_af_cpa_monitor
On the one hand, the PCK is used for integrating sys-
sap.com/com.sap.af.app*CPACache Xi_af_cpa_schemaupload
tem landscapes in XI without having to install a full SAP
sap.com/com.sap.af.ms. app*MessagingSystem
Xi_af_receive
sap.com/com.sap.af.soapadapter* XISOAPAdapter
Xi_adapter_soap_message
NetWeaver XI on them (partner scenario). On the other hand, it serves as a development environment for adapters. We therefore assume that you have access to an SAP NetWeaver system with a PCK (we use Version 3.0 SP 14). User Permissions First, you must set up, or configure, the user roles for adapter development in the J2EE server. Open the J2EE Engine Visual Administrator. On Windows systems, you will find it under \admin, where is the
sap.com/com.sap.sap.xi.mdt*mdt
display
sap.com/com.sap.sap.xi.mdt*mdt
modify
sap.com/com.sap.sap.xi.mdt*mdt
payload
sap.com/com.sap.sap.xi.pck*aii_ ib_sbeans.jar
administer
sap.com/com.sap.sap.xi.pck*pck
singlesignon
sap.com/com.sap.sap.xi.pck*pck
support
Table 4.1 Roles to Be Assigned to the PCK User
directory of the J2EE container (for example, C:\usr\sap\ J2E\JC00\j2ee).
If several persons are going to participate in the develop-
As soon as you execute the go.bat batch file, Visual
ment, it’s recommended that you first create a user group
Administrator starts and welcomes you with a login
(e.g., SAP_XI_PCK_ADMIN) and assign the users to this
prompt (see Figure 4.3).
group. After that, it’s completely fine to assign the per-
48 © Galileo Press 2007. All rights reserved.
4.2 Preparing the Partner Connectivity Kit
missions to the group. Don’t close the application yet:
tory /usr/sap/J2E/JC00/j2ee/cluster/server0, for example.
You will need the administration interface again as we
Listing 4.1 shows an example. Note that you need to
proceed further.
adapt the computer name and the ports.
More details regarding the required rights can be found in the SAP Notes 746328 and 792456.
Enabling the CPA Cache Now you need to enable the CPA cache. This is done
aii.properties
using the J2EE Engine Visual Administrator. In the Admin-
Now you need to create the file aii.properties and copy it
istrator, go to the SAP XI AF CPA Cache service and adapt
to the directory. can be the direc-
the parameters as shown in Table 4.2.
Figure 4.4 Configuration of the Roles for the PCK User via the J2EE Engine Visual Administrator
com.sap.aii.ib.client.properties = com.sap.aii.ib.client.*,com.sap.aii.connect.*,com.sap.aii. ib.server.*,com.sap.aii.docu.*,com.sap.aii.pck.* ### Connections com.sap.aii.connect.directory.contextroot = pck com.sap.aii.connect.directory.name = was-xp-hguvm1 com.sap.aii.connect.directory.httpport = 50000 com.sap.aii.connect.directory.rmiport = 50004 ### Appl name com.sap.aii.ib.client.applicationname.directory = sap.com/com.sap.xi.pck/ com.sap.aii.ib.client.login.languages = EN,DE Listing 4.1 Example of the aii.properties File (cont.)
www.sap-press.com
49
4 Developing an Adapter
### No locking for PCK com.sap.aii.ib.server.lockauth.activation = false com.sap.aii.pck.server.compiler. classpath_resolverServiceName = classpath_resolver com.sap.aii.docu.url = http://was-xp-hguvm1:50000/pck/docOnline/DOCU com.sap.aii.docu.languages = EN,DE Listing 4.1 Example of the aii.properties File (cont.)
Parameters
Value
Parameters
cacheType
PCK
xiadapter.internal
False
xiadapter.isconfig.url
http://[Server name]:[J2EE Engine Port]/MessagingSystem/ receive/AFW/XI
xiadapter.isconfig.user
[User Name]
xiadapter.isconfig. password
[User Password]
SLDAccess
Value
Table 4.2 Enabling the CPA Cache
Figure 4.5 shows the changes of the parameters for the CPA cache. Changes to the default settings are presented in italics.
devModePCK
Table 4.3 Adjusting the XI Adapter Parameters
Adaptations in the XI Adapter Some parameters in the configuration of the XI adapter
4.3 Preparing the Development Environment
must be adjusted as well. As described previously, go to the J2EE Engine Visual Administrator and select the SAP
The components we suggest for developing an adapter
XI Adapter XI service. Adjust the parameters as shown in
have already been described in detail in Section 2.3. We
Table 4.3.
assume that you have installed a Java Development Kit
Figure 4.5 Changes to the Parameters for the CPA Cache
50 © Galileo Press 2007. All rights reserved.
4.3 Preparing the Development Environment
(JDK) as well as Eclipse on your development system. To
These libraries must later be communicated to your
be on the safe side (e.g., in order to be able to access an
adapter project in Eclipse. To make your life easier, it is
older version), you should also use a versioning system.
recommended that you thematically bundle the libraries under Eclipse in order to be able to completely assign
Integrating XI Libraries
them to a project via a few mouse clicks. In Eclipse, open
The following Java libraries (JAR files) are required for
the Windows
developing an adapter. Depending on your needs, there
gation pane, select the Java Build Path User Libraries
might be more:
entry (see Figure 4.6). By clicking on New you are pre-
Preferences menu, and in the left navi
/bin/ext/com.sap.aii.af.lib/aii_af_trace.jar
sented with a dialog where you can enter the name of the
/bin/ext/com.sap.aii.af.lib/aii_af_cci.jar
user library, in our case SAPXIAF , for the XI-AF-JAR files
/bin/ext/com.sap.aii.af.lib/aii_af_mp.jar
as well as SAPJ2EECLIENT for the J2EE client libraries. If
/bin/ext/com.sap.aii.af.lib/aii_af_ms_api.jar
you created these user libraries (which are empty at first),
/bin/ext/com.sap.aii.af.lib/aii_af_ms_spi.jar
you can select them and then add JAR files via the Add
/bin/ext/com.sap.aii.util.misc/aii_util_misc.
JARs button. Add the files listed above. These user librar-
jar
ies can now be exposed to any project in your devel-
/bin/ext/com.sap.xi.util.misc/aii_utilxi_misc.
opment environment; otherwise, you would have to go
jar
through a similar procedure for every adapter project.
/bin/ext/j2eeca/connector.jar
/bin/ext/com.sap.guid/guidgenerator.jar
Integrating Muse Libraries in Eclipse
/bin/services/com.sap.aii.adapter.xi.svc/aii_
To be able to send messages to a Jabber server via the
adapter_xi_svc.jar
adapter, we need a library that implements the Jabber/
/bin/services/com.sap.aii.af.cpa.svc/aii_af_
XMPP protocol. We recommend the Muse library, which
cpa.jar
is fairly popular and stable (http://open.echomine.org/
/bin/services/com.sap.aii.af.svc/aii_af_svc.
confluence/display/MUSE/Muse+Home).
jar
all J2EE client libraries under /j2eeclient
Figure 4.6 Bundling JAR Files to User Libraries
www.sap-press.com
51
4 Developing an Adapter
Download the current version from the Muse home page;
To make sure that messages to a currently offline user
we used Version 0.81 for this book. Unzip the down-
do not get lost, it is recommended you have them saved
loaded ZIP file to an appropriate folder.
by the server so that they can be delivered to the receiver
Then integrate the required muse.jar file in a user library in Eclipse, as described above.
when he or she logs back in (offline messages). To do this, under Server Server Settings Offline Messages, select
the Store and Always Store options. Jabber Server and Client
As a Jabber client, we recommend
Ψ (Psi),
which can
In addition to the Muse libraries, we also need a Jabber
be found at http://psi-im.org/ . Ψ is available not only for
server and a Jabber client. There is a very large selection
Windows but also for many other platforms. After you’ve
of both commercial and free products. A comprehensive
downloaded Ψ, the installation is fairly simple: Just start
overview can be found at www.jabber.org.
the installer and follow the specified steps.
As a server, we recommend Wildfire by Jive Soft-
After you start
Ψ for
the first time, you need to set
ware, which is licensed under the GNU Public License
up your users. First, a profile is set up that can accom-
(see www.gnu.org/copyleft/gpl.html). You can download Wildfire from the Jive home page (www.jivesoftware.org/
modate several users. After the profile has been created, you set up the Jabber accounts. To do this, use the two
wildfire/ ). We used Version 2.6.1 for our scenario. Install
users you just set up in the Wildfire server. Note that
Wildfire by following the simple instructions in the docu-
you need to attach “@[ServerName]” to the user name
mentation. After you have started Wildfire for the first
to inform the client on which server the users are to be
time, you should go to the administration interface (which
found. Last, these users must be exposed to each other as
can be found by default at http://127.0.0.1:9090/ ) and
contacts. During this process, authorization messages are
set up two users. In the administration interface, select Users/Groups in the upper navigation and then Create
exchanged. This procedure can be handled intuitively.
New User in the left pane (see Figure 4.7). These users
look like the one shown in Figure 4.8. The Jabber client
will be used for sending or receiving messages from the
Ψ is
adapter.
as well.
After these steps have been completed, your
Figure 4.7 Setting Up New Users via the Wildfire Administration Interface
52 © Galileo Press 2007. All rights reserved.
Ψ could
active with two accounts, and the contacts are online
4.3 Preparing the Development Environment
Now perform the same steps to adjust the system environment variable Path to include the Ant bin directory in the search path. You can use the ANT_HOME environment variable you set previously: Just add “ %ANT_HOME%\bin” to the end of the existing definition. You should now be able to start Ant. Verify this by opening a Windows command prompt (Start Run, and then enter “cmd”) and entering “ant –version”. The output should then appear as follows: C:\>ant -version
Figure 4.8 Active Jabber Client Ψ with Two Accounts
Apache Ant version 1.6.5 compiled on June 2
As an alternative to your own Jabber server, you could
2005
also use publicly accessible servers (a list can be found
C:\>
at www.xmpp.net/ ) and set up your users there. For our scenario, however, this possibly requires the configura-
Ant Task for SDA Creation
tion of firewalls in your domain to enable communica-
To create SDAs without NetWeaver Developer Studio
tion. However, you can also use an HTTP proxy with
Ψ.
(NWDS) or the J2EE Engine Deploy Tool, we need an Ant
Additionally, you can use any Jabber client instead of
Ψ.
task that can perform this for us. A solution already exists
You will find an overview of clients at www.jabber.org.
in NWDS in the form of the JarSAP task. You can find the required JAR file, jar4sap.jar, in the
Apache Ant
NWDS installation in the plug-in com.sap.ide.eclipse.jar-
We will use the free tool Apache Ant (see Chapter 3) to
sap, which can normally be found under C:\Programs\
compile the source codes, assemble the archive files, and
SAP\JDT\eclipse\plugins\com.sap.ide.eclipse.jarsap\lib.
implement the deployment.
You will later enter the location of this file in the build
Download the most recent stable Ant release from the
script for Ant.
Ant home page (http://ant.apache.org) under Download
Binary Distributions. Currently, this is Version 1.6.5, but
Remote Deployment Using the SDM API
our project is compatible with any Ant 1.6 version. Once
Because we want to deploy the required archives without
you have unzipped the ZIP archive to a folder, custom-
delay on the J2EE server after we’ve compiled and assem-
ize some system environment variables in Windows XP
bled them, a deployment via the SDM interface would be
or 2000.
rather cumbersome. Since we are implementing Ant any-
To adjust an environment variable in Windows 2000
way, there is an elegant solution: David Beisert , a well-
or XP, go to Control Panel, select System, click on the Advanced tab, and then select the Environment Vari-
known consultant in the NetWeaver environment, intro-
ables button. By clicking on New under System Variables, you first create the environment variable ANT_HOME
deploy from Ant via the SDM API ( https://weblogs.sdn.
(see Figure 4.9).
duced an Ant task in his SDN blog that can be used to sap.com/pub/wlg/3138). Follow the link Download SDM Deployment Task and download the ZIP file. Then rename the downloaded sdmAnt.zip file to sdmAnt.jar. Another important note regarding the SDM: If you encounter problems during the deployment later on in the project and obtain the message “Server did not accept login request as admin on port
Figure 4.9 Creating a System Environment Variable in Windows XP and 2000
,” please take note of SAP Note 941150. In this case you’ll need to install a current version of the
www.sap-press.com
53
4 Developing an Adapter
SDM, as the note recommends. Because a description
menu select the Add Library entry. An easier way of dis-
of an SDM installation would exceed the scope of this
playing the window that now opens is to use the short-
book, please refer to SAP Note 860939, which discusses
cut Ctrl+L. Enter “Muse” as the name of the library, and
an SDM installation, or an upgrade, in great detail.
leave the other option as Create New. Then click again on the Server Components menu option and on Create Dispatcher. In the left area, an entry under Muse.jar and SERVER is made automatically.
4.4 Deployment of the Muse Libraries in SAP NetWeaver AS Up to now, we’ve set up our development environment and made development preparations within the PCK. Over the course of this process, we exposed the Muse libraries to our development environment. Because the adapter will run in the PCK during the development phase and later in a full SAP NetWeaver XI, we must deploy the libraries required by our adapter in the J2EE container. You already downloaded the Muse libraries and stored them in a separate directory. We will now add some of these libraries to a library project, wrap this library project in an SDA, and deploy it on the J2EE container. To do this, we’ll start the J2EE Engine Deploy Tool (which can be found under /deploying) by clicking on the DeployTool.bat batch file. As soon as the application is started, you can create a new deployment project by clicking on Project New
Figure 4.11 Create New Directory Icon
Project (see Figure 4.10). We recommend you set up a separate directory by clicking on the Create New Directory icon (see Figure 4.11).
Now you can start entering the information for the deployment. Click on SERVER, and enter the necessary data as follows (see Figure 4.12): For the Provider Name, select “com.echomine” (these libraries are, after all, from Echomine), select “muse” for both Component Name and Display Name, and for the version, enter the Muse version you downloaded (in our example, 0.81). Use the same procedure and data for the dispatcher. Now you can add the required JAR files. Select the Muse.jar entry. In the opening dialog, you can click on the button to the right of the JAR field to select the three
Figure 4.10 Creating a New Deployment Project
required files and add them to the list by clicking on the Add button (see Figure 4.13). The following are the files:
Once you have created a new directory for the project,
named the project (Address field), and confirmed everything by clicking on OK, you can proceed. Now you
commons-logging.jar (Apache Commons Logging) jdom.jar (XML parser library) muse.jar (the Muse application programming interface—API)
need to inform the Deploy Tool that you want to set up a library. Go to the Server Components tab, in the menu
Once you have selected and added the files, you should
select the Server Components item, and in the pulldown
see a picture similar to what Figure 4.13 shows.
54 © Galileo Press 2007. All rights reserved.
Index
A ABAP/4 Debugger 97 ABAP/4 development environment 10 ABAP mapping 19, 97 Adapter engine 45 Adapter Framework 45, 69 Adapter Metadata Upload 82 Adapter module 86 Adapter skeleton 59 aii.properties 49 Ant 15, 16, 53, 81 call 81 Ant target 81 Ant task 53, 81 Apache Ant 16 application-j2ee-engine.xml 78, 88 application.xml 78 Audit log 85, 87 Audit messages 75 Automatic mapping 41
B Beisert 53 Branches 58 Breakpoint 97, 100 Build 81 Build script 81 Build tool 16 Byte code 17
C C# 9 C++ 9 Central information provider 7 Change history 61 Change Management Service (CMS) 12 Chatting 45 CIM client 93, 94, 95
CIM server 91 Class interfaces 24 Classloader 76, 85 Class names 77 com.echomine.jabber.Jabber 66 com.echomine.jabber.JabberContext 64 com.inqmy.lib.xml.StandardDOMWriter 36 com.sap.aii.af.monitor.api.AdapterMonitor 71 com.sap.aii.af.mp.module.Module 86 com.sap.aii.af.mp.module.ModuleHome 87 com.sap.aii.af.mp.module.ModuleLocal 87 com.sap.aii.af.mp.module.ModuleLocalHome 87 com.sap.aii.af.mp.module.ModuleRemote 87 com.sap.aii.af.ra.cci.NWConnectionFactory 70 com.sap.aii.af.service.auditlog.Audit 75 com.sap.aii.af.service.auditlog.AuditMessageKey 75 com.sap.aii.af.service.trace.Trace 67 com.sap.aii.mapping.api.Streamtransformation 33 com.sap.aii.mapping.api.StreamtransformationConstant 34 com.sap.aii.mapping.api.StreamTransformationException 36 com.sap.engine.interfaces.connector. ManagedConnectionFactoryActivation 71 com.sap.sdm.ant.JarSAP 81 Common Client Interface 46 Component Build Service 12 Component model 10, 12 Configuration interface 80 Connection management 47 Connection pooling 69, 71, 83
connector-j2ee-engine.xml 76, 78 Constructor definition 64 CPA cache 49, 73, 76 CPA cache metadata 82 CPA cache metafile 80 CVS 15, 16
D Database table 21 dd.xml 79 Debugging 97 Debugging in ABAP 97 Debugging in Java 99 Debugging mode 99 DeltaV 16 DeltaV specification 16 Deployment 53, 54, 81 Deployment descriptors 59, 60, 76 Deprecated 72 Design Time Repository (DTR) 11, 15, 16 Development Components (DC) 12 Development Objects (DO) 12 Direction OUTBOUND 76 DOM parser 34
E Eclipse 15, 58 Eclipse Foundation Inc. 15 Eclipse project 34, 56 ejb-j2ee-engine.xml 87 EJB Module Project 86 Enterprise Application Archive 48, 78 Enterprise Application Project 88 Enterprise Java Bean (EJB) 86 Exchange Infrastructure landscape topology 7
www.sap-press.com
105
Index
F File adapter 83
G GNU Public License 52 Google 45 Google Talk 45 Gosling, James 9 Graphical Mapping Editor 39 Groovy 17
H Hewlett-Packard 45
I Inbound 80 Inbound processing 71 Inbox adapter 30 InputByteStream 34 Instant messaging system 45 Interaction 75 Interface mapping 28 iXML functions 24 iXML Library 24
J J2EE 9, 15 J2EE application 56 J2EE Connector Architecture 45, 46 J2EE container 56 J2EE Engine Deploy Tool 54 J2EE Engine Visual Administrator 48 Jabber 45 Jabber client 52 Jabber communication 61 Jabber server 51, 52 JAR files 91 Java 9, 15 development environment 15 java.lang.ClassCastException 87 java.lang.Runnable 71 Java Community Process 46 Java Connector Architecture 9 Java debugger 99 Java Development Infrastructure (JDI) 15 Java Development Kit 57 Java Development Kit (JDK) 15, 17 Java IDE 91
106 © Galileo Press 2007. All rights reserved.
Java interface 61 Java mapping 33 Java Naming and Directory Interface (JNDI) 73, 80, 87, 89 Java Platform Debugger Architecture (JDPA) 99 Java Specification Request 46 Java versions 9 Java Virtual Machine (JVM) 9 javax.resource.cci.Connection 47, 73, 74, 75 javax.resource.cci.ConnectionFactory 47, 69, 70 javax.resource.cci.ConnectionSpec 47 javax.resource.cci.Interaction 70, 75 javax.resource.ResourceException 64 javax.resource.spi.ConnectionEventListener 47 javax.resource.spi.ConnectionManager 69, 71 javax.resource.spi. LocalTransaction 47 javax.resource.spi.ManagedConnection 70, 71, 73 javax.resource.spi.ManagedConnectionFactory 70, 71 JEE 9 Jive software 52
L Library project 54 LocalTransaction 47 log-configuration.xml 77, 80, 88 Logging category 76 Log manager 77 Loose coupling 12
M make 15, 16 makefile 16 ManagedConnection 47 Managed environment 47 Mapping class 34 Mapping routines 19 Mapping test 98 Metadata 76, 78 Microsoft 9 Module development 86 Muse libraries 51
N Name Service 12 Namespace 76 Naming in Java 61 .Net 9 NetBeans 15 NoTransaction 47
O Open source 15 Organize Imports 94 Outbound 80 Outbox adapter 31
P Package Explorer 57, 63 Partner Connectivity Kit 45, 48, 83 Perforce 64 Programming mappings 19 Project versioning 58 Psi 52 Public parts 12
R ra.xml 59, 77 Receiver agreement 84 Receiver determination 31, 32 Refactoring 60, 77 Reference 78 Reference implementation 59 Registration of the monitoring interface 72 Remote deployment 53 Resource Adapter Archive 48 RFC destinations 20
S Sample adapter 59 SampleRa.xml 59 SAP NetWeaver 5 SAP NetWeaver Developer Studio (NWDS) 13 SAP NetWeaver Development Infrastructure (NWDI) 9, 11 SAP XML Toolkit 33 SAX parser 34 SDA 16
Index
SDA creation 53 SDM 16 SDM administrator 55 SDM API 53 SDM GUI 55 SDM installation 54 SDM repository 56 SDN blog 53 Security Roles 48 Sender agreement 32, 84 Sender interface 34 Sequence diagram 70 Serialization 36 Server Provider Interface 47 Service Programming Interface 46 SIGNATURE 65 SLD API 91 Software component (SC) 12 Software Delivery Archive (SDA) 48 Software Deployment Manager (SDM) 48
Stateless Session Bean 86 Subclipse 15, 16, 58 substring 43 Subversion 15, 16, 58 Subversion Book 58 Sun 15 System contracts 47 System Landscape Directory (SLD) 12, 91
T Tags 58 TCP/IP connection 20 TRACE 64 Trace 77 Transaction management 47 Trunk 58
V VERSION_ID 64 Version management 16 Version management system 58
W WebDAV 16 Wildfire 52
X XI adapter 50 XI Adapter Framework (AF) 45 XI directory 29 XI libraries 51 XI repository 27 XMPP 45
U User permissions 48
www.sap-press.com
107
View more...
Comments