release-notes-30-to-44
3.44.1 - May 6, 2021
Compatibility Notes
- The OpenAPI Generator no longer adds the prefix
src/main/javato the output directory. Thus, you need to explicitly add this part to the output directory if you need it.
New Functionality
- We enhanced the SAP BTP Workflow API client library to reflect the latest state of this SAP BTP service.
- We introduced a new CLI wrapper for the OpenAPI generator that can be used without having to set up a Maven project.
Improvements
- Dependency Updates:
- Minor version updates:
- Update Reactor from
3.4.4to3.4.5 - Update Protobuf Java from
3.15.7to3.15.8 - Update PMD from
6.32.0to6.33.0 - Update JPaaS Security Utils for Neo from
1.4.89to1.4.90 - Update Jackson from
2.12.2to2.12.3
- Update Reactor from
- Minor version updates:
Fixed issues
- The OpenAPI Generator no longer adds the prefix
src/main/javaunexpectedly to the output directory. - The OpenAPI Generator generates the equals method for model classes now with an argument annotated as
@Nullable. - We fixed an issue where the user JWT token was not sent to destinations that use the SAMLAssertion authentication method.
- For HTTP destinations with the authentication type OAuth SAML Bearer Assertion Flow the destination key store is no longer used for the TLS handshake.
3.43.0 - April 22, 2021
New Functionality
-
We added a new API for creating OData v2 Changesets in Batch requests that mimics the existing OData V4 API. As a natural outcome, this new API also supports custom headers on a per-request basis.
Example usage:
// define modification requests including custom headers per request
MyEntityCreate createRequest = new MyEntityCreate(myNewEntityInstance).withHeader("custom-header", "value");
MyEntityUpdate updateRequest = new MyEntityUpdate(myUpdatedEntityInstance).withHeader("another-custom-header", "another value");
// assemble batch request by adding both modifications into a single changeset
MyEntityBatch batchRequest = new MyEntityBatch().addChangeSet(createRequest, updateRequest);
// execute the batch request
BatchResponse response = batchRequest.executeRequest(myDestination);
Improvements
- Dependency Updates:
- Minor version updates:
- Update Netty from
4.1.60.Finalto4.1.63.Final - Update Lombok from
1.18.18to1.18.20 - Update Jetty from
9.4.38.v20210224to9.4.39.v20210325 - Update Bouncycastle from
1.64to1.68 - Update Error Prone from
2.5.1to2.6.0 - Update Java JWT from
3.14.0to3.15.0 - Update Protobuf from
3.15.6to3.15.7 - Update Apache CXF from
3.3.8to3.3.10 - Update Mockito from
3.8.0to3.9.0
- Update Netty from
- Minor version updates:
3.42.0 - April 8, 2021
New Functionality
-
We improved OData v4 update requests that use the PATCH HTTP method. Now they allow adding complex properties without the need to use setters for each value inside the complex property. You can use the builder pattern or the constructor to propagate the property values.
Before:
Entity entity;
ComplexProperty property = new ComplexProperty();
property.setValue("Foo");
entity.setComplexProperty(property);Now:
Entity entity;
entity.setComplexProperty(new ComplexProperty("Foo"));Transitive changes inside a complex property will automatically be detected.
-
The OData v2 generator is able to maintain argument order in function imports and get-by-key fluent helpers over successive generations, even when the originating specification changes parameter order. This is now a default behavior. It can be disabled by adding the flag to the plugin configuration:
<keepExistingSignatures>false</keepExistingSignatures> -
We updated the OData v2 type-safe client (VDM) for the services that couldn't be generated because of the parameters re-ordering issue mentioned above. Now you can use them as any other service. Find the list below:
- Purchase Requisition - API_PURCHASEREQ_PROCESS_SRV
- Production Order Confirmation - API_PROD_ORDER_CONFIRMATION_2_SRV
- Process Order Confirmation - API_PROC_ORDER_CONFIRMATION_2_SRV
- Attachments - API_CV_ATTACHMENT_SRV
The collection of released SAP S/4HANA Cloud client libraries from the SAP Cloud SDK is now consistent with the set of OData services that you can find in the SAP Business Accelerator Hub for SAP S/4HANA Cloud.
Improvements
-
We enabled the OpenAPI generator to consider the vendor extension field
x-sap-cloud-sdk-api-namein an OpenAPI specification on the operation, path, or on the root level. -
We enabled the OpenAPI generator to remove the suffix
api(regardless of the case) from the extension field value ofx-sap-cloud-sdk-api-name, if present. -
Dependency Updates:
- SAP dependency updates:
- Update SCP Neo Java TomEE7 API from
1.93.10.2to1.94.8
- Update SCP Neo Java TomEE7 API from
- Other dependency updates:
- Minor version updates:
- Update Reactor from
3.4.3to3.4.4 - Update Protobuf from
3.15.1to3.15.6 - Update JooQ from
3.14.7to3.14.8 - Update PMD from
6.31.0to6.32.0 - Update Hibernate Core from
5.4.28.Finalto5.4.30.Final - Update Guava from
30.1-jreto30.1.1-jre - Update Togglz from
2.8.0to2.9.6
- Update Reactor from
- Minor version updates:
- SAP dependency updates:
3.41.0 - March 25, 2021
New Functionality
-
We added a convenience method to configure the proxy authorizations when building a custom
DefaultHttpDestination. The.proxyAuthorization("value")will sendvaluewithin theProxy-Authorizationheader, unless that header is already set. -
The OpenAPI generator now supports the vendor extension field
x-sap-cloud-sdk-api-namein an OpenAPI specification. By default, the OpenAPI generator uses thetagof an operation to determine the Java service class name. In case you're not happy with the name generated from thetagfield, and changing it is not possible, you can addx-sap-cloud-sdk-api-namevendor extension to theoperationsection of the specification. This vendor extension will be used by the generator to derive the Java service class name. -
Enable OData requests to skip the CSRF token retrieval if the server does not require it. Use the method
withoutCsrfToken()to disable the CSRF token retrieval. -
We provided experimental support for OData v2 read requests as items in a Batch request. The API is unified and similar to the OData v4 Batch request:
BusinessPartnerService service = new DefaultBusinessPartnerService();
BusinessPartnerFluentHelper readOperationAll = service.getAllBusinessPartner().top(10);
BusinessPartnerByKeyFluentHelper readOperationByKey = service.getBusinessPartnerByKey("bupa9000");
BatchResponse response = service.batch()
.addReadOperations(readOperationAll)
.addReadOperations(readOperationByKey)
.executeRequest(destination);
List<BusinessPartner> entities = response.getReadResult(readOperationAll);
BusinessPartner entity = response.getReadResult(readOperationByKey);
Improvements
- Dependency Updates:
- SAP dependency updates:
- Update SCP Neo Java Tomcat API from
3.123.6.2to3.124.9.2 - Update SCP Neo Java TomEE7 API from
1.92.6.2to1.93.10.2 - Update SAP CP Spring XSUAA Security Library from
2.8.4to2.8.7
- Update SCP Neo Java Tomcat API from
- Other dependency updates:
- Minor version updates:
- Update Spring from
5.3.3to5.3.4 - Update Spring Security from
5.4.2to5.4.5 - Update Jetty BOM from
9.4.36.v20210114to9.4.38.v20210224 - Update Woodstox Core from
5.0.3to5.3.0 - Update Netty from
4.1.59.Finalto4.1.60.Final - Update Java JWT from
3.13.0to3.14.0 - Update Jackson from
2.12.1to2.12.2 - Update Apache Commons Lang from version
3.11to3.12.0 - Update JSON from version
20201115to20210307 - Update Jackson from version
2.12.1to2.12.2
- Update Spring from
- Minor version updates:
- SAP dependency updates:
- The OData type-safe client (VDM) for OData V4 services of newest release 2102 of SAP S/4HANA Cloud and FPS1 of SAP S/4HANA On-Premise 2020 now also supports static fields for accessible properties on
VdmComplextypes.
Fixed issues
-
We fixed an issue with OData V2 read requests where an error message was incorrectly written to the log when using filters. The error messages are no longer logged unless it is applicable:
Registered custom filter expression cannot be used when performing the OData V2 request with toRequest() or executeRequest().
Registered custom filter expression cannot be used when performing the OData V2 request with execute().
-
Fix an issue with OData response handling where deserialization of one-to-many properties failed for primitive and complex data types.
3.40.0 - March 18, 2021
Known issues
- Update requests via PATCH in OData V4 will not contain any changes to complex properties of an entity. This is a feature gap we plan to solve in the upcoming release.
Compatibility Notes
- The general availability of the OpenAPI generator brings the following renamings:
- The following dependencies in the Maven Group ID
com.sap.cloud.sdk.datamodelhave been renamed:- Rename dependency
rest-coretoopenapi-core - Rename dependency
rest-generatortoopenapi-generator - Rename dependency
rest-generator-maven-plugintoopenapi-generator-maven-plugin
- Rename dependency
- The Maven Plugin has been renamed from
rest-generator-maven-plugintoopenapi-generator-maven-plugin
- The following dependencies in the Maven Group ID
New Functionality
-
The OData v4 type-safe client (VDM) generator now generates static fields for accessible properties on
VdmComplextypes, which can be used exactly like their counterparts onVdmEntitywhen building OData queries. -
You can clear the cache for remote functions with the new experimental APIs
RemoteFunctionCache.clearCache(Destination)andRemoteFunctionCache.clearCache(Destination, functionName).- Example usages:
final Destination destination = DestinationAccessor.getDestination(destinationName);
try {
RemoteFunctionCache.clearCache(destination);
}
catch( final RemoteFunctionException e ) {
//deal with exception
}final Destination destination = DestinationAccessor.getDestination(destinationName);
try {
RemoteFunctionCache.clearCache(destination, "BAPI_GET_COSTCENTER");
}
catch( final RemoteFunctionException e ) {
//deal with exception
}
Improvements
- Dependency Updates:
- SAP dependency updates:
- Update SCP Neo Java Tomcat API from
3.121.8.1to3.123.6.2 - Update SCP Neo Java TomEE7 API from
1.90.9.1to1.92.6.2 - Update JPaaS Security Utils for Neo from
1.4.87to1.4.89 - Update SAP CP Spring XSUAA Security Library from
2.8.3to2.8.4
- Update SCP Neo Java Tomcat API from
- Other dependency updates:
- Minor version updates:
- Update Mockito from
3.7.7to3.8.0 - Update Spring from
5.3.2to5.3.3 - Update Spring Boot from
2.4.1to2.4.2 - Update AQMP Client from
5.10.0to5.11.0 - Update Protobuf java from
3.14.0to3.15.1
- Update Mockito from
- Minor version updates:
- SAP dependency updates:
3.39.0 - February 25, 2021
Compatibility Notes
As part of the update of the pregenerated type-safe client for SAP S/4HANA On-premise, we encountered the following changes:
-
The following methods of the OData v4 service
ContractAccountingBusinessPartnerPaymentServicehave been renamed:getAllBusPartPaymentParametershas been renamed togetAllBusPartPaymentcountBusPartPaymentParametershas been renamed tocountBusPartPaymentgetBusPartPaymentParametersByKeyhas been renamed togetBusPartPaymentByKeygetAllBusPartPaymentItemParametershas been renamed togetAllBusPartPaymentItemcountBusPartPaymentItemParametershas been renamed tocountBusPartPaymentItemgetBusPartPaymentItemParametersByKeyhas been renamed togetBusPartPaymentItemByKey
-
The following classes of the OData v4 VDM have been renamed:
ProtocolQueryReadSinglehas been renamed toProtocolQueryReadStructuredPropertyCollectionhas been renamed toNavigationPropertyCollectionStructuredPropertyCollectionQueryhas been renamed toNavigationPropertyCollectionQueryStructuredPropertySingleQueryhas been renamed toNavigationPropertySingleQueryStructuredPropertySinglehas been replaced by either theNavigationProperty<Single/Collection>Queryor the newly introducedComplexPropertyQuery
-
The type-safe client (VDM) classes for
TimeDependentStockLevelServicehave been removed as the SAP S/4HANA On-Premise OData service does not exist in releases 2020 FPS0 or FPS1. -
With SAP S/4HANA On-Premise release 2020 FPS1, in the type-safe client (VDM) class for
VehicleManagementSystemForVehicleServicethegetVMSVehicleIncomingInvoiceByKeymethod now takes only two parameters (vMSVehicleUUIDandvMSVehicleActionDateTime) as input as opposed to three before (vMSVehicleUUID,vMSVehicleActionDateTimeandvMSVehicleActionDocType).
New Functionality
-
The type-safe OData client (VDM) is updated to the latest release (FPS1) of SAP S/4HANA On-Premise 2020. This also includes completely new services added to the pre-existing
com.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odata.servicesandcom.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odatav4.servicespackages. -
In the OData v2 and v4 type-safe client (VDM) generators we now support generating service methods for multiple entity sets belonging to the same entity type. Formerly only the first entity set of an entity type was regarded.
To ensure backward compatibility this feature is turned off by default.
To activate the new functionality, supply the feature flag explicitly.
Generator Maven Plugin Configuration:
`<serviceMethodsPerEntitySet>true</serviceMethodsPerEntitySet>`
Generator CLI Flag:
`--service-methods-per-entity-set` -
The OpenAPI Generator now allows for customizing the method names on generated API classes. Use the vendor extension
x-sap-cloud-sdk-operation-nameto specify a name on an operation:/operation/path:
get:
summary: My Operation.
x-sap-cloud-sdk-operation-name: performMyOperation
operationId: myOperationThis field is optional and the generator will fall back to using the
operationIdif vendor extensions are not present. -
The OpenAPI Generator now allows for setting a custom copyright header. Use the option
<copyrightHeader>to set a custom header, or set the flag<sapCopyrightHeader>to have an SAP copyright header added. By default, no header is generated.
Improvements
-
The OData v2 type-safe client (VDM) classes and generator now support
nullas parameter values for function import methods when applicable. For visibility the respective annotations on arguments are provided, i.e.@Nullableand@Nonnull. -
The OData v4 VDM now better reflect which operations are allowed on complex properties. Operations that are not applicable to complex properties like
top(int)andskip(int)are no longer available. This causes some existing classes to be renamed/removed (see Compatibility Notes) -
Dependency Updates:
- Update JUnit Jupiter from
5.7.0to5.7.1 - Update Joda-Time from
2.10.9to2.10.10 - Update Netty from
4.1.58to4.1.59.Finalto overcome security vulnerability CVE-2021-21290 - Update Hibernate Core from
5.4.27.Finalto5.4.28.Final - Update jOOQ from
3.4.16to3.4.17 - Update Reactor from
3.4.2to3.4.3 - Update OkHttp from
4.9.0to4.9.1 - Update Java JWT from
3.12.1to3.13.0 - Update JUnit from
4.13.1to4.13.2 - Update Caffeine from
2.8.8to2.9.0
- Update JUnit Jupiter from
Fixed issues
- We fixed an issue where selecting complex properties in the OData V4 VDM would lead to an incorrect HTTP query.
- We fixed an issue where very long RFC function names (>= 30 characters) would lead to an incorrect
SOAPActionheader.
3.38.0 - February 11, 2021
Compatibility Notes
-
The method
getHeaders(DestinationProperties)of extension APIDestinationHeaderProvideris deprecated but still functional. Please implementgetHeaders(DestinationRequestContext)instead. The new argument allows accessing the request specificURIas well as the originalDestinationProperties. -
The method
ResilienceDecorator#invalidateCacheis deprecated but still functional. Please useResilienceDecorator#clearCachefor tenant aware cache invalidation orResilienceDecorator#clearAllCacheEntriesto clear all entries for all tenants and principals. -
As part of the update of the OData VDM to SAP S/4HANA Cloud 2102 a few operations were removed. The operations were never supported by the SAP S/4HANA system (like CRUD support for some entities), so no existing functionality is affected. The following services are affected:
-
Nota Fiscal – Create, Update -
API_LOGBR_NOTAFISCAL_SRV -
Purchase Contracts -
API_PURCHASECONTRACT_PROCESS_SRV -
Outbound Delivery (A2X) -
API_OUTBOUND_DELIVERY_SRV_0002
-
New Functionality
-
We introduced a new API on table parameters of
BapiRequest. When a table uses a domain-type as row-type there are no field names to refer to. But such a table can be treated as a one-dimensional vector of primitive values, e.g.:new BapiRequest("BAPI_DEMO", true)
.withExportingTable("DEMO_TABLE", "BAPI_DEMO_TAB01")
.asVector()
.row("CC01")
.row("CC02")
.row("CC03")
.end(); -
We now support the
SAMLAssertionauthentication type on Cloud Foundry. Refer to the help page for more detail on theSAMLAssertionauthentication type. -
We introduced a new API to build a
Destinationfor connecting to services on Cloud Foundry. The information will be read from theVCAP_SERVICESenvironment variable at runtime. For certain authentication types i.e.NoAuthenticationandOAuth2ClientCredentialsthis API eliminates the need to manually create a destination in the CF account for connecting to services.Example:
final Map<String, String> mapping =
ScpCfServiceDestinationLoader.buildClientCredentialsMapping(
"credentials.endpoints.service_rest_url",
"credentials.uaa.clientid",
"credentials.uaa.clientsecret",
"credentials.endpoints.token_url");ScpCfServiceDestinationLoader.buildClientCredentialsMappingcreates a mapping for loading a destination and provides JSON paths for all required destination properties.final HttpDestination destination =
ScpCfServiceDestinationLoader.getDestinationForService(
"label",
"serviceBindingName",
AuthenticationType.OAUTH2_CLIENT_CREDENTIALS,
mapping);For certain services (only workflow for now), we provide further convenience that skips the need to provide the
mappingexplicitly. Example:final HttpDestination destination =
ScpCfServiceDestinationLoader.getDestinationForService(
ScpCfServiceDestinationLoader.CfServices.WORKFLOW,
"my-workflow"); -
We introduced a new API to construct a
ScpCfDestinationLoaderthat allows overriding the default timeout for the Time Limiter resilience pattern. If not specified, requests will automatically timeout after 6 seconds. -
We added support for recursive tables and structures in parameters of
BapiRequestAPI for both protocols: JCo and SOAP. Example:final BapiRequest bapiReqauest = new BapiRequest("DEMO_BAPI")
.withExportingTable("TABLE_PARAMETER1","ABC_T_PARAM1" )
.row()
.field("ROW_UUID","STRING","foobar")
//Start nested table
+ .table("TABLE_NESTED1","ABC_T_NESTED1")
+ .row()
+ .field("NESTED_FIELD1","STRING","john")
+ .field("NESTED_FIELD2","STRING","doe")
+ .end() // End nested table
// START nested structure
.fields("NESTED_STRUCTURE", "NESTED_STRUCTURE_TYPE")
.field("latitude", "Axis", "52")
.field("longitude", "Axis", "13")
.end() // End nested structure
.end(); -
We updated the OData type-safe client also known as a VDM to the newest release 2102 of SAP S/4HANA Cloud. This includes completely new services (available as usual in packages
com.sap.cloud.sdk.s4hana.datamodel.odata.servicesandcom.sap.cloud.sdk.s4hana.datamodel.odatav4.services), new operations in previously existing services, and new entity types. The SAP Cloud SDK supports all OData services listed in the SAP Business Accelerator Hub for SAP S/4HANA Cloud with the exception of the following services:- (OData V2) Purchase Requisition -
API_PURCHASEREQ_PROCESS_SRV - (OData V2) Production Order Confirmation -
API_PROD_ORDER_CONFIRMATION_2_SRV - (OData V2) Process Order Confirmation -
API_PROC_ORDER_CONFIRMATION_2_SRV - (OData V2) Attachments -
API_CV_ATTACHMENT_SRV - (OData V4) Contract Accounting: Invoices of Business Partner -
API_CABUSPARTINVOICE_0001
- (OData V2) Purchase Requisition -
Improvements
-
ResilienceDecorator.clearCache(ResilienceConfiguration)does now also respect parameters defined in theResilienceConfiguration.CacheConfigurationwhen selecting cache entries to clear. -
Dependency Updates:
- SAP dependency updates:
- Update SAP CP Spring XSUAA Security Library from
2.8.0to2.8.3
- Update SAP CP Spring XSUAA Security Library from
- Other dependency updates:
- Minor version updates:
- Update Spring from
5.2.10.RELEASEto5.3.2 - Update Spring Security from
5.3.5.RELEASEto5.4.2 - Update Mockito from
3.7.0to3.7.7 - Update AssertJ from
3.18.1to3.19.0 - Update Fabric SDK for Java from
2.2.4to2.2.5 - Update Resilience4J from
1.6.1to1.7.0 - Update Java JWT Java from
3.12.0to3.12.1 - Update PMD from
6.30.0to6.31.0 - Update Lombok from
1.18.16to1.18.18 - Update Jetty from
9.4.35.v20201120to9.4.36.v20210114
- Update Spring from
- Minor version updates:
- SAP dependency updates:
Fixed Issues
- We fixed an issue with OData V4 update requests where the serialization of primitives with types like Integer, Boolean, and Double leads to null values.
- We fixed an issue with the JCo serialization of BAPI requests, where adding field parameter values of type
ErpTypeled to an exception.
3.37.0 - January 28, 2021
Compatibility Notes
- We deprecated the constructor
UncheckedFilterExpression(FilterExpression). It can still be used for OData V2 type-safe client (VDM) read requests that are executed with the deprecatedexecute(...)method. However, we strongly encourage you to migrate toexecuteRequest(...). Unchecked filter expressions can be instantiated with recommended constructorUncheckedFilterExpression(ValueBoolean). - We deprecated the class
com.sap.cloud.sdk.s4hana.connectivity.RequestBodyas it has no usage. - For SAP BTP Cloud Foundry, instances of
DestinationHeaderProviderwill be called for every HTTP request as of now. Earlier versions invoked the API only once during destination construction.
New Functionality
-
OData V2 helper class
UncheckedFilterExpressioncan be instantiated for generic instances ofValueBoolean. Example:BusinessPartnerService service;
HttpDestination destination;
ValueBoolean customExpression = FieldReference.of("ShoeSize").equalTo(42);
List<BusinessPartner> items = service
.getAllBusinessPartner()
.filter( new UncheckedFilterExpression<>(customExpression) )
.executeRequest(destination); -
The
DefaultHttpDestinationnow allows for registering aDestinationHeaderProviderto enrich outgoing HTTP requests with headers. It can be used as follows:DefaultHttpDestination
.builder(uri)
.headerProviders(new CustomHeaderProvider(), new AnotherCustomHeaderProvider())
.build();
Improvements
-
OData requests are now allowed to contain null values within entity keys and function parameters as per the OData specification. Previously an exception would be thrown in these cases.
-
Removed Swagger annotations
ApiModelandApiModelPropertyfrom classes generated by the OpenAPI client generator- Swagger annotations dependency (
io.swagger.swagger-annotations) can now safely be removed from the project'spom.xml
- Swagger annotations dependency (
-
The Workflow API client library in module
scp-workflow-cfgot enhanced to reflect the latest Workflow API features. -
Dependency Updates:
- SAP dependency updates:
- Update SCP CF Java Logging Support from
3.2.1to3.3.0 - Update SCP Neo Java Tomcat API from
3.119.9to3.121.8.1 - Update SCP Neo Java TomEE7 API from
1.88.6to1.90.9.1 - Update JPaaS Security Utils for Neo from
1.4.86to1.4.87
- Update SCP CF Java Logging Support from
- Other dependency updates:
- Major version updates: -
- Minor version updates:
- Update Error Prone Annotations from
2.4.0to2.5.0 - Update Liquibase from
3.8.6to3.10.3 - Update OWASP Json Sanitizer from
1.2.1to1.2.2 - Update JsonPath from
2.4.0to2.5.0 - Update Reactor Core from
3.4.1to3.4.2 - Update Mockito from
3.6.28to3.7.0 - Update Jackson from
2.12.0to2.12.1 - Update Netty BOM from
4.1.56.Finalto4.1.58.Final - Update Hyperledger Fabric SDK from
2.2.3to2.2.4 - Update Hibernate from
5.4.26.Finalto5.4.27.Final - Update Joda time library from
2.10.8to2.10.9 - Update Apache Olingo OData V4 from
4.7.1to4.8.0
- Update Error Prone Annotations from
- SAP dependency updates:
3.36.0 - January 14, 2021
Compatibility Notes
-
We removed the following dependencies from the SAP Cloud SDK Bill-of-Material (BOM):
- Netty
- Protobuf
- Spring Security OAuth
- Hibernate Validator
New Functionality
- We introduced support for the String-based filter functions
endsWith,startsWithandsubstringOfin the OData V2 type-safe client (VDM). - Check out our new Feature Matrix. We're actively extending it. Let's us know what you'd like to see there by creating a GitHub issue.
Improvements
-
We replaced the deprecated constant
org.apache.commons.codec.Charsets.UTF_8in the HelloWorldControllerTest class of the Spring archetype by its recommended successorjava.nio.charset.StandardCharsets.UTF_8. This resolves a compiler warning. -
We added Maven module
s4hana-api-odata-v4intos4hana-allto enable type-safe OData v4 client library (VDM) for SAP S/4HANA Cloud Edition. -
Dependency Updates:
- SAP dependency updates:
- Other dependency updates:
- Major version updates:
- Minor version updates:
- Downgrade Spring dependencies to resolve conflicts with SAP CP Spring XSUAA Security Library
- Change Spring Framework BOM from
5.3.1to5.2.10.RELEASE - Change Spring Security BOM from
5.4.2to5.3.5.RELEASE
- Change Spring Framework BOM from
- Update PMD from
6.29.0to6.30.0 - Update Caffeine from
2.8.6to2.8.8 - Update Jackson from
2.11.3to2.12.0 - Update Reactor from
3.4.0to3.4.1 - Update Guava from
30.0-jreto30.1-jre - Update Hibernate Core from
5.4.25.Finalto5.4.26.Final - Update Netty BOM from
4.1.49.Finalto4.1.56.Final - Update Java JWT from
3.11.0to3.12.0
- Downgrade Spring dependencies to resolve conflicts with SAP CP Spring XSUAA Security Library
Fixed issues
- We fixed incorrect serialization of
datevalues for OData V2 requests using thePATCHrequest method. - We fixed an issue where OData Batch requests were sending an invalid
Acceptheader. - We fixed an issue where the API for OData Batch responses did not conveniently throw or wrap an exception for failing HTTP response code health checks.
Affected methods:
- OData v4 VDM:
getReadResultofBatchResult - OData v2 VDM:
getofBatchResponse - OData Client:
getResultofODataRequestResultMultipartGeneric
- OData v4 VDM:
- We removed a log message that incorrectly indicated an error when receiving an OData response without payload.
3.35.0 - December 17, 2020
Known issues
- OData Batch response API is known to not conveniently throw or wrap an exception for failing HTTP response code health checks. This affects the type-safe batch request builders for both v2 and v4 protocol. We're working to fix this in the next release.
Compatibility Notes
- We removed a dependency reference for
JUnit Pioneer. The last used version was1.0.0
Improvements
- Dependency Updates:
- SAP dependency updates:
- Update SAP Cloud Security Client from
2.7.6to2.8.0 - Update API of Java EE 7 Web Profile TomEE 7 from
1.87.4to1.88.6 - Update API of Java Web Tomcat 8 from
3.118.5to3.119.9
- Update SAP Cloud Security Client from
- Other dependency updates:
- Minor version updates:
- Update Mockito from
3.6.0to3.6.28 - Update Apache HttpComponents Core from
4.4.13to4.4.14 - Update Spring Security from
5.4.1to5.4.2 - Update Jetty from
9.4.34.v20201102to9.4.35.v20201120
- Update Mockito from
- Minor version updates:
- SAP dependency updates:
Fixed issues
- We fixed an issue where OData errors originating in OData batch change sets requests could not be parsed correctly.
3.34.1 - December 9, 2020
Compatibility Notes
- To use the experimental version of OpenAPI type-safe client generator you longer need to add the
org.springframework:spring-contextdependency in a project. - Requests to fetch
CSRFtoken that are done for OData v2 function imports now contain all explicitly specified HTTP headers. Before they contained only implicitly set HTTP headers and neglect headers provided via.withHeaders()method ofRequestBuilderclass.
New Functionality
- We improved
@ODataResponseExceptionto contain an HTTP status code returned from the server to improve debugging experience. - Caught instances of
ODataResponseExceptionallow accessing@Nonnull Option<String> getHttpBodyto simplify investigation while debugging and at runtime. - OData function imports now allow accessing the built-in OData request object via the
toRequestmethod.
Improvements
-
Add support for alternative OData v4 metadata field notations
@type,@context, and other introduced with OData Version4.0.1. The SAP Cloud SDK is now able to parse this notation. However, outgoing requests will always use the notation that is compatible with Version4.0.0of the standard for now to ensure server compatibility. -
The Workflow API client library in module
scp-workflow-cfwas enhanced with the latest Workflow API features. -
The CSRF token retrieval of OData v2 type-safe function imports has been improved:
- Function imports using the HTTP method GET no longer issue the unnecessary CSRF token request
- Function imports using the HTTP method POST can be processed even if the CSRF token retrieval fails (for example, if the server does not support CSRF tokens)
-
Dependency Updates:
- SAP dependency updates:
- Downgrade SAP security related libraries from
2.7.8to2.7.6
- Downgrade SAP security related libraries from
- SAP dependency updates:
Fixed issues
ClassCastExceptionfix an issue with accessing navigational properties directly in OData V4 requests. Read and count operations performed on nested collections directly via, for example,service.naviagteTo(Entity.COLLECTION_PROPERTY).getAll()would cause aClassCastExceptionwhen parsing the result. This is now done correctly.- Fix an issue where dependency conflicts between the SAP Cloud SDK and the SAP Java Buildpack lead to runtime issues on the SCP Cloud Foundry.
- Fix an issue where operations with empty payload in OData Batch request changesets on SAP S/4HANA OData services failed with Bad Request responses.
3.34.0 - December 3, 2020
Compatibility Notes
- The Maven artifact
rest-core movedfrom the group idcom.sap.cloud.sdk.servicestocom.sap.cloud.sdk.datamodel. - We introduced new implementations of
ThreadContextListenerandThreadContextDecorator. We adapted the internal priority of listeners and decorators accordingly. - Archetypes generated by the SAP Cloud SDK for Java were migrated to the general purpose pipeline of project "Piper". Before they were using the SAP Cloud SDK for Continuous Delivery pipeline that is now deprecated. For existing projects we also recommend migrating to this pipeline.
New Functionality
- We released experimental type-safe client generator for
OpenAPI 3.0specification andmavenplugin to run it. We do not yet recommend using it in production.
- We released experimental support for OData server-driven paging
- The read request builders for OData v2 and v4 have a new feature that enables lazy iteration through result-set pages.
- You can use memory-efficient or latency-reduced data processing depending on your use-case.
Example:
// Let's assume these are your requests for OData v2 and v4 to fetch entities.
FluentHelperRead<?, EntityT, ?> request = service.getEntities(); // for v2
GetAllRequestBuilder<EntityT> request = service.getEntities(); // for v4
// Before you had only this method which would fetch all the data eagerly by
// travesing through pages and providing the final result set for you.
List<EntityT> defaultEager = request.execute( destination );
// Now you have an option to handle paginated results yourself using one of the
// methods below depending on your use-case.
Iterable<EntityT> lazyIterable = request.iteratingEntities().execute( destination );
Stream<EntityT> lazyStream = request.streamingEntities().execute( destination );
Iterable<List<EntityT>> lazyPages = request.iteratingPages().execute( destination );
- For OData v2 the execute method is called
executeRequest - The default behavior for OData v2 and v4 is now to return accumulated results from all pages. Before only the first page of results was returned.
Improvements
- Dependency Updates:
- SAP dependency updates:
- Update API of Java EE 7 Web Profile TomEE 7 from
1.86.9to1.87.4 - Update API of Java Web Tomcat 8 from
3.117.9to3.118.5 - Update Cf Java Logging Support Logback from
3.2.0to3.2.1
- Update API of Java EE 7 Web Profile TomEE 7 from
- Other dependency updates:
- Minor version updates:
- Update Apache CXF from
3.3.7to3.3.8 - Update EclipseLink from
2.7.6to2.7.7 - Update Hibernate validator from
6.1.5.Finalto6.1.6.Final - Update Jetty from
9.4.33.v20201020to9.4.34.v20201102 - Update Json from
20200518to20201115 - Update Protobuf java from
3.12.2to3.14.0 - Update Swagger annotation from
1.5.22to1.6.2 - Update Vavr from
0.10.2to0.10.3 - Update hibernate-core from
5.4.3to5.4.24to overcome security vulnerability CVE-2020-25638
- Update Apache CXF from
- Minor version updates:
- SAP dependency updates:
Fixed Issues
- RFC calls executed via the resilience decorator now use subscriber tenant instead of provider tenant which is correct behavior for multi-tenant applications.
- non-Latin characters in the query and path part of OData URLs are now correctly encoded.
3.33.0 - November 20, 2020
Javadoc | Release blog | Maven Central
Compatibility Notes
-
The client library for SAP S/4HANA Enterprise Messaging is deprecated. This affects all classes in the following modules:
s4hana-api-messaging,messaging-core,messaging-jms -
Blockchain Business Services Visibility: The members of the class
MerkleProofare now immutable, forbidding any external modification of a proof
New Functionality
-
Destinations can be conveniently added into the
DestinationAccessorlogic at runtime. It exposes two new methodsappendDestinationLoader()andprependDestinationLoader()which add destination loaders with high or low priority to the accessor logic. Leverage a new default implementation for theDestinationLoaderinterface to load destinations created at runtime:DestinationLoader loader = new DefaultDestinationLoader().registerDestination(myHttpDestination);
DestinationAccessor.appendDestinationLoader(loader);This new API is experimental.
Improvements
-
The SCP Workflow API client library in module
scp-workflow-cfis now generally available and released for productive usage. -
All OData V2 and V4 request builder classes now expose an experimental method
toRequest()that returns a low-level, generic request object. It provides more convenience for debugging and flexibility to work around a non-standard service behavior. -
The method
withHeader()of OData V4 request builders is no longer experimental. -
Improve the class hierarchy of
ODataException:- Declare all subclasses as stable API
- Merge
ODataResponseErrorExceptionintoODataServiceErrorException - Rename
ODataServiceErrorRoottoODataServiceError
-
Dependency Updates:
- API of Java EE 7 Web Profile TomEE 7 from
1.85.7.2to1.86.9 - API of Java Web Tomcat 8 from
3.116.7.2to3.117.9 - Support for Logback for SCP CF from
3.0.1to3.2.0 - Tomcat from
8.5.50to8.5.59to overcome the security vulnerability CVE-2020-13943 - Jetty from version
9.4.31.v20200723to9.4.33.v20201020to overcome the security vulnerability CVE-2020-27216 - Netty BOM from
4.1.53.Finalto4.1.54.Final - Spring Boot from
2.3.4.RELEASEto2.3.5.RELEASE - Spring from
5.2.9.RELEASEto5.3.1 - AssertJ from
3.17.2to3.18.1 - AssertJ Vavr from
0.2.0to0.3.0 - Fabric SDK for Java from
2.2.2to2.2.3 - Fabric Gateway for Java from
2.2.0to2.2.1 - Mockito from
3.5.15to3.6.0 - Joda Time from
2.10.6to2.10.8 io.projectreactor:reactor-corefrom3.3.10.RELEASEto3.4.0- Okio from
2.7.0to2.9.0 - OkHttp from
4.5.0to4.9.0
- API of Java EE 7 Web Profile TomEE 7 from
Fixed Issues
- Blockchain Business Services Visibility: Fixed an issue where validating a structurally invalid proof could result in a stack overflow.
- Fixed missing request header
If-Matchon batch request for Update or Delete Operation. - Fixed missing custom headers and parameters on OData V2 count requests.
3.32.0 - November 5, 2020
Javadoc | Release blog | Maven Central
Compatibility Notes
- OData requests do no longer send the query parameter
$format=jsonby default. Instead theAcceptheader is set toapplication/jsonby default.
The following changes apply to experimental functionality of the SAP Cloud SDK:
- The SCP service
Hyperledger Fabric on SAP Cloud Platformis deprecated, the corresponding Maven dependencycom.sap.cloud.sdk.services:scp-blockchaingets deprecated too. Use the dependencycom.sap.cloud.sdk.serices:blockchain-client-fabricinstead. - The method
setResponseFormat()in the classODataRequestGenericis no longer available. You can still configure theAcceptheader via the methodaddHeaderIfAbsent(). Example:request.addHeaderIfAbsent(HttpHeaders.ACCEPT, "application/xml"). - The enum
com.sap.cloud.sdk.datamodel.odata.client.request.ODataFormatis no longer public.
New Functionality
- Update the OData client library to the newest release 2011 of SAP S/4HANA Cloud.
This includes completely new services (available as usual in packages com.sap.cloud.sdk.s4hana.datamodel.odata.services and
com.sap.cloud.sdk.s4hana.datamodel.odatav4.services), new operations in previously existing services, and new entity types. The SAP Cloud SDK supports all OData services listed in the SAP Business Accelerator Hub for SAP S/4HANA Cloud. - Released new pregenerated type-safe client libraries for the OData v4 services in the latest RTC release 2020 of SAP S/4HANA On-premise
- The untyped, generic OData client and OData V4 client now support
Edm.Binaryas value type for Entity properties. In Java, this type is conveniently represented asbyte[]. The OData V4 generator will now generate affected services without raising a warning. Generated entities that have binary properties now have static accessors to the respective fields, similar to the other entity properties. OData filter expressions for binary properties can be created. - Add generated service
DocumentComplianceElectronicDocumentFileServicefor APIELECTRONICDOCFILE_0001
Improvements
-
OData requests contain the
Acceptheader with valueapplication/jsonby default. -
Dependency Updates:
- SAP Cloud Security Client from
2.7.7to2.7.8 - SAP Cloud Application Programming Model from version
1.40.6to1.40.11 - Guava from
29.0-jreto30.0-jre - Lombok from
1.18.14to1.18.16 - Caffeine from
2.8.5to2.8.6 - Resilience4j from
1.6.0to1.6.1 - Mockito from
3.5.13to3.5.15 - Fabric SDK for Java from
2.2.1to2.2.2 - Netty from
4.1.52.Finalto4.1.53.Final
- SAP Cloud Security Client from
3.31.0 - October 22, 2020
Javadoc | Release blog | Maven Central
New Functionality
- Generated OData V4 client library service types provide a new method
batch()to conveniently create instances ofBatchRequestBuilder. It can be used to combine multiple reading and modifying OData operations into one OData Batch request. - We released new pregenerated type-safe client libraries (also known as the Virtual Data Model - VDM) for the latest RTC release 2020 of SAP S/4HANA On-premise. Except for the following services, everything else available in SAP Business Accelerator Hub for SAP S/4HANA On-Premise 2020 are available:
Improvements
-
The Workflow API client library in module
scp-workflow-cfgot enhanced to reflect the latest Workflow API features. -
Update Dependencies
- Spring dependency for the SAP Cloud Platform multitenancy implementation module to version
4.3.29.RELEASEto overcome the security vulnerability CVE-2020-5421. - Apache HttpComponents from version
4.5.12to4.5.13 - Jackson from
2.11.2to2.11.3 - Java JWT from
3.10.3to3.11.0 - JUnit Pioneer from version
0.9.0to1.0.0 - Lombok from version
1.18.12to1.18.14 - Mockito from version
3.5.11to3.5.13 - Resilience4J from version 1.5.0 to 1.6.0
- Spring Security from
5.4.0to5.4.1 io.projectreactor:reactor-corefrom3.3.9.RELEASEto3.3.10.RELEASE- JUnit from version
4.13to4.13.1 - Tomcat from
9.0.37to9.0.39, fixing the vulnerability CVE-2020-13943
- Spring dependency for the SAP Cloud Platform multitenancy implementation module to version
Fixed Issues
- Fix an issue where responses of OData batch requests could not be evaluated if the batch request contained semantically identical request objects (e.g. creating two similar entities).
- Fix an issue where an OData VDM generated with the OData V4 generator would not compile when a complex type contained a list of properties.
- Fix an issue where error responses of OData V2 requests could not be parsed correctly.
3.30.0 - October 8, 2020
Javadoc | Release blog | Maven Central
Compatibility Notes
To unify OData V2 client to OData V4 client APIs, the API of custom header configuration has been simplified and partially deprecated on OData V2 side:
requestV2
.withHeader("Authorization", "Basic user:secret")
.onRequestAndImplicitRequests() // deprecated
.withHeader("User-Agent", "Robot")
.onRequestOnly() // deprecated
.execute(httpDestination);
// ... still works, but should be migrated to:
requestV2
.withHeader("Authorization", "Basic user:secret")
.withHeader("User-Agent", "Robot")
.executeRequest(httpDestination);
The deprecated code is still usable. No breaking changes in code or behavior are introduced.
The internal fluent helper class FluentHelperCustomHttpHeader is changed to a deprecated interface.
The related methods getHeadersForRequestAndImplicitRequests and getHeadersForRequestOnly are deprecated.
The former modifier will be used by default in the future.
Please use the existing withHeader and withHeaders methods without the stating a deprecated modifier.
The internal protected methods getHeadersForRequestOnly and getHeadersForRequestAndImplicitRequests from abstract base class FluentHelperBasic are deprecated.
Please use protected getHeaders() instead.
The internal interface CsrfTokenRetriever defines another retrieveCsrfToken method with additional headers parameter to be passed in the HTTP request.
New Functionality
Blockchain Business Services update:
- It is now possible to send, receive, and validate notarizations. Sending a document will automatically also send its notarizations if the visibility configuration is set to include notarizations.
Improvements
-
In case a
DefaultErpHttpDestinationdecorates an On-PremiseHttpDestinationand the destination configuration lacks asap-clientproperty, an information message is logged to raise awareness for potential authentication issues. -
Dependency Updates:
- Update Spring Boot from
2.3.3.RELEASEto2.3.4.RELEASE - Update JUnit Jupiter from
5.6.2to5.7.0 - Update Spring from
5.2.8.RELEASEto5.2.9.RELEASE - Update Spring Security from
5.3.4.RELEASEto5.4.0 - Update Mockito from
3.5.10to3.5.11
- Update Spring Boot from
-
Maven Plugin Updates in Archetypes:
- Update Maven Surefire Plugin from
3.0.0-M4to3.0.0-M5 - Update Maven Jacoco Plugin from
0.8.5to0.8.6
- Update Maven Surefire Plugin from