diff options
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/clients/dsmlgw/build.xml | 5 | ||||
-rw-r--r-- | ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java | 6 | ||||
-rw-r--r-- | ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java | 5 | ||||
-rw-r--r-- | ldap/cm/Makefile | 7 |
4 files changed, 18 insertions, 5 deletions
diff --git a/ldap/clients/dsmlgw/build.xml b/ldap/clients/dsmlgw/build.xml index 8509821d..0a050e11 100644 --- a/ldap/clients/dsmlgw/build.xml +++ b/ldap/clients/dsmlgw/build.xml @@ -51,16 +51,20 @@ <property name="ldapjdk.jar" value="${ldapdist.dir}/ldapjdk.jar"/> <property name="activation.jar" value="${globaldist.dir}/activation.jar"/> +<property name="jaf.jar" value="${globaldist.dir}/jaf.jar"/> <property name="jaxrpc-api.jar" value="${globaldist.dir}/jaxrpc-api.jar"/> <property name="jaxrpc.jar" value="${globaldist.dir}/jaxrpc.jar"/> <property name="saaj.jar" value="${globaldist.dir}/saaj.jar"/> <property name="xercesImpl.jar" value="${globaldist.dir}/xercesImpl.jar"/> <property name="xmlParserAPIs.jar" value="${globaldist.dir}/xml-apis.jar"/> <property name="axis.jar" value="${globaldist.dir}/axis.jar"/> +<property name="codec.jar" value="${globaldist.dir}/jakarta-commons-codec.jar"/> +<property environment="env"/> <path id="class.path"> <pathelement location="${ldapjdk.jar}"/> <pathelement location="${activation.jar}"/> +<pathelement location="${jaf.jar}"/> <pathelement location="${jaxrpc-api.jar}"/> <pathelement location="${jaxrpc.jar}"/> <pathelement location="${saaj.jar}"/> @@ -68,6 +72,7 @@ <pathelement location="${xercesImpl.jar}"/> <pathelement location="${xmlParserAPIs.jar}"/> <pathelement location="${axis.jar}"/> +<pathelement location="${codec.jar}"/> </path> <property name="build.dir" value="${mcom.root}/built/dsmlgw"/> diff --git a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java index d74724fc..c1697f17 100644 --- a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java +++ b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java @@ -36,6 +36,8 @@ * --- END COPYRIGHT BLOCK --- */ package com.netscape.dsml.gateway; +import org.apache.commons.codec.binary.Base64; + /** * * @author elliot @@ -53,9 +55,9 @@ public class ParseValue { org.w3c.dom.Node type = n.getAttributes().getNamedItem("xsi:type"); if (type != null && type.getNodeValue().equalsIgnoreCase("xsd:base64Binary") ) { // This value is encoded in base64. decode it. - sun.misc.BASE64Decoder bd = new sun.misc.BASE64Decoder(); + Base64 bd = new Base64(); try { - ret = bd.decodeBuffer( n.getFirstChild().getNodeValue() ) ; + ret = bd.decode( n.getFirstChild().getNodeValue().getBytes() ) ; } catch (org.w3c.dom.DOMException de) { ret = "".getBytes(); diff --git a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java index faa3f5f7..b20438df 100644 --- a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java +++ b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java @@ -62,6 +62,7 @@ import org.apache.axis.AxisFault; import org.apache.axis.Message; import org.apache.axis.MessageContext; import org.apache.axis.handlers.BasicHandler; +import org.apache.commons.codec.binary.Base64; public class gatewayHandler extends BasicHandler { private HandlerInfo handlerInfo; @@ -110,9 +111,9 @@ public class gatewayHandler extends BasicHandler { if ( tmp != null && tmp.startsWith("Basic ") ) { int i ; - sun.misc.BASE64Decoder bd = new sun.misc.BASE64Decoder(); + Base64 bd = new Base64(); try { - tmp = new String( (bd.decodeBuffer(tmp.substring(6) ))); + tmp = new String( (bd.decode(tmp.substring(6).getBytes() ))); } catch (Exception e) { // couldn't decode auth info diff --git a/ldap/cm/Makefile b/ldap/cm/Makefile index f9777862..75c15439 100644 --- a/ldap/cm/Makefile +++ b/ldap/cm/Makefile @@ -359,7 +359,11 @@ ifeq ($(USE_DSMLGW), 1) # now time to move the necessary jars in place $(INSTALL) -m 644 $(LDAPJARFILE) $(RELDIR)/clients/dsmlgw/WEB-INF/lib - $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/activation.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib + if [ -f $(DSMLGWJARS_BUILD_DIR)/jaf.jar ] ; then \ + $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/jaf.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib ; \ + else \ + $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/activation.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib ; \ + fi # if you use the jaxrpc.jar from the axis distribution, you don't need the api file # or perhaps you need the jaxrpc.jar for building, and jaxrpc-api.jar at runtime, or vice versa # if so, I'm not sure where to get the implementation @@ -370,6 +374,7 @@ ifeq ($(USE_DSMLGW), 1) $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/saaj.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/xercesImpl.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/xml-apis.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib + $(INSTALL) -m 644 $(DSMLGWJARS_BUILD_DIR)/jakarta-commons-codec.jar $(EXT_JAVA_RELDIR)/clients/dsmlgw/WEB-INF/lib endif # USE_DSMLGW # PACKAGE_UNDER_JAVA is defined in components.mk - these are component .jar files to install |