From 475b62de777edb285f32607cd4501b9c9d551d63 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Mon, 19 Nov 2012 15:25:30 +0000
Subject: [PATCH] Fix OPENDJ-502 DSML gateway not correctly forwarding modifications to userCertificate;binary attributes
---
opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java | 30 +-----------------------------
1 files changed, 1 insertions(+), 29 deletions(-)
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
index 59681b7..4179833 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
@@ -43,8 +43,6 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.LDAPException;
-import org.w3c.dom.Element;
-
/**
* This class provides the functionality for the performing an
@@ -114,33 +112,7 @@
String requestName = extendedRequest.getRequestName();
Object value = extendedRequest.getRequestValue();
- ByteString asnValue = null;
- // value is optional in the request
- if (value != null)
- {
- /*
- * The processing of the value is tricky, because the schema defines
- * the requestValue with type="xsd:anyType".
- *
- * Consequently if we have:
- * <requestValue xsi:type="xsd:base64Binary">(base64)</requestValue>
- * then JAXB returns us a byte [] containing the decoded data.
- */
- if (value instanceof byte [])
- {
- asnValue = ByteString.wrap((byte [])value);
- }
- else
- {
- /*
- * On the other hand if we have:
- * <requestValue>arbitrary text</requestValue>
- * then we get an Element which we have to extract the text from.
- */
- Element content = (Element)value;
- asnValue = ByteString.valueOf(content.getTextContent());
- }
- }
+ ByteString asnValue = ByteStringUtility.convertValue(value);
// Create and send the LDAP request to the server.
ProtocolOp op = new ExtendedRequestProtocolOp(requestName, asnValue);
--
Gitblit v1.10.0