A few mothns ago I had to enable some chiper suites for the SAP netweaver server to support the old communication for some web services. In this entry I would like to share with you how I did it.
How to validate supported chipher suites on the server
The must simple way to do it is using the xpi_inspector tool, set target url and execute the analyse to get the report.
When the analyse is stopped the Enabled chiper suits list is showed with the handshake error during the negotiation, the default chiper suites are described in SAP note 2284059 – Update of SSL library within NW Java server:
Hi! this is a quick tip, whenever that we used a java UDF into a message mapping it could be possible to print log trace message during the tests using the AbstracTrace object.
This is an example of one function to print a file name using the level info:
In this entry I would like to share how I’ve configured a SFTP receiver adapter with Dual authentication (using Password and a ssh key file), in this case I’ve received the key file from another team (created with puttygen in a file with extension .ppk) and I’m going to convert and import it into the Key Manager of SAP PO.
Let’s get started.
1.Export private key in OpenSSH format, open PuttyGen and choose menu Conversions > Import key and select the ppk file, then go back to Conversions > Export OpenSSH key and save the private key. The output file must be something like this:
$ openssl req -new -x509 -days 9999 -key private.key -out cert.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:MX
State or Province Name (full name) [Some-State]:Ciudad de Mexico
Locality Name (eg, city) []:CDMX
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Dummy
Organizational Unit Name (eg, section) []:IT Dummy
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
Hi in this entry I would like to share a quick tip to create the XSD Data Type from ABAP table structure with a lot of fields using a funtion module to save time.
Recently I had to create some structures in SAP PO from different ABAP tables, in order to simplify the process I’ve donwloaded the required table data using a function module as follow:
1. Go to SE37 transaction and execute the function DDIF_TABL_GET, then set the import parameters (table name and language):
Hi, in this entry I would like to share the source code that I’ve used to develop a service interface which must to authenticate with a OAuth service.
I know there is an option to manage the authtentication by default into the receiver REST adapter, but it only works if the OAuth service have a specific response structure, like this:
Unfortunately I don’t have that structure because my auth provider have something custom with their own fields, also I must to renew the authentication token every 20 minutes. So then, my only option to handle this is using a UDF into Message Mapping and not use the deafult functionality in the adapter.
This time I want to share how I developed a service interface to consume a REST API using the PUT method. The web service could accept different inputs:
Text plain xml request
xml request with gzip compression
xml request with no body payload and attached a zipped xml payload
xml request with no body payload and attached a xml payload
And also I need to send the parameter async and it could change the structure of the JSON responses, something like this:
// HTTP 200 response, sent zipped request with async=true
{"jobReference": "12345"}
// HTTP 200 response, sent zipped request with async=false
[{
"entityName": "brand",
"acceptedCount": 14
}]
// HTTP 200 response, sent xml request with async=false
[]
// HTTP 200 response, sent xml request with async=true
{"jobReference":"47671"}
And we need to consider the possible errors:
// HTTP 401 response, Unauthorized
{
"messageText": "com.enactor.core.web.authentication.exceptions.AuthorisationException: Basic authentication header missing in the request.",
"errorCode": "Unauthorized"
}
{
"messageText": "com.enactor.core.web.authentication.exceptions.AuthorisationException: Failed to authorize request with user dummy",
"errorCode": "Unauthorized"
}
// HTTP 200 reponse, invalid content
[{
"entityName": "brand",
"rejectedCount": 2,
"rejectedReasons": [
{
"key": "groupTypeId=brand;groupId=;groupHierarchyId=;",
"rejectionCode": "ENTITY_BLANK_KEY",
"rejectionDescription": "Entity has blank key"
},
{
"key": "groupTypeId=brand;groupId=;groupHierarchyId=;",
"rejectionCode": "ENTITY_BLANK_KEY",
"rejectionDescription": "Entity has blank key"
}
]
}]
// HTTP 30X ,40X, 500 responses,
// no JSON response available
And something else, the xml file, no matter if is it sended into a zip or direct into the payload, must use two different prefixes with different namespace and some attributes, something like this:
After upgrade the SAP PO we noticed an excessive workload for IDoc Receiver Adapters consuming a lot of memory and writing multiple error entries into the channel log with this message «Target Destination unavailable«, but the RFC destination exists and their parameters are correct, the connection was successfully.
So, looking into the Logviewver there are a lot of errors with the message:
«Error while getting connection factory name from JNDI due to Object not found in lookup of MetaCFLookupPrefix«
This is quick entry, I have a lot of error entries in the Logviewver for some services that are using a File Sender Adapter with FTP protocol:
«520 Unexpected reply codeControl connection prematurely closed by server«
Looking into SAP launchpad I have found the note 2462145 – FTP error when file is missing in Source Directory, it mention that error is generated when the FTP server retrives a different code in reply, and it could be fixed with an update of the support package.
This is an example to show how to deploy a SCA file dowloaded from SAP Lauchpad, it is very important that you must to read the compatibility and the requirements before to upgrade any component, so please, be careful with this.
Validate and download the Component
First, in order to know what versions do you have installed in the system go to http://[host]:[port]/nwa/sysinfo and search the name of the component, into the version field is the base number and the support package, the next image shows the component XI_CNT_SAP_BASIS with the versión 7.5 SP 27:
Then go to SAP Launchpad and search the component into the top search bar and click on download icon, and select your corresponding base version (for me is 7.50):
This is a quick entry, after the upgrade de SAP PO from 7.5 SP 02 to 7.5 SP 27, a quite few REST services started to fail.
Doing some research I have noticed that it is because the authtentication parameter it is not included when the request are sended. To detect this behavior I had to use the XPI Inspector tool to get the logs from request and response.
It look like this:
Into the header is missing the authentication parameter, so I found a SAP Note 2952313 – REST Adapter with Basic Authentication fails after update/upgrade to Netweaver 7.50 SP17 or higher, the title is described it self.