Пример #1
0
 @Override
 public SoapEnvelope decode(DataInputStream in) throws IOException {
   int len = in.readInt();
   byte[] buf = new byte[len];
   in.readFully(buf);
   UnsynchByteArrayInputStream holder = new UnsynchByteArrayInputStream(buf);
   return SoapSerializer.FromXml(holder);
 }
Пример #2
0
 @Override
 public void encode(SoapEnvelope message, DataOutputStream out) throws IOException {
   UnsynchByteArrayOutputStream holder = new UnsynchByteArrayOutputStream();
   SoapSerializer.ToXml(message, holder);
   byte[] buf = holder.toByteArray();
   out.writeInt(buf.length);
   out.write(buf);
 }
Пример #3
0
 public SoapEnvelope unmarshal(byte[] message) {
   UnsynchByteArrayInputStream bin = new UnsynchByteArrayInputStream(message);
   SoapEnvelope msg = SoapSerializer.FromXml(bin);
   return msg;
 }