Aws-sdk-java-v2: Cannot perform search using CloudSearchDomainClient

Created on 6 Dec 2018  路  3Comments  路  Source: aws/aws-sdk-java-v2

Expected Behavior



Successfully call cloudSearchDomainClient.search and get a response back.

Current Behavior






When calling search through the SDK, the CloudSearch response is a 403 with the message:
When Content-Type:application/x-www-form-urlencoded, URL cannot include query-string parameters (after '?') followed by the URL that got called in the request (with the query and filter as request parameters). However, there appears to be no way, via the SDK (besides manually implementing an HttpClient to circumvent the way the request is being made) to control how the search parameters are sent and/or what the Content-Type is.

Possible Solution



Allow the user to specify the Content-Type for the SearchRequest or tell the SearchRequest to put the search details as a post-body.

Steps to Reproduce (for bugs)




Make a search off a CloudSearch domain using default configurations with security settings for the domain turned off, for simplicities sake. I've already reverted the code, but I was using very basic and default settings. Notably, I was able to make the same call with the 1.11.x SDK.

Context



This has blocked my team from being able to upgrade our SDK from 1.11.x to 2.x.

Your Environment

  • AWS Java SDK version used:
    2.1.3
  • JDK version used:
    1.8
  • Operating System and version:
    macOS High Sierra
bug

All 3 comments

Identified the problem, working on a fix.

This has been fixed on master, it will be included in our next release. Thanks for reporting!

Thank you for your quick response!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jhovell picture jhovell  路  4Comments

fstendel picture fstendel  路  6Comments

etspaceman picture etspaceman  路  5Comments

tigertoes picture tigertoes  路  6Comments

bigunyak picture bigunyak  路  5Comments