sap netweaver gateway adapter

31
H A N D B O O K SAP NetWeaver Gateway Adapter Intrexx 6

Upload: others

Post on 12-Feb-2022

12 views

Category:

Documents


0 download

TRANSCRIPT

H A N D B O O K

SAP NetWeaver Gateway Adapter

Intrexx 6

Contents 1. Introduction ................................................................................................................... 4 1.1. SAP NetWeaver Gateway and the OData Protocol ....................................................................... 4 1.2. Functionality of the Business Adapter .............................................................................................. 4 1.3. System requirements .............................................................................................................................. 4 2. Licensing ........................................................................................................................ 4 3. Configuration and Administration .............................................................................. 6 3.1. Creating a SAP NetWeaver Gateway connection .......................................................................... 6 3.2. Authentication types ............................................................................................................................... 6 3.3. SAP NetWeaver Gateway connection data...................................................................................... 8 3.4. Registering an OData Service ............................................................................................................... 8 3.5. SAP Solution Manager Registration ................................................................................................... 9 3.6. Login information .................................................................................................................................. 10 3.7. Additional user accounts .................................................................................................................... 11 3.8. Connection test ...................................................................................................................................... 12 4. The Business Adapter in Intrexx Applications .......................................................... 12 4.1. Setup access to foreign data .............................................................................................................. 12 4.2. Data types ................................................................................................................................................. 15 4.3. References ................................................................................................................................................ 15

4.3.1. 1:1 Relationships ................................................................................................................. 15 4.3.2. 1:n Relationships ................................................................................................................. 16 4.3.3. m:n Relationships ............................................................................................................... 17

4.4. Files ............................................................................................................................................................. 17 4.4.1. Binary data fields ................................................................................................................. 17 4.4.2. Media Link Entries .............................................................................................................. 18

4.5. OData Function Imports ...................................................................................................................... 22 4.6. Expert Settings ........................................................................................................................................ 23 4.7. Export of OData connections ............................................................................................................ 24 5. Processes ..................................................................................................................... 25 6. Troubleshooting .......................................................................................................... 26 6.1. Error messages ........................................................................................................................................ 26 6.2. Request Tracing ...................................................................................................................................... 26 6.3. Unsupported OData functions .......................................................................................................... 28 6.4. SSL Connections ..................................................................................................................................... 28 7. Appendix ..................................................................................................................... 29 7.1. OData Specification............................................................................................................................... 29 7.2. OData Tools .............................................................................................................................................. 29

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 3

Copyright All parts of this document are protected by copyright. All rights are reserved, especially the right of translation, presentation, reproduction, and duplication. Regardless of the accuracy of the text, images, and programs, neither author, publisher nor translator may take judicial or other responsibility for possible errors and their consequences. The naming conventions, trade names, product designations, etc. reproduced in this work may, even without special designation, be trademarks, and as such may be subject to legal regulations.

Writing Conventions In this handbook, text passages will be displayed in italics when they refer to settings in the displayed dialogs. Menu items that are available in context menus can, in addition, always be selected from the main menu. Main menu items will not be described if they are not available in the context menu. A description of the general main menu items can be found in the Portals handbook. Programming code in the text will be displayed in the Courier font. Context menus can be opened by clicking with the right mouse button on the described element. In the following, <intrexx>refers to your Intrexx installation path; under Windows, for example, this is usually c:\programs\intrexx\. On Linux, the normal install path is

/opt/intrexx/. <portal> refers to an existing Intrexx portal directory. You can find all files belonging to a portal in this directory, for example, under Windows it would be

c:\ProgramData\Intrexx\<portal name>. You can find the portal directory from the portal properties, which is available from the Portal main menu. The following symbols will be used for designation of special kinds of information:

Information

References to an Intrexx handbook

Directories

URLs

Click on buttons

Tip

Previous Knowledge In order to understand this documentation, no special previous knowledge is required. You can find supplemental information in the handbooks Integration, Applications I and II.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 4

1. Introduction

1.1. SAP NetWeaver Gateway and the OData Protocol The Open Data Protocol (hereinafter OData) is a standardized Web Protocol, that is used by SAP NetWeaver Gateway. It supports easy integration and manipulation of data, and is specifically designed to be far more convenient for the development of web and mobile applications than traditional web services. OData is based on open Web standards including HTTP, Atom Publishing Protocol and JSON, and, like the World Wide Web, is built on the REST architecture style (Representational State Transfer). Complex database queries can be entered using OData via the URL alone. Accordingly, OData is also known as „ODBC for the Web“.

1.2. Functionality of the Business Adapter The Intrexx Business Adapter for SAP NetWeaver Gateway offers the following key features for the integration of SAP systems in Intrexx:

• Creation of applications (Web/Mobile) with the Intrexx Portal Manager on the basis of the functionality of the Service.

• Integration of SAP Systems in Intrexx processes. • Read and write access to SAP data in real time. • Navigation through records in standing relationships. • Calling service functions. • Access to binary files (documents, images, etc.). • Various authentication methods, including compliance with the user and

permissions concept specified by the SAP system.

1.3. System requirements To use the Intrexx Business Adapter for SAP NetWeaver Gateway successfully, at least SAP NetWeaver Gateway 2.0 Service Pack 2 is required. United Planet recommends Service Pack 3 or higher. The Adapter itself supports the OData Specification Version 2.0. Functions, which are specified in Version 3.0 or higher, may in some cases already be available, but are not supported officially. For the creation of applications in Intrexx, only OData Services that provide a corresponding Service Metadata Document can be used. The connection test in the Intrexx service configuration checks for this condition, and issues an appropriate error message if no metadata is available. To ensure smooth communication between the Intrexx Portal Server and the SAP NetWeaver server, the appropriate ports must be released, dependent on the connection type (HTTP / HTTPS). Furthermore, for configuring and building applications with the SAP Adapter, at least one user with the necessary privileges to access the metadata of the OData Services is required.

2. Licensing You need to purchase a license to use the SAP NetWeaver Gateway Business Adapter. Request the license from your partner, or from United Planet by sending an email to [email protected]. The license key will be sent to you by email. Please start the Intrexx

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 5

Portal Manager to unlock the Adapter. Open the License Manager from the Extras menu, by selecting License Manager.

Enter the license key here and click Next.

The Adapter will be recognized automatically. Please click Next.

Assign the Adapter to a portal here. The Adapter license is valid for one portal. The number of users is not limited. Please click OK.

The Adapter is now licensed. For general information about the license manager, please see the Portals handbook.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 6

3. Configuration and Administration

3.1. Creating a SAP NetWeaver Gateway connection A new connection to a SAP System can be established in the Integration Module using the New data source item in the context menu.

Enter the Name of the new connection. Below, you can enter a short description.

3.2. Authentication types In the Authentication area, select the Method required by the service: None for anonymous access, Basic for HTTP Basic or X.509 for X.509 Client certificates. If you select the Basic method, the Login information will be requested. The user entered here will only be needed to access the service metadata in the Portal Manager.

Enter the userID and password here. When you select the X.509 method, a certificate store in PKCS12 Format can be uploaded. Later, each user can upload their own certificate store using a login form. For authentication with X.509 Certification, the root certificate of the authentication authority, which is responsible for issuing the client certificates, must previously have been imported into Intrexx. The root certificate can be saved using the Portal / Portal properties / Certificates menu ( Portals). Then you need to restart the portal server.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 7

Click on Upload X.509 certificate store.

Enter the filename and password here. The certificate store file (in PKCS12 format) can be selected direct from any directory by clicking on Search. Then click on Finish.

Click Next, when you have setup your selected authentication.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 8

3.3. SAP NetWeaver Gateway connection data

Enter the host URL and port. If you want to use SSL, select the appropriate setting. For the SAP client, you can select either the Standard setting or the Client ID. Click Next. The connection to the SAP system will now be established.

3.4. Registering an OData Service Following a successful connection to the SAP NetWeaver Gateway system, the available services will automatically be listed in the Service Catalog, provided NetWeaver Gateway has already produced the Catalog and the previously created users have been granted the necessary permissions. If the Service Catalog is not available, then the services can also be entered manually.

Select the desired service and click on Finish.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 9

All of the selected services are listed here. Click on Add available service to add further services. A click on Enter and add service opens a dialog, in which you can add manually created services, or edit existing services.

Enter the name of the service here. Enter the URL of the service below. In addition, you can specify whether the service for the manipulation of data should request and use the so-called Cross-Site-Request-Forgery Token from the SAP System. Then click on Finish.

By clicking on Remove service a service will be deleted from the list. This is only possible when a service is not already used in an application or process. Click on Next.

3.5. SAP Solution Manager Registration SAP certified software components must be registered in the SAP Solution Manager. This facilitates quick and easy analysis by SAP support should there be a problem. All of the essential information concerning the software component is registered in the SAP System Landscape Directory. This can be carried out in the next step of the configuration. The necessary information for the registration can be obtained from your SAP Administrator.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 10

Here, you can register the Intrexx Business Adapter in the SAP System Landscape Directory. To do this, enter the SAP System Landscape Directory system parameter. Then click Next.

3.6. Login information

Here you can specify how login credentials are obtained at run time. With the From User Manager option, the login name, password and the SAP Client ID are obtained from the Intrexx User Manager ( Users). With the setting From web input the login data will be obtained by a query to the application in which the connection will be used. Click on Next.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 11

3.7. Additional user accounts

Additional users for service access can be defined here. This is needed for certain cases within applications such as processes where the access to the SAP system must always be made under a specified user, regardless of which user is logged into Intrexx. Click on Add additional users.

Here, you can select an existing user from the Intrexx User Manager by clicking on Select user ( Users). Below, enter the Service login and Password. Then click on Finish.

The data for an additional user can be edited here by clicking on Edit additional user. Remove additional user removes a user from the list. Click on Next.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 12

3.8. Connection test

Here, the connection can be tested by clicking on Test. The result is displayed at the bottom of the dialog. Click on Finish.

The connection is now established.

4. The Business Adapter in Intrexx Applications

4.1. Setup access to foreign data A connection to a SAP System, which was configured with the SAP NetWeaver Business Adapter in the Integration Manager, can be used in any Intrexx Application. Create a new foreign data group, using the context menu of the Application ( Applications I).

The dialog for selecting the foreign data connection opens automatically.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 13

Enter the Title of the new foreign data group. The required connection can be selected from the selection list Database connection. The appropriate data handler for an OData database connection will automatically be entered in the selection list Datahandler. You can enter the name of the Table or View, or click on Search to locate it.

Here you can search for the table or view name. Enter a string for the search in the Filter field. The * symbol serves as a placeholder for any character. A* will find all tables or views with names beginning with A. *A* returns all tables / views whose names contain the letter A. Select the desired table or view in the lower part of the dialog and then click OK.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 14

At the bottom, the type of application is defined. With the option Login as current user when the page, on which the SAP NetWeaver connection is integrated, is called, the SAP login credentials of the current portal user will be requested. With the option Login as static user a registered SAP User can be used to login. Click on the link to Select user.

Here you have the option to setup additional users (see the chapter on Additional user accounts). Then click on OK.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 15

The login details of the static user are now registered. The required data fields, which are to be provided by the OData Service, can now be selected on the Data fields tab, and associated with the elements in the Intrexx application. Further information on this topic can be found in the Applications 1 and Foreign data access handbooks

4.2. Data types At the selection of the data fields, the Business Adapter automatically converts the OData data type to the appropriate Intrexx data type. The following characteristics should be noted:

• In contrast to Intrexx, OData defines different data types for date and time. In Intrexx, all Odata data/time data types are converted to the datetime data type. Conversely, Intrexx date values will be converted by default to the Odata Edm.DateTime data type. In some circumstances you can define the service, but with a different date data type. In this case, the correct Odata data type is recorded in the Expert Settings of the relevant fields (see section 3.6).

• OData defines so-called complex data types. This is a grouping of several simple data type fields into one of a new complex data type. For example, the fields Street, Postal code and Town could be summarized into a complex data type Address. Since Intrexx does not recognize complex data types, these will be converted to several Intrexx data fields. In order to guarantee the uniqueness of the name of such a field, the name is created from the components <Name of the complex data type>/<Fieldname>, so, for example, Address/Town.

4.3. References

4.3.1. 1:1 Relationships In Intrexx, references can be made to any data groups (Applications I). Where the output data group and the referenced data group are both foreign data groups from an OData connection, then a 1:1 relationship can be established between these, provided that a corresponding relationship is defined in the service metadata.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 16

With a 1:1 relationship between two OData foreign data groups (OData terminology: Entity Sets) no primary and foreign keys need to be determined. In OData references, the relationship type is determined and selected directly from the metadata of the OData Service. Thus, for example, the possible relationships between a seminar and a room booking are automatically determined by the OData Adapter from the service metadata and made available for selection. Then click on Next. The data fields required can be selected in the next step. For more information, see the Applications I handbook.

4.3.2. 1:n Relationships Relationships of type 1:n between OData data groups are represented with parent data groups (e.g. Flights) and subordinate child data groups (e.g. Bookings) in Intrexx. If you establish the database connection in the properties of the child data group, and select the corresponding OData Collection (Table), then the potential 1:n relationships will be made available for selection.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 17

In the next step, the data fields for the child data group can be selected. It will then be possible to display dependent records from child data sets in view tables on view and input pages of the parent data groups.

4.3.3. m:n Relationships The Velocity Callable ODataLinksCallable can be used to create and remove m:n relationships between two OData foreign data groups. Creation of an m:n Relationship $ODataLinksCallable.createLink(<Configuration GUID>, <Service GUID>, <Impersonation GUID>, <Source DG GUID>, <Source_Record_ID>, <Target Navigation Property>, <Target DG GUID>, <Target_Record_ID>)

Removal of an m:n Relationship $ODataLinksCallable.deleteLink(<Configuration GUID>, <Service GUID>, <Impersonation GUID>, <Source DG GUID>, <Source_Record_ID>, <Target Navigation Property>, <Target DG GUID>, <Target_Record_ID>)

The following parameters are required:-

• Configuration GUID: The GUID of the OData configuration • Service GUID: The GUID of the OData Service • Impersonation GUID: The GUID of an impersonation user, or “null” for the current

user • Source DG GUID: The GUID of the source data group • Source Record ID: The ID of the source data record • Target Navigation Property: The name of the OData Navigation Property which

defines the relationship • Target DG GUID: The GUID of the target data group • Target Record ID: The ID of the target data record

4.4. Files

4.4.1. Binary data fields OData data fields of the type Edm.Binary (BLOB) will be treated as data type File in Intrexx. This enables binary data to be stored in Intrexx file fields. Since it is not possible to determine automatically from OData the file type of binary fields, the file type can be stored in the Expert Settings of the data field.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 18

This will automatically be used as the filename extension when the binary data is saved. Currently, only one file type per field can be defined for all data records. For accessing and manipulating files, OData, from Version 2.0, offers Media Link Entries. These are the recommended method for accessing binary data and are described in the following chapter. Another possibility to enable downloading of the contents of binary fields uses the Callable Method $OdataMediaResourceCallable.getDownloadURIForBinaryProperty(). This generates a URL, which can be inserted in a download link on an entry or view page. <a target="_blank" href="$ODataMediaResourceCallable.getDownloadURIForBinaryProperty($ProcessingContext, $DC.getRecId(), '<GUID_DATENGRUPPE>', ‘<BINARY_PROPERTY NAME>’, ‘<FILE_NAME>’,’CONTENT_TYPE’, '<DISPOSITION_TYPE>')">Download File</a>

With this method it is possible to define the filenames and content type dynamically, while these values are ascertained from other data fields.

4.4.2. Media Link Entries An entity type can be defined as a Media Link Entry in an OData Service. This type of entity is marked with the attribute HasStream in the service metadata document. The fields of a Media Link Entry then describe a so-called Media Resource, which can in turn be any file type, such as a document, an image or a Video-/Audiostream. An Entity Collection of type Media Link Entry is then a collection of files, whereby one Media Link Entry describes just one file. In contrast to BLOB fields, where the entire file is included as a binary (Base 64 encoded) data structure along with the other data fields in the XML response document, only the URL of the Media Resource (i.e. the file) can be obtained from a query of the Media Link Entry. Using the URL, the file can then be accessed in a browser or downloaded in the conventional manner. Since the file is not embedded as code in an XML document, Media Link Entries offer a much more efficient mechanism for accessing files.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 19

Since a Media Link Entry describes not only the file itself (Metadata) but also the access path to the file on the server, two HTTP requests are necessary for a query of the metadata and the download of the file. Similarly for the creation of a new Media Link Entry, for example, if a new file is to be uploaded via the OData Service, or an existing file needs to be updated. In the following section, the steps to enable the display or download of a file from Media Link Entries in Intrexx will be described, and to save other files as Media Link Entries on the OData server. Display/download of files from Media Link Entries Since the metadata fields of a Media Link Entry consist of ordinary OData data fields, these can be represented in the usual manner on a view or edit page in Intrexx. To enable the display or download of a Media Resource, a link for the resource must first be generated, which calls an Intrexx Servlet, which in turn requests the file via the OData Service, and forwards it to the browser. Thus the adapter includes a special Velocity Callable, which prepares the link in a manner such that it can be embedded in view/edit pages. Therefore, on a view page, (subordinate to an OData data group for Media Link Entries), create a Static Text for Programming element. For a download link, the call to the Velocity Callable will be defined as follows:- <a target="_blank" href="$ODataMediaResourceCallable.getDownloadURI($ProcessingContext, $DC.getRecId(), '<GUID_DATENGRUPPE>', $DC.getValueHolder('<Kontroll-Name des Felds mit Dateiname>').getValue(), 'inline')">Download Media Resource</a>

This code generates a link on the display page for the download of the Media Resource. Thereby, the following parameters can be passed to the Callable:

1. $ProcessingContext: the current processing context object. 2. Record ID: The ID of the Media Link Entry data record. 3. Data group GUID: The GUID of the data group which contains the Media Link Entry. 4. File name: Optionally, a file name for the download can be included here. This will be

displayed in the browser as a pre-selection when the file is saved. In the example

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 20

above, the file name is obtained from a field on the view page, which is populated via the metadata of the Media Resource. If no such field is available, a null value can be passed.

5. Content Disposition Type: This (optional) value specifies the Content Disposition Type of the download, that is, whether the file should be embedded direct in the browser (value ‘inline’), or if it should only be available as a download (value ‘attachment’). This value is optional, and can also be specified as ‘null’.

Since the Velocity Callable only returns a URI to the Media Resource, this can be used flexibly in various HTML controls (e.g. as a link in <a href=“…“/> or as an image file in <img src=“…“/>). The following screenshot demonstrates the integration of an image file as both a download link, and as a directly embedded image:

Upload of files as Media Link Entries Saving and updating of files as OData Media Resources can be accomplished with an edit page associated with a Media Link Entry data group. The data fields for the Media Resource metadata can be placed on this page in the usual manner. The upload of the actual file is controlled by a File Selection element. Proceed as follows:

1. Place a new File Selection element on the edit page, and in the properties, under Data field link, select No link.

2. In the Expert settings of the element, replace the entry for the attribute name with the value odataMediaResource.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 21

3. In the Expert settings of the Save button on the edit page, a new attribute is required. The name of the attribute is rq_odaction. The value upload needs to be entered.

Through this request value, two OData requests will automatically be created when the data record is saved. Initially, a Media Link Entry for the uploaded file will be created through the OData service. Subsequently, with a second request, the values from the data fields on the edit page will be saved as metadata for the Media Link Entry. As a result of the architecture, during both upload and download of files between the browser and the OData server, the file must initially be cached on the Intrexx portal server. In the case of very large files, this can lead to resource shortages (especially the portal server main memory) and performance problems. In this situation, the URIs to the Media Resources should be obtained direct from the OData Feed Entry and integrated in the application page,

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 22

so that access from the browser to the file is made directly via the OData server. In particular, Video and Audio stream resources can only be integrated in this manner.

4.5. OData Function Imports Besides access to Entity Collections (tables) OData also offers the facility to define Function Imports, and to run these via the Service. Function Imports can be compared with stored procedures in database management systems, and can receive input parameters, and return a single record or a set of records as results. Since Intrexx offers no direct support for stored procedures, the following procedure must be used for calling function imports:

1) Determine the name of the function to be called from the metadata of the Service (e.g. „GetProductsWithRating“), the required input parameters, whether the result comes from a single record (OData Entry) or from a set of results (OData Entity Set), and the entity type (table in the Intrex data group) of the result.

2) Create a view page for the parameters of the function, and a further view page to

display the results of the function call.

3) On the view page for the function parameters, insert an input field with the appropriate data type for each parameter, but with no data field mapping, and a button to go to the view page with the results.

4) On the results page, create a view table (in the case of a result set), select the appropriate data group (depending on function return type), and the data fields to be displayed.

5) Now go to the Expert settings of the view table and define the following settings:

6) odata.functionImport.name: function name (from the Service metadata)

7) odata.functionImport.parameterFieldGuid: List of field GUIDs for the function

parameters.

8) odata.functionImport.parameterName: List of parameter names (from the Service metadata)

Please note that the order of field GUIDs and parameter names in the two lists must match exactly.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 23

4.6. Expert Settings For the advanced configuration of controls and elements with links to OData external data sources, expert settings can be defined for the controls. For OData the following settings are available: Data groups:

• odata.dataGroup.consumerCfgGuid GUID of the OData foreign data source configuration (see Integration Manager).

• odata.dataGroup.consumerServiceGuid GUID of the OData Services within the OData configuration.

• odata.dataGroup.impersonateUserGuid GUID of the Intrexx user to be used to execute data group actions.

• odata.dataGroup.mergeMethod Defines the HTTP verb to use for update actions (either PUT or MERGE, MERGE is default).

• odata.dataGroup.entityType Fully Qualified Name of the OData Entity Type for this data group.

• odata.dataGroup.entityName Name of the OData Entity for this data group.

• odata.dataGroup.entitySet Name of the OData Entity Set for this data group.

• odata.dataGroup.supports.pagination • Defines whether the OData service to query result sets supports pagination. By

default, Intrexx supports pagination. This requires that the service supports querying the number of records via $count. If this is not the case, this value can be set to false.

• odata.dataGroup.supports.sorting Defines whether the OData service supports sorting of result sets. By default, Intrexx supports sorting. If the service does not support this, this value can be set to false.

• odata.dataGroup.supports.inlinecount Defines whether the OData service can provide the number of data records as well as the number of results.

• odata.dataGroup.supports.fieldselection Defines whether the OData service supports a selection of data fields for queries. By default, this value is set to True. If the service does not support this, the value can be set to False, so that all available fields will be retrieved.

• odata.dataGroup.navigationProperty Name of the navigation property for 1:1 or 1:n relationships.

Data fields:

• odata.field.fileExtension Defines filename extension to be used for file data fields (e.g. "jpg").

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 24

odata.field.dataType Defines the OData data type to be used for the field (overrides automatic assignment of the data type).

View tables:

• odata.functionImport.name Defines the name of the OData service function to be called.

• odata.functionImport.parameterName List of function parameter names.

• odata.functionImport.parameterFieldGuid List of field GUIDs for the determination of function parameter values.

• odata.customQueryOptions Map for the assignment of values as Custom Query Options. The key to the map is the query option name, either a field GUID or a fixed value can be entered as a value. In the case of a field GUID, the value for the Custom Query option is determined from the field with the corresponding GUID at run time.

4.7. Export of OData connections When an Intrexx application references OData services, these configurations can be included in the export package for an export of the application. When you start the export of the application, you will automatically be asked during the export process, whether the OData configuration should also be exported.

Choose the configuration to be included in the export package. Then click Next.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 25

Here you see the individual components that are included in export packages. If you click on the Show description link, the previously selected OData connection is displayed. For all further information on the topic Import and Export, please see the Applications I handbook.

5. Processes Access to data from the SAP system can also be achieved using processes. The following scenarios are identified: As an interactive user A process is initiated by any triggering data record event, and then performs the appropriate actions. In this case, the process can only access SAP data with the SAP user of the currently logged on Intrexx user. Use with timer events In the case of timer events, there is no interactive user. In this case, a predefined user can be selected via a convenient dialogue – a user, who, in the user context of the SAP system, can perform the required additional workflow actions. If the process manager has recognised the selected data set as a connection to SAP NetWeaver Gateway, a user, in whose context the requests will be performed, can be defined in this dialog.

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 26

The option Static user activates the link to select an Intrexx user. Clicking this link will open a dialog in which Intrexx users can be selected. It should be noted that a valid user mapping for that user must already be established in the OData configuration (additional users). With the option User from system value the system value must include an user GUID. A valid user mapping in the OData configuration must also be established. Click on Edit system value, to define the system value in a further dialog ( Processes). Using the Change user action, the user can be changed during the running of the process ( Processes). If a static user is associated with both the data group and the process, in principle the user in the data group has priority.

6. Troubleshooting

6.1. Error messages If errors occur during an OData request, Intrexx tries to identify the error messages from the response of the service, and display them in the browser. This is not possible in all cases. For a more detailed error analysis, it is therefore possible to enable OData Request Tracing in the Intrexx Portal Server. This is described in the following chapter.

6.2. Request Tracing When Request Tracing is activated, both the OData requests and the responses are written in detail to the Intrexx portal log file. For requests, an entry consists of the HTTP action, the URL, the query option, the request headers and XML body. For responses, the HTTP headers and XML body of the response will be recorded. Tracing is enabled as follows:

1. Open the „log4.properties“ file from the <INTREXX_HOME>/org/<PORTAL_NAME>/internal/cfg folder with your chosen text editor.

2. Navigate to the „logging for OData“ section, and change the value from INFO to DEBUG:

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 27

# logging for OData log4j.logger.de.uplanet.lucy.server.odata.consumer=DEBUG, File log4j.additivity.de.uplanet.lucy.server.odata.consumer=false

3. Restart the portal server service. 4. The request details of any OData action will now be logged in the portal.log file.

Example of a Request/Response Tracing Entry: DEBUG 2012-07-02 11:45:26,173 - OData request: GET http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/FlightCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-02-01T00:00:00')/FlightBookings?$orderby=BookingID+asc&$select=FlightDate,Reserved,CustomerID,Title,BookingDate,PassengerDateOfBirth,Smoker,FlightClass,CustomerType,TravelAgencyID,FlightConnectionID,LuggageWeight,AirLineID,PassengerName,BookingID,Cancelled&$top=20&$skip=0 Accept: application/xml DataServiceVersion: 2.0 User-Agent: intrexx Authorization: ***** DEBUG 2012-07-02 11:45:26,573 - de.uplanet.lucy.server.odata.consumer.jersey.LoggingBehavior[WebConnectorWorker-localhost:8102-1] OData response: Status: 200 content-type: application/xml; charset=utf-8 etag: version 01 Date: Mon, 02 Jul 2012 09:45:26 GMT set-cookie: MYSAPSSO2=AjQxM..; path=/; domain=.esworkplace.sap.com content-length: 29275 Keep-Alive: timeout=15, max=92 dataserviceversion: 2.0 Connection: Keep-Alive Server: SAP NetWeaver Application Server / ABAP 702 <feed xml:base="http://GW.ESWORKPLACE.SAP.COM:80/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <id>http://GW.ESWORKPLACE.SAP.COM:80/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/BookingCollection</id> <title type="text">BookingCollection</title> <updated>2012-07-02T09:45:26Z</updated> <author> <name /> </author> <link href="BookingCollection" rel="self" title="BookingCollection" /> <entry m:etag="W/&quot;datetime&apos;2011-11-13T00%3A00%3A00&apos;&quot;"> <id>http://GW.ESWORKPLACE.SAP.COM:80/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/BookingCollection(AirLineID=&apos;AA&apos;,FlightConnectionID=&ap

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 28

os;0017&apos;,FlightDate=datetime&apos;2012-02-01T00%3A00%3A00&apos;,BookingID=&apos;00000001&apos;)</id> <title type="text">BookingCollection(AirLineID=&apos;AA&apos;,FlightConnectionID=&apos;0017&apos;,FlightDate=datetime&apos;2012-02-01T00%3A00%3A00&apos;,BookingID=&apos;00000001&apos;)</title> <updated>2012-07-02T09:45:26Z</updated> <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="RMTSAMPLEFLIGHT_2.Booking" /> <link href="BookingCollection(AirLineID=&apos;AA&apos;,FlightConnectionID=&apos;0017&apos;,FlightDate=datetime&apos;2012-02-01T00%3A00%3A00&apos;,BookingID=&apos;00000001&apos;)" rel="edit" title="Booking" /> <content type="application/xml"> <m:properties> <d:AirLineID>AA</d:AirLineID> <d:FlightConnectionID>0017</d:FlightConnectionID> <d:FlightDate>2012-02-01T00:00:00</d:FlightDate> <d:BookingID>00000001</d:BookingID> <d:CustomerID>00001302</d:CustomerID> <d:CustomerType>P</d:CustomerType> <d:Smoker>false</d:Smoker> <d:LuggageWeight>17.4000</d:LuggageWeight> <d:FlightClass>C</d:FlightClass> <d:BookingDate>2011-11-13T00:00:00</d:BookingDate> <d:TravelAgencyID>00000114</d:TravelAgencyID> <d:Cancelled>false</d:Cancelled> <d:Reserved>false</d:Reserved> <d:PassengerName>Dominik Simon</d:PassengerName> <d:Title /> <d:PassengerDateOfBirth>2012-07-02T00:00:00</d:PassengerDateOfBirth> </m:properties> </content> </entry> …

6.3. Unsupported OData functions While Intrexx offers support for all major functions of the OData specification version 2.0, there may be circumstances when a service does not support certain features. In this case, there will either be a failure, or a query will not deliver the expected result. Since the OData specification of the services implemented provides considerable flexibility, in terms of support of features, in such a case, only the Intrexx application can be adjusted so that only the functions supported by the service are used. Examples of such cases are filter definitions, site navigation (pagination) or sorting. Using the appropriate Expert settings as described in Section 3.6, problematic OData features can be deactivated. If certain filter definitions are not supported, the filter must be adjusted accordingly in Intrexx, or simplified.

6.4. SSL Connections For SSL connections between the Intrexx portal server and an OData service, the certificate of the Certificate Authority that issued the service certificate, must have been added to the certificate store of the Intrexx Portal server. An exception applies to self-signed certificates, which were not issued by a recognised Certificate Authority. To enable SSL connections to services with self-signed certificates, the

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 29

testing of the "Certificate Chain" in the Intrexx server must be disabled in this case. This is possible at service level through a system property. Open the File <INTREXX_HOME>/org/<PORTAL_NAME>/internal/cfg/portal.cfg with a text editor, and in the <environment> section, add a new <systemProperty> entry, thus: <systemProperty name = "de.uplanet.lucy.server.odata.consumer.ssl.allowSelfSignedCerts.<SERVICE_GUID>" value="true"/>

The placeholder <SERVICE_GUID> should be replaced with the GUID of the OData services. The GUID can be found in the service configuration file <INTREXX_HOME>/org/<PORTAL_NAME>/ internal/cfg/odata. After saving the portal.cfg file, the Intrexx Portal Server service must be restarted for the changes to take effect.

7. Appendix

7.1. OData Specification A description of the OData protocol and the OData specification is available at the following URL: http://www.odata.org/

7.2. OData Tools The following tools have been found to be helpful for the creation of applications, and problem analysis:

• Firefox RESTClient This Firefox plugin allows OData requests to be run and analysed within the browser. This is useful, especially for error analysis. Thus, with Request Tracing enabled, the OData HTTP request may be copied from the Intrexx portal.log and executed in the REST client, and in cases of failure, can be adjusted to avoid unsupported functions. https://addons.mozilla.org/de/firefox/addon/restclient/

UNITED PLANET - INTREXX ENTERPRISE PORTAL - SAP NETWEAVER GATEWAY ADAPTER - RELEASE 6 30

• Silverlight OData Explorer A further tool for running and analysing OData requests in the browser (requires Microsoft Silverlight Plugin). http://www.silverlight.net/content/samples/odataexplorer/default.html

• SAP NetWeaver Gateway For further information on SAP NetWeaver Gateway, test environments, documentation and How-Tos, see the SAP Community Network. http://scn.sap.com/community/netweaver-gateway

• Microsoft Visual Studio 2010 With the Microsoft Visual Studio 2010 development environment, your own OData services, based on existing databases, can be quickly generated and deployed via the Microsoft Internet Information Server. http://msdn.microsoft.com/de-de/library/cc668792.aspx

©2012 United Planet. All rights reserved. www.unitedplanet.com. Intrexx and United Planet are registered trademarks of

United Planet, Freiburg - Germany. All manufacturers, products and services mentioned in this text are trademarks or registered trademarks of their respective companies in Germany and other countries worldwide.