Application calling SOAP web services. One of the xml element is expecting data type as base64Binary
like
<sessionPassword>base64Binary</sessionPassword>
1.I can read it while sax parsing like:
setSessionPassword((new String(ch,start,length)).getBytes());
Is this correct?
2.I need to pass this password field to URI like this:
private static final String URI_BASE = "https://srini3000.com/Conversion/gateway.asmx/ASAPIDList?";
String _sessionNum = "sessionNum=$1&";
String _sessionPaswrd = "sessionPassword=$2&sessionPassword=";
StringBuilder url = new StringBuilder(URI_BASE) ;
url.append(_sessionNum.replace("$1",Integer.toString(xmlHandler.getSessionNum())));
url.append(_sessionPaswrd.replace("$2",xmlHandler.getSessionPassword().toString()));
After making like in point2 I am facing Cannot convert [B@79be0360 to System.Byte.
Any suggestions please.
FYI I am using restlet to make the uri calls.
FYI XmlHandler is a pojo class, built after xml parsing. it has SessionNum
, SessionPassword
(declared as byte[]
) fields.