Event mesh messaging cloud sdk for java does not work as expected

62 views Asked by At

I want to use this library https://api.sap.com/api/SAPEventMeshDefaultMessagingAPIs/cloud-sdk/Java to post messages to my queue.

What have I tried so far: Removed OneOf keywords as per documentation Generation of the library failed but the artifacts were created successfully

What failed: Using SynchronousMessagingApi in particular this method queuesQueueNameMessagesPost to post messages to queue.

I have two issues with this api:

First, the content type 'any-content-type' is hardcoded and it always throws error if not uncommented.

final String[] localVarContentTypes = { "any-content-type" };

in method selectHeaderContentType it always picks the hardcoded content type 'any-content-type'

Second, the method queuesQueueNameMessagesPost signature for payload is a java.io.File but event messaging does not file input.

Any help would be appreciated. Thanks

1

There are 1 answers

1
Charles Dubois On BEST ANSWER

There are two ways of fixing the specification:

  • The quickest option would be to edit the spec file to replace any-content-type: by application/json: or text/plain: on the broken variables and methods
  • But you can also reach out to the SAP Event Mesh team directly or use component id BC-CP-EM-MES if you have access to service now and ask the team for a fix on the spec file.