Skip to main content

release-notes-30-to-44

3.44.1 - May 6, 2021

Maven Central | Javadoc

Compatibility Notes

  • The OpenAPI Generator no longer adds the prefix src/main/java to 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.4 to 3.4.5
      • Update Protobuf Java from 3.15.7 to 3.15.8
      • Update PMD from 6.32.0 to 6.33.0
      • Update JPaaS Security Utils for Neo from 1.4.89 to 1.4.90
      • Update Jackson from 2.12.2 to 2.12.3

Fixed issues

  • The OpenAPI Generator no longer adds the prefix src/main/java unexpectedly 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

Maven Central | Javadoc

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.Final to 4.1.63.Final
      • Update Lombok from 1.18.18 to 1.18.20
      • Update Jetty from 9.4.38.v20210224 to 9.4.39.v20210325
      • Update Bouncycastle from 1.64 to 1.68
      • Update Error Prone from 2.5.1 to 2.6.0
      • Update Java JWT from 3.14.0 to 3.15.0
      • Update Protobuf from 3.15.6 to 3.15.7
      • Update Apache CXF from 3.3.8 to 3.3.10
      • Update Mockito from 3.8.0 to 3.9.0

3.42.0 - April 8, 2021

Maven Central | Javadoc

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-name in 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 of x-sap-cloud-sdk-api-name, if present.

  • Dependency Updates:

    • SAP dependency updates:
      • Update SCP Neo Java TomEE7 API from 1.93.10.2 to 1.94.8
    • Other dependency updates:
      • Minor version updates:
        • Update Reactor from 3.4.3 to 3.4.4
        • Update Protobuf from 3.15.1 to 3.15.6
        • Update JooQ from 3.14.7 to 3.14.8
        • Update PMD from 6.31.0 to 6.32.0
        • Update Hibernate Core from 5.4.28.Final to 5.4.30.Final
        • Update Guava from 30.1-jre to 30.1.1-jre
        • Update Togglz from 2.8.0 to 2.9.6

3.41.0 - March 25, 2021

Maven Central | Javadoc

New Functionality

  • We added a convenience method to configure the proxy authorizations when building a custom DefaultHttpDestination. The .proxyAuthorization("value") will send value within the Proxy-Authorization header, unless that header is already set.

  • The OpenAPI generator now supports the vendor extension field x-sap-cloud-sdk-api-name in an OpenAPI specification. By default, the OpenAPI generator uses the tag of an operation to determine the Java service class name. In case you're not happy with the name generated from the tag field, and changing it is not possible, you can add x-sap-cloud-sdk-api-name vendor extension to the operation section 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.2 to 3.124.9.2
      • Update SCP Neo Java TomEE7 API from 1.92.6.2 to 1.93.10.2
      • Update SAP CP Spring XSUAA Security Library from 2.8.4to 2.8.7
    • Other dependency updates:
      • Minor version updates:
        • Update Spring from 5.3.3 to 5.3.4
        • Update Spring Security from 5.4.2 to 5.4.5
        • Update Jetty BOM from 9.4.36.v20210114 to 9.4.38.v20210224
        • Update Woodstox Core from 5.0.3 to 5.3.0
        • Update Netty from 4.1.59.Final to 4.1.60.Final
        • Update Java JWT from 3.13.0 to 3.14.0
        • Update Jackson from 2.12.1 to 2.12.2
        • Update Apache Commons Lang from version 3.11 to 3.12.0
        • Update JSON from version 20201115 to 20210307
        • Update Jackson from version 2.12.1 to 2.12.2
  • 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 VdmComplex types.

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

Maven Central | Javadoc

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.datamodel have been renamed:
      • Rename dependency rest-core to openapi-core
      • Rename dependency rest-generator to openapi-generator
      • Rename dependency rest-generator-maven-plugin to openapi-generator-maven-plugin
    • The Maven Plugin has been renamed from rest-generator-maven-plugin to openapi-generator-maven-plugin

New Functionality

  • The OData v4 type-safe client (VDM) generator now generates static fields for accessible properties on VdmComplex types, which can be used exactly like their counterparts on VdmEntity when building OData queries.

  • You can clear the cache for remote functions with the new experimental APIs RemoteFunctionCache.clearCache(Destination) and RemoteFunctionCache.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.1 to 3.123.6.2
      • Update SCP Neo Java TomEE7 API from 1.90.9.1 to 1.92.6.2
      • Update JPaaS Security Utils for Neo from 1.4.87 to 1.4.89
      • Update SAP CP Spring XSUAA Security Library from 2.8.3to 2.8.4
    • Other dependency updates:
      • Minor version updates:
        • Update Mockito from 3.7.7 to 3.8.0
        • Update Spring from 5.3.2 to 5.3.3
        • Update Spring Boot from 2.4.1 to 2.4.2
        • Update AQMP Client from 5.10.0 to 5.11.0
        • Update Protobuf java from 3.14.0 to 3.15.1

3.39.0 - February 25, 2021

Maven Central | Javadoc

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 ContractAccountingBusinessPartnerPaymentService have been renamed:

    • getAllBusPartPaymentParameters has been renamed to getAllBusPartPayment
    • countBusPartPaymentParameters has been renamed to countBusPartPayment
    • getBusPartPaymentParametersByKey has been renamed to getBusPartPaymentByKey
    • getAllBusPartPaymentItemParameters has been renamed to getAllBusPartPaymentItem
    • countBusPartPaymentItemParameters has been renamed to countBusPartPaymentItem
    • getBusPartPaymentItemParametersByKey has been renamed to getBusPartPaymentItemByKey
  • The following classes of the OData v4 VDM have been renamed:

    • ProtocolQueryReadSingle has been renamed to ProtocolQueryRead
    • StructuredPropertyCollection has been renamed to NavigationPropertyCollection
    • StructuredPropertyCollectionQuery has been renamed to NavigationPropertyCollectionQuery
    • StructuredPropertySingleQuery has been renamed to NavigationPropertySingleQuery
    • StructuredPropertySingle has been replaced by either the NavigationProperty<Single/Collection>Query or the newly introduced ComplexPropertyQuery
  • The type-safe client (VDM) classes for TimeDependentStockLevelService have 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 VehicleManagementSystemForVehicleService the getVMSVehicleIncomingInvoiceByKey method now takes only two parameters ( vMSVehicleUUID and vMSVehicleActionDateTime) as input as opposed to three before ( vMSVehicleUUID,vMSVehicleActionDateTime and vMSVehicleActionDocType ).

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.services and com.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odatav4.services packages.

  • 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-name to specify a name on an operation:

    /operation/path:
    get:
    summary: My Operation.
    x-sap-cloud-sdk-operation-name: performMyOperation
    operationId: myOperation

    This field is optional and the generator will fall back to using the operationId if 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 null as parameter values for function import methods when applicable. For visibility the respective annotations on arguments are provided, i.e. @Nullable and @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) and skip(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.0 to 5.7.1
    • Update Joda-Time from 2.10.9 to 2.10.10
    • Update Netty from 4.1.58 to 4.1.59.Final to overcome security vulnerability CVE-2021-21290
    • Update Hibernate Core from 5.4.27.Final to 5.4.28.Final
    • Update jOOQ from 3.4.16 to 3.4.17
    • Update Reactor from 3.4.2 to 3.4.3
    • Update OkHttp from 4.9.0 to 4.9.1
    • Update Java JWT from 3.12.1 to 3.13.0
    • Update JUnit from 4.13.1 to 4.13.2
    • Update Caffeine from 2.8.8 to 2.9.0

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 SOAPAction header.

3.38.0 - February 11, 2021

Maven Central | Javadoc

Compatibility Notes

  • The method getHeaders(DestinationProperties) of extension API DestinationHeaderProvider is deprecated but still functional. Please implement getHeaders(DestinationRequestContext) instead. The new argument allows accessing the request specific URI as well as the original DestinationProperties.

  • The method ResilienceDecorator#invalidateCache is deprecated but still functional. Please use ResilienceDecorator#clearCache for tenant aware cache invalidation or ResilienceDecorator#clearAllCacheEntries to 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 SAMLAssertion authentication type on Cloud Foundry. Refer to the help page for more detail on the SAMLAssertion authentication type.

  • We introduced a new API to build a Destination for connecting to services on Cloud Foundry. The information will be read from the VCAP_SERVICES environment variable at runtime. For certain authentication types i.e. NoAuthentication and OAuth2ClientCredentials this 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.buildClientCredentialsMapping creates 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 mapping explicitly. Example:

    final HttpDestination destination =
    ScpCfServiceDestinationLoader.getDestinationForService(
    ScpCfServiceDestinationLoader.CfServices.WORKFLOW,
    "my-workflow");
  • We introduced a new API to construct a ScpCfDestinationLoader that 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 BapiRequest API 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.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 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

Improvements

  • ResilienceDecorator.clearCache(ResilienceConfiguration) does now also respect parameters defined in the ResilienceConfiguration.CacheConfiguration when selecting cache entries to clear.

  • Dependency Updates:

    • SAP dependency updates:
    • Other dependency updates:
      • Minor version updates:
        • Update Spring from 5.2.10.RELEASE to 5.3.2
        • Update Spring Security from 5.3.5.RELEASE to 5.4.2
        • Update Mockito from 3.7.0 to 3.7.7
        • Update AssertJ from 3.18.1 to 3.19.0
        • Update Fabric SDK for Java from 2.2.4 to 2.2.5
        • Update Resilience4J from 1.6.1 to 1.7.0
        • Update Java JWT Java from 3.12.0 to 3.12.1
        • Update PMD from 6.30.0 to 6.31.0
        • Update Lombok from 1.18.16 to 1.18.18
        • Update Jetty from 9.4.35.v20201120 to 9.4.36.v20210114

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 ErpType led to an exception.

3.37.0 - January 28, 2021

Maven Central | Javadoc

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 deprecated execute(...) method. However, we strongly encourage you to migrate to executeRequest(...). Unchecked filter expressions can be instantiated with recommended constructor UncheckedFilterExpression(ValueBoolean).
  • We deprecated the class com.sap.cloud.sdk.s4hana.connectivity.RequestBody as it has no usage.
  • For SAP BTP Cloud Foundry, instances of DestinationHeaderProvider will 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 UncheckedFilterExpression can be instantiated for generic instances of ValueBoolean. Example:

    BusinessPartnerService service;
    HttpDestination destination;

    ValueBoolean customExpression = FieldReference.of("ShoeSize").equalTo(42);

    List<BusinessPartner> items = service
    .getAllBusinessPartner()
    .filter( new UncheckedFilterExpression<>(customExpression) )
    .executeRequest(destination);
  • The DefaultHttpDestination now allows for registering a DestinationHeaderProvider to 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 ApiModel and ApiModelProperty from classes generated by the OpenAPI client generator

    • Swagger annotations dependency (io.swagger.swagger-annotations) can now safely be removed from the project's pom.xml
  • The Workflow API client library in module scp-workflow-cf got enhanced to reflect the latest Workflow API features.

  • Dependency Updates:

    • SAP dependency updates:
      • Update SCP CF Java Logging Support from 3.2.1 to 3.3.0
      • Update SCP Neo Java Tomcat API from 3.119.9 to 3.121.8.1
      • Update SCP Neo Java TomEE7 API from 1.88.6 to 1.90.9.1
      • Update JPaaS Security Utils for Neo from 1.4.86 to 1.4.87
    • Other dependency updates:
      • Major version updates: -
      • Minor version updates:
        • Update Error Prone Annotations from 2.4.0 to 2.5.0
        • Update Liquibase from 3.8.6 to 3.10.3
        • Update OWASP Json Sanitizer from 1.2.1 to 1.2.2
        • Update JsonPath from 2.4.0 to 2.5.0
        • Update Reactor Core from 3.4.1 to 3.4.2
        • Update Mockito from 3.6.28 to 3.7.0
        • Update Jackson from 2.12.0 to 2.12.1
        • Update Netty BOM from 4.1.56.Final to 4.1.58.Final
        • Update Hyperledger Fabric SDK from 2.2.3 to 2.2.4
        • Update Hibernate from 5.4.26.Final to 5.4.27.Final
        • Update Joda time library from 2.10.8 to 2.10.9
        • Update Apache Olingo OData V4 from 4.7.1 to 4.8.0

3.36.0 - January 14, 2021

Maven Central | Javadoc

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, startsWith and substringOf in 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_8 in the HelloWorldControllerTest class of the Spring archetype by its recommended successor java.nio.charset.StandardCharsets.UTF_8. This resolves a compiler warning.

  • We added Maven module s4hana-api-odata-v4 into s4hana-all to 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.1 to 5.2.10.RELEASE
          • Change Spring Security BOM from 5.4.2 to 5.3.5.RELEASE
        • Update PMD from 6.29.0 to 6.30.0
        • Update Caffeine from 2.8.6 to 2.8.8
        • Update Jackson from 2.11.3 to 2.12.0
        • Update Reactor from 3.4.0 to 3.4.1
        • Update Guava from 30.0-jre to 30.1-jre
        • Update Hibernate Core from 5.4.25.Final to 5.4.26.Final
        • Update Netty BOM from 4.1.49.Final to 4.1.56.Final
        • Update Java JWT from 3.11.0 to 3.12.0

Fixed issues

  • We fixed incorrect serialization of date values for OData V2 requests using the PATCH request method.
  • We fixed an issue where OData Batch requests were sending an invalid Accept header.
  • 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: getReadResult of BatchResult
    • OData v2 VDM: get of BatchResponse
    • OData Client: getResult of ODataRequestResultMultipartGeneric
  • We removed a log message that incorrectly indicated an error when receiving an OData response without payload.

3.35.0 - December 17, 2020

Maven Central | Javadoc

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 was 1.0.0

Improvements

  • Dependency Updates:
    • SAP dependency updates:
      • Update SAP Cloud Security Client from 2.7.6 to 2.8.0
      • Update API of Java EE 7 Web Profile TomEE 7 from 1.87.4 to 1.88.6
      • Update API of Java Web Tomcat 8 from 3.118.5 to 3.119.9
    • Other dependency updates:
      • Minor version updates:
        • Update Mockito from 3.6.0 to 3.6.28
        • Update Apache HttpComponents Core from 4.4.13 to 4.4.14
        • Update Spring Security from 5.4.1 to 5.4.2
        • Update Jetty from 9.4.34.v20201102 to 9.4.35.v20201120

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

Maven Central

Compatibility Notes

  • To use the experimental version of OpenAPI type-safe client generator you longer need to add the org.springframework:spring-context dependency in a project.
  • Requests to fetch CSRF token 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 of RequestBuilder class.

New Functionality

  • We improved @ODataResponseException to contain an HTTP status code returned from the server to improve debugging experience.
  • Caught instances of ODataResponseException allow accessing @Nonnull Option<String> getHttpBody to simplify investigation while debugging and at runtime.
  • OData function imports now allow accessing the built-in OData request object via the toRequest method.

Improvements

  • Add support for alternative OData v4 metadata field notations @type, @context, and other introduced with OData Version 4.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 Version 4.0.0 of the standard for now to ensure server compatibility.

  • The Workflow API client library in module scp-workflow-cf was 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.8 to 2.7.6

Fixed issues

  • ClassCastException fix 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 a ClassCastException when 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

Maven Central

Compatibility Notes

  • The Maven artifact rest-core moved from the group id com.sap.cloud.sdk.services to com.sap.cloud.sdk.datamodel.
  • We introduced new implementations of ThreadContextListener and ThreadContextDecorator. 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.0 specification and maven plugin 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 );
note
  • 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.9 to 1.87.4
      • Update API of Java Web Tomcat 8 from 3.117.9 to 3.118.5
      • Update Cf Java Logging Support Logback from 3.2.0 to 3.2.1
    • Other dependency updates:
      • Minor version updates:
        • Update Apache CXF from 3.3.7 to 3.3.8
        • Update EclipseLink from 2.7.6 to 2.7.7
        • Update Hibernate validator from 6.1.5.Final to 6.1.6.Final
        • Update Jetty from 9.4.33.v20201020 to 9.4.34.v20201102
        • Update Json from 20200518 to 20201115
        • Update Protobuf java from 3.12.2 to 3.14.0
        • Update Swagger annotation from 1.5.22 to 1.6.2
        • Update Vavr from 0.10.2 to 0.10.3
        • Update hibernate-core from 5.4.3 to 5.4.24 to overcome security vulnerability CVE-2020-25638

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 MerkleProof are now immutable, forbidding any external modification of a proof

New Functionality

  • Destinations can be conveniently added into the DestinationAccessor logic at runtime. It exposes two new methods appendDestinationLoader() and prependDestinationLoader() which add destination loaders with high or low priority to the accessor logic. Leverage a new default implementation for the DestinationLoader interface 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-cf is 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:

  • Dependency Updates:

    • API of Java EE 7 Web Profile TomEE 7 from 1.85.7.2 to 1.86.9
    • API of Java Web Tomcat 8 from 3.116.7.2 to 3.117.9
    • Support for Logback for SCP CF from 3.0.1 to 3.2.0
    • Tomcat from 8.5.50 to 8.5.59 to overcome the security vulnerability CVE-2020-13943
    • Jetty from version 9.4.31.v20200723 to 9.4.33.v20201020 to overcome the security vulnerability CVE-2020-27216
    • Netty BOM from 4.1.53.Final to 4.1.54.Final
    • Spring Boot from 2.3.4.RELEASE to 2.3.5.RELEASE
    • Spring from 5.2.9.RELEASE to 5.3.1
    • AssertJ from 3.17.2 to 3.18.1
    • AssertJ Vavr from 0.2.0 to 0.3.0
    • Fabric SDK for Java from 2.2.2 to 2.2.3
    • Fabric Gateway for Java from 2.2.0 to 2.2.1
    • Mockito from 3.5.15 to 3.6.0
    • Joda Time from 2.10.6 to 2.10.8
    • io.projectreactor:reactor-core from 3.3.10.RELEASE to 3.4.0
    • Okio from 2.7.0 to 2.9.0
    • OkHttp from 4.5.0 to 4.9.0

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-Match on 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=json by default. Instead the Accept header is set to application/json by default.

The following changes apply to experimental functionality of the SAP Cloud SDK:

  • The SCP service Hyperledger Fabric on SAP Cloud Platform is deprecated, the corresponding Maven dependency com.sap.cloud.sdk.services:scp-blockchain gets deprecated too. Use the dependency com.sap.cloud.sdk.serices:blockchain-client-fabric instead.
  • The method setResponseFormat() in the class ODataRequestGeneric is no longer available. You can still configure the Accept header via the method addHeaderIfAbsent(). Example: request.addHeaderIfAbsent(HttpHeaders.ACCEPT, "application/xml").
  • The enum com.sap.cloud.sdk.datamodel.odata.client.request.ODataFormat is 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.Binary as value type for Entity properties. In Java, this type is conveniently represented as byte[]. 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 DocumentComplianceElectronicDocumentFileService for API ELECTRONICDOCFILE_0001

Improvements

  • OData requests contain the Accept header with value application/json by default.

  • Dependency Updates:

    • SAP Cloud Security Client from 2.7.7 to 2.7.8
    • SAP Cloud Application Programming Model from version 1.40.6 to 1.40.11
    • Guava from 29.0-jre to 30.0-jre
    • Lombok from 1.18.14 to 1.18.16
    • Caffeine from 2.8.5 to 2.8.6
    • Resilience4j from 1.6.0 to 1.6.1
    • Mockito from 3.5.13 to 3.5.15
    • Fabric SDK for Java from 2.2.1 to 2.2.2
    • Netty from 4.1.52.Final to 4.1.53.Final

3.31.0 - October 22, 2020

Javadoc | Release blog | Maven Central

New Functionality

Improvements

  • The Workflow API client library in module scp-workflow-cf got 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.RELEASE to overcome the security vulnerability CVE-2020-5421.
    • Apache HttpComponents from version 4.5.12 to 4.5.13
    • Jackson from 2.11.2 to 2.11.3
    • Java JWT from 3.10.3 to 3.11.0
    • JUnit Pioneer from version 0.9.0 to 1.0.0
    • Lombok from version 1.18.12 to 1.18.14
    • Mockito from version 3.5.11 to 3.5.13
    • Resilience4J from version 1.5.0 to 1.6.0
    • Spring Security from 5.4.0 to 5.4.1
    • io.projectreactor:reactor-core from 3.3.9.RELEASE to 3.3.10.RELEASE
    • JUnit from version 4.13 to 4.13.1
    • Tomcat from 9.0.37 to 9.0.39, fixing the vulnerability CVE-2020-13943

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 DefaultErpHttpDestination decorates an On-Premise HttpDestination and the destination configuration lacks a sap-client property, an information message is logged to raise awareness for potential authentication issues.

  • Dependency Updates:

    • Update Spring Boot from 2.3.3.RELEASE to 2.3.4.RELEASE
    • Update JUnit Jupiter from 5.6.2 to 5.7.0
    • Update Spring from 5.2.8.RELEASE to 5.2.9.RELEASE
    • Update Spring Security from 5.3.4.RELEASE to 5.4.0
    • Update Mockito from 3.5.10 to 3.5.11
  • Maven Plugin Updates in Archetypes:

    • Update Maven Surefire Plugin from 3.0.0-M4 to 3.0.0-M5
    • Update Maven Jacoco Plugin from 0.8.5 to 0.8.6