mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(ses): add missing Result element to query protocol responses (#207)
This commit is contained in:
1 parent
55b2f292cc
commit
80e205452b
3 files changed
+17
-6
No files matched your search
@@ -77,6 +77,14 @@ public final class AwsQueryResponse {
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as {@link #envelope} but with an empty Result element.
|
||||
* Some services (e.g. SES) require the Result element even if it is empty.
|
||||
*/
|
||||
public static String envelopeEmptyResult(String action, String xmlns) {
|
||||
return envelope(action, xmlns, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a Query-protocol XML error response and returns a JAX-RS {@link Response}.
|
||||
*
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SesQueryHandler {
|
||||
private Response handleVerifyEmailIdentity(MultivaluedMap<String, String> params, String region) {
|
||||
String emailAddress = getParam(params, "EmailAddress");
|
||||
sesService.verifyEmailIdentity(emailAddress, region);
|
||||
return Response.ok(AwsQueryResponse.envelopeNoResult("VerifyEmailIdentity", AwsNamespaces.SES)).build();
|
||||
return Response.ok(AwsQueryResponse.envelopeEmptyResult("VerifyEmailIdentity", AwsNamespaces.SES)).build();
|
||||
}
|
||||
|
||||
private Response handleVerifyEmailAddress(MultivaluedMap<String, String> params, String region) {
|
||||
@@ -81,7 +81,7 @@ public class SesQueryHandler {
|
||||
private Response handleDeleteIdentity(MultivaluedMap<String, String> params, String region) {
|
||||
String identityValue = getParam(params, "Identity");
|
||||
sesService.deleteIdentity(identityValue, region);
|
||||
return Response.ok(AwsQueryResponse.envelopeNoResult("DeleteIdentity", AwsNamespaces.SES)).build();
|
||||
return Response.ok(AwsQueryResponse.envelopeEmptyResult("DeleteIdentity", AwsNamespaces.SES)).build();
|
||||
}
|
||||
|
||||
private Response handleListIdentities(MultivaluedMap<String, String> params, String region) {
|
||||
@@ -197,7 +197,7 @@ public class SesQueryHandler {
|
||||
String notificationType = getParam(params, "NotificationType");
|
||||
String snsTopic = getParam(params, "SnsTopic");
|
||||
sesService.setIdentityNotificationTopic(identityValue, notificationType, snsTopic, region);
|
||||
return Response.ok(AwsQueryResponse.envelopeNoResult("SetIdentityNotificationTopic", AwsNamespaces.SES)).build();
|
||||
return Response.ok(AwsQueryResponse.envelopeEmptyResult("SetIdentityNotificationTopic", AwsNamespaces.SES)).build();
|
||||
}
|
||||
|
||||
private Response handleGetIdentityNotificationAttributes(MultivaluedMap<String, String> params, String region) {
|
||||
|
||||
Reference in new issue
Block a user