Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

[BUG] ETLClient createDataExtensionDataRow have too long size of the request headers for field User-Agent and request failed #130

@hktv-tonyNg

Description

@hktv-tonyNg

Describe the bug
There is bug that when using SDK method com.exacttarget.fuelsdk.ETDataExtension#insert(java.util.List<com.exacttarget.fuelsdk.ETDataExtensionRow>) to insert multiple DataExtensionRow will generate very long header value of User-Agent field and cause API return 400 Bad Request, then no DataExtensionRow can be inserted.

I am following the test case https://github.com/salesforce-marketingcloud/FuelSDK-Java/blob/master/src/test/java/com/exacttarget/fuelsdk/ETDataExtensionTest.java#L258 to try create more than 1005 dataExtensionRow in 1 call, but the API return exception

Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '400: Bad Request' when communicating with https://mc9gcnjg01hzkm7nhqwz1k0nk1z0.soap.marketingcloudapis.com/service.asmx

I enable the debug level for FuelSDK and found that the SOAP call request header have very long value like:

FuelSDK-Java-v1.5.0-SOAP-create-DataExtensionRowDataExtensionRow....(repeat)...DataExtensionRowDataExtensionRow (Please find attached log for detail java exception, line 1030)

Then i try simulate the raw soap call with POSTMAN and below error return by salesforce API

image

Sample postman collection is attached. test_DataExtensionRow_header_postman.txt

To Reproduce
1 create ETDataExtension using the test code
2 loop to build size of list of ETDataExtensionRow more than 1005
3 call ETDataExtension.insert(List ETDataExtensionRow)
4 server return 400 bad request

Expected behavior
The API com.exacttarget.fuelsdk.ETDataExtension#insert(java.util.List<com.exacttarget.fuelsdk.ETDataExtensionRow>) can invoke and insert more than 1005 row in 1 API call.

Screenshots
If applicable, add screenshots to help explain your problem.

Code snippet
Please check https://gist.github.com/hktv-tonyNg/03ca278ebe13f56d6a56cbe4436362d8

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.

Environment

  • SDK Version [e.g. 1.1.0]
       <dependency>
            <groupId>com.github.salesforce-marketingcloud</groupId>
            <artifactId>fuelsdk</artifactId>
            <version>1.5.1</version>
        </dependency>
  • Java/ JDK version
    11.0.7

The bug has the severity

  • [X ] Critical: The defect affects critical functionality or critical data. It does not have a workaround.
  • [] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
  • Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
  • Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions