Connector for SAP Gateway - Appendix
Troubleshooting
Error Messages
If errors occur during an OData request, Intrexx attempts to identify the error messages from the service's response and display them in the browser. This is not always possible in every case. For a more detailed error analysis, it is therefore a good idea to enable OData request tracing in the Intrexx Portal Server. This is described below.
Request Tracing and Error Logging
When request tracing is enabled, both OData requests and responses are logged in detail in the Intrexx portal log file. For requests, an entry consists of the HTTP method, the URL, the query parameters, the request headers, and the XML body. For responses, the HTTP headers and the response XML body are output. Tracing is enabled as follows:
-
Open the log4.properties file from the portal directory internal/cfg using a text editor of your choice.
-
Navigate to the "logging for OData" section and change the value from INFO to DEBUG:
# logging for OData log4j.logger.de.uplanet.lucy.server.odata.consumer=DEBUG, Filelog4j.additivity.de.uplanet.lucy.server.odata.consumer=false
-
Restart the portal service.
For every OData operation, the request details are now logged in the portal.log file. Example of a Request/Response Tracing entry:
DEBUG 2012-07-02 11:45:26,173 -
OData request:
GET https://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 Gateway Application Server / ABAP 702
<feed xml:base="https://GW.ESWORKPLACE.SAP.COM:80/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://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/"datetime'2011-11-13T00%3A00%3A00'""> <id>https://GW.ESWORKPLACE.SAP.COM:80/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/BookingCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-02-01T00%3A00%3A00',BookingID='00000001')</id> <title type="text">BookingCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-02-01T00%3A00%3A00',BookingID='00000001')</title> <updated>2012-07-02T09:45:26Z</updated> <category scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="RMTSAMPLEFLIGHT_2.Booking" /> <link href="BookingCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-02-01T00%3A00%3A00',BookingID='00000001')" 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>...
Unsupported OData Features
s While Intrexx supports all essential features of the OData specification version 2.0, there may be cases where a service does not support certain features. In this case, either an error occurs or a query does not return the expected result. Since the OData specification allows implementing services a relatively wide range of flexibility regarding feature support, in such a case the Intrexx application can only be customized to use only those functions supported by the service. Examples of such cases include filter definitions, page navigation (pagination), and sorting. You can disable problematic OData features using the corresponding expert settings. If certain filter definitions are not supported, the filter must be adjusted or simplified accordingly in Intrexx.
Appendix
SSL connections
For SSL connections between the Intrexx portal server and an OData service, the certificate from the certificate authority that issued the service certificate must have been added to the Intrexx portal server's certificate store. Self-signed certificates—which are not issued by a known certificate authority—are an exception. To enable SSL connections to services using self-signed certificates, you must disable the "Certificate Chain" validation on the Intrexx Portal Server in this case. This can be done at the service level using a system property. To do this, open the portal.cfg file in the portal directory internal/cfg using a text editor and add a new <systemProperty> entry to the <environment> section:
<systemProperty name = "de.uplanet.lucy.server.odata.consumer.ssl.allowSelfSignedCerts.<SERVICE_GUID>;" value="true"/>
Replace the placeholder <SERVICE_GUID> with the GUID of the OData service. You can find the GUIDs in the service configuration file in the portal directory `internal/cfg/odata`. After saving the portal.cfg file, you must restart the Intrexx Portal Server service for the changes to take effect.
OData Specification
You can find a description of the OData protocol and the OData specification here.
OData Tools
The following tools have proven helpful in application development and problem analysis:
-
Postman API Client
You can find all the information here.
-
Silverlight OData Explorer
Another tool for running and analyzing OData queries in the browser (requires the Microsoft Silverlight plugin), which you can download here.
-
SAP Gateway
For more information on SAP Gateway, test environments, documentation, and how-to guides, visit the SAP Community Network.
-
Microsoft Visual Studio 2010
Using Microsoft's Visual Studio 2010 development environment, you can easily generate your own OData services based on existing databases and make them available via Microsoft Internet Information Server. You can download it here.