Author: veithen
Date: Wed Nov 14 12:03:27 2012
New Revision: 1409173
URL: http://svn.apache.org/viewvc?rev=1409173&view=rev
Log:
Merged r1409145 to the 1.6 branch.
Modified:
axis/axis2/java/core/branches/1_6/ (props changed)
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/XMLUtils.java
axis/axis2/java/core/branches/1_6/modules/saaj/ (props changed)
axis/axis2/java/core/branches/1_6/modules/saaj/src/org/apache/axis2/saaj/AttachmentPartImpl.java
axis/axis2/java/core/branches/1_6/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Propchange: axis/axis2/java/core/branches/1_6/
------------------------------------------------------------------------------
Merged /axis/axis2/java/core/trunk:r1409145
Modified:
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Wed Nov 14 12:03:27 2012
@@ -41,7 +41,7 @@ import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamReader;
import org.apache.axiom.om.*;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.AxisFault;
import org.apache.axis2.classloader.BeanInfoCache;
import org.apache.axis2.context.MessageContext;
@@ -189,7 +189,7 @@ public class BeanUtil {
if (Byte.TYPE.equals(ptype.getComponentType())) {
addTypeQname(elemntNameSpace,
propertyQnameValueList,
property, beanName,
processingDocLitBare);
-
propertyQnameValueList.add(Base64.encode((byte[]) value));
+
propertyQnameValueList.add(Base64Utils.encode((byte[]) value));
} else {
int i1 = Array.getLength(value);
for (int j = 0; j < i1; j++) {
@@ -361,7 +361,7 @@ public class BeanUtil {
break;
}
}
- return Base64.decode(partElement.getText());
+ return Base64Utils.decode(partElement.getText());
} else {
Iterator parts = beanElement.getChildElements();
OMElement omElement;
@@ -799,7 +799,7 @@ public class BeanUtil {
if (SimpleTypeMapper.isSimpleType(classType)) {
if (isArrayType && "byte".equals(classType.getName())) {
String value = omElement.getText();
- return Base64.decode(value);
+ return Base64Utils.decode(value);
} else {
return getSimpleTypeObjectChecked(classType,
omElement);
}
@@ -900,7 +900,7 @@ public class BeanUtil {
}
objects.add(wrappingElement);
} else if (arg instanceof byte[]) {
- objects.add(Base64.encode((byte[]) arg));
+ objects.add(Base64Utils.encode((byte[]) arg));
} else if (SimpleTypeMapper.isDataHandler(arg.getClass()))
{
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement wrappingElement;
Modified:
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Wed Nov 14 12:03:27 2012
@@ -23,7 +23,7 @@ import org.apache.axiom.attachments.Byte
import org.apache.axiom.attachments.utils.IOUtils;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.util.AXIOMUtil;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axiom.util.stax.XMLStreamReaderUtils;
import org.apache.axiom.util.stax.XMLStreamWriterUtils;
import org.apache.axis2.databinding.ADBBean;
@@ -347,7 +347,7 @@ public class ConverterUtil {
}
public static String convertToString(byte[] bytes) {
- return Base64.encode(bytes);
+ return Base64Utils.encode(bytes);
}
public static String convertToString(javax.activation.DataHandler handler)
{
@@ -540,7 +540,7 @@ public class ConverterUtil {
return null;
}
ByteArrayDataSource byteArrayDataSource = new ByteArrayDataSource(
- Base64.decode(s)
+ Base64Utils.decode(s)
);
return new DataHandler(byteArrayDataSource);
}
@@ -1360,7 +1360,7 @@ public class ConverterUtil {
}
inStream = dataHandler.getDataSource().getInputStream();
byte[] data = IOUtils.getStreamAsByteArray(inStream);
- return Base64.encode(data);
+ return Base64Utils.encode(data);
} catch (Exception e) {
throw new RuntimeException(e);
Modified:
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
Wed Nov 14 12:03:27 2012
@@ -25,9 +25,9 @@ import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMText;
import org.apache.axiom.om.OMXMLBuilderFactory;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.util.Base64;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.databinding.typemapping.SimpleTypeMapper;
@@ -260,7 +260,7 @@ public class RPCUtil {
Object objArray[];
if (resObject instanceof byte[]) {
objArray = new Object[1];
- objArray[0] = Base64.encode((byte[]) resObject);
+ objArray[0] = Base64Utils.encode((byte[]) resObject);
} else {
objArray = new Object[length];
for (int i = 0; i < length; i++) {
@@ -404,7 +404,7 @@ public class RPCUtil {
Object objArray[];
if (resObject instanceof byte[]) {
objArray = new Object[1];
- objArray[0] = Base64.encode((byte[]) resObject);
+ objArray[0] = Base64Utils.encode((byte[]) resObject);
} else {
objArray = new Object[length];
for (int i = 0; i < length; i++) {
Modified:
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
Wed Nov 14 12:03:27 2012
@@ -33,7 +33,7 @@ import javax.activation.DataHandler;
import javax.activation.DataSource;
import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
public class ConverterUtilTest extends TestCase {
@@ -226,7 +226,7 @@ public class ConverterUtilTest extends T
DataSource ds = new ByteArrayDataSource(inStr.getBytes());
DataHandler dh = new DataHandler(ds);
String rawOutStr = ConverterUtil.convertToString(dh);
- String outStr = new String(Base64.decode(rawOutStr));
+ String outStr = new String(Base64Utils.decode(rawOutStr));
assertEquals("Not expected content", inStr, outStr);
}
Modified:
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java
Wed Nov 14 12:03:27 2012
@@ -26,8 +26,8 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.impl.serialize.StreamingOMSerializer;
-import org.apache.axiom.om.util.Base64;
import org.apache.axiom.om.util.StAXUtils;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.databinding.ADBBean;
import org.apache.axis2.databinding.ADBException;
import org.apache.axis2.databinding.utils.Constants;
@@ -766,7 +766,7 @@ public class ADBXMLStreamReaderTest exte
String expectedXML = "<ns1:testElementText
xmlns:ns1=\"http://testElementText.org\">" +
"<ns2:QualifiedElement
xmlns:ns2=\"http://testQElementText.org\">" +
- Base64.encode(textTobeSent.getBytes()) +
+ Base64Utils.encode(textTobeSent.getBytes()) +
"</ns2:QualifiedElement></ns1:testElementText>";
try {
ArrayList properties = new ArrayList();
Modified:
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoService2.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
Wed Nov 14 12:03:27 2012
@@ -28,7 +28,7 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.impl.MTOMConstants;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.context.MessageContext;
public class EchoService2 {
@@ -53,7 +53,7 @@ public class EchoService2 {
response = fac.createOMElement("response", ns);
elem = fac.createOMElement("data", ns);
- elem.setText(Base64.encode(data));
+ elem.setText(Base64Utils.encode(data));
response.addChild(elem);
return response;
Modified:
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/XMLUtils.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/XMLUtils.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/XMLUtils.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/XMLUtils.java
Wed Nov 14 12:03:27 2012
@@ -24,7 +24,7 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMXMLBuilderFactory;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.w3c.dom.Attr;
import org.w3c.dom.CharacterData;
import org.w3c.dom.Document;
@@ -473,7 +473,7 @@ public class XMLUtils {
}
public static String base64encode(byte[] bytes) {
- return Base64.encode(bytes);
+ return Base64Utils.encode(bytes);
}
public static InputSource getEmptyInputSource() {
Propchange: axis/axis2/java/core/branches/1_6/modules/saaj/
------------------------------------------------------------------------------
Merged /axis/axis2/java/core/trunk/modules/saaj:r1409145
Modified:
axis/axis2/java/core/branches/1_6/modules/saaj/src/org/apache/axis2/saaj/AttachmentPartImpl.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/saaj/src/org/apache/axis2/saaj/AttachmentPartImpl.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/saaj/src/org/apache/axis2/saaj/AttachmentPartImpl.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/saaj/src/org/apache/axis2/saaj/AttachmentPartImpl.java
Wed Nov 14 12:03:27 2012
@@ -21,7 +21,7 @@ package org.apache.axis2.saaj;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.saaj.util.SAAJDataSource;
import org.apache.axis2.transport.http.HTTPConstants;
@@ -385,7 +385,7 @@ public class AttachmentPartImpl extends
byte[] rawData = getRawContentBytes();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
- Base64.encode(rawData, 0, rawData.length, out);
+ Base64Utils.encode(rawData, 0, rawData.length, out);
return new ByteArrayInputStream(out.toByteArray());
} catch (IOException e) {
throw new SOAPException(e);
@@ -465,8 +465,8 @@ public class AttachmentPartImpl extends
outputStream.write(buffer, 0, read);
}
String contentString = outputStream.toString();
- if (Base64.isValidBase64Encoding(contentString)) {
- setContent(Base64.decode(contentString), contentType);
+ if (Base64Utils.isValidBase64Encoding(contentString)) {
+ setContent(Base64Utils.decode(contentString), contentType);
} else {
throw new SOAPException("Not a valid Base64 encoding");
}
Modified:
axis/axis2/java/core/branches/1_6/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java?rev=1409173&r1=1409172&r2=1409173&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
(original)
+++
axis/axis2/java/core/branches/1_6/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Wed Nov 14 12:03:27 2012
@@ -21,7 +21,7 @@ package org.apache.axis2.saaj;
import junit.framework.Assert;
import org.apache.axiom.attachments.utils.IOUtils;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
@@ -280,7 +280,7 @@ public class AttachmentTest extends Asse
byte buf[] = IOUtils.getStreamAsByteArray(is);
//Setting Content via InputStream for image/jpeg mime type
ByteArrayOutputStream bos = new ByteArrayOutputStream();
- Base64.encode(buf, 0, buf.length, bos);
+ Base64Utils.encode(buf, 0, buf.length, bos);
buf = bos.toByteArray();
InputStream stream = new ByteArrayInputStream(buf);
ap.setBase64Content(stream, "image/jpeg");