Refine search
public RawMessage unmarshall(StaxUnmarshallerContext context) throws Exception { RawMessage rawMessage = new RawMessage(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return rawMessage; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Data", targetDepth)) { rawMessage.setData(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return rawMessage; } } } }
public RawMessage unmarshall(StaxUnmarshallerContext context) throws Exception { RawMessage rawMessage = new RawMessage(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("Data", targetDepth)) { rawMessage .setData(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return rawMessage; }
@Test public void testByteBufferStaxUnmarshaller() throws Exception { SimpleTypeStaxUnmarshallers.ByteBufferStaxUnmarshaller unmarshaller = SimpleTypeStaxUnmarshallers.ByteBufferStaxUnmarshaller .getInstance(); ByteBuffer unmarshalled = unmarshaller.unmarshall(getContext(Base64.encodeAsString("byte" .getBytes(StringUtils.UTF8)))); assertEquals(unmarshalled, ByteBuffer.wrap("byte".getBytes(StringUtils.UTF8))); }
/** * Constructor. * @return the instance. */ public static ByteBufferStaxUnmarshaller getInstance() { if (instance == null) instance = new ByteBufferStaxUnmarshaller(); return instance; } }
/** * Constructor. * @return the instance. */ public static ByteBufferStaxUnmarshaller getInstance() { if (instance == null) instance = new ByteBufferStaxUnmarshaller(); return instance; } }
/** * Constructor. * @return the instance. */ public static ByteBufferStaxUnmarshaller getInstance() { if (instance == null) instance = new ByteBufferStaxUnmarshaller(); return instance; } }
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance() .unmarshall(context)); continue;
public GetMetricWidgetImageResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetMetricWidgetImageResult getMetricWidgetImageResult = new GetMetricWidgetImageResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getMetricWidgetImageResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("MetricWidgetImage", targetDepth)) { getMetricWidgetImageResult.setMetricWidgetImage(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getMetricWidgetImageResult; } } } }
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance() .unmarshall(context)); continue; if (context.testExpression("BinaryListValue", targetDepth)) { messageAttributeValue.withBinaryListValues(ByteBufferStaxUnmarshaller .getInstance().unmarshall(context)); continue;
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return messageAttributeValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("DataType", targetDepth)) { messageAttributeValue.setDataType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("StringValue", targetDepth)) { messageAttributeValue.setStringValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return messageAttributeValue; } } } }
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance() .unmarshall(context)); continue;
public GetCredentialReportResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetCredentialReportResult getCredentialReportResult = new GetCredentialReportResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getCredentialReportResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Content", targetDepth)) { getCredentialReportResult.setContent(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ReportFormat", targetDepth)) { getCredentialReportResult.setReportFormat(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("GeneratedTime", targetDepth)) { getCredentialReportResult.setGeneratedTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getCredentialReportResult; } } } }
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance() .unmarshall(context)); continue; if (context.testExpression("BinaryListValue", targetDepth)) { messageAttributeValue.withBinaryListValues(ByteBufferStaxUnmarshaller .getInstance().unmarshall(context)); continue;
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return messageAttributeValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("StringValue", targetDepth)) { if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("BinaryListValue", targetDepth)) { messageAttributeValue.withBinaryListValues(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public VirtualMFADevice unmarshall(StaxUnmarshallerContext context) throws Exception { VirtualMFADevice virtualMFADevice = new VirtualMFADevice(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return virtualMFADevice; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SerialNumber", targetDepth)) { if (context.testExpression("Base32StringSeed", targetDepth)) { virtualMFADevice.setBase32StringSeed(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("QRCodePNG", targetDepth)) { virtualMFADevice.setQRCodePNG(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public RawMessage unmarshall(StaxUnmarshallerContext context) throws Exception { RawMessage rawMessage = new RawMessage(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return rawMessage; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Data", targetDepth)) { rawMessage.setData(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return rawMessage; } } } }
public GetCredentialReportResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetCredentialReportResult getCredentialReportResult = new GetCredentialReportResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getCredentialReportResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Content", targetDepth)) { getCredentialReportResult.setContent(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ReportFormat", targetDepth)) { getCredentialReportResult.setReportFormat(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("GeneratedTime", targetDepth)) { getCredentialReportResult.setGeneratedTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getCredentialReportResult; } } } }
public MessageAttributeValue unmarshall(StaxUnmarshallerContext context) throws Exception { MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return messageAttributeValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("StringValue", targetDepth)) { if (context.testExpression("BinaryValue", targetDepth)) { messageAttributeValue.setBinaryValue(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("BinaryListValue", targetDepth)) { messageAttributeValue.withBinaryListValues(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public VirtualMFADevice unmarshall(StaxUnmarshallerContext context) throws Exception { VirtualMFADevice virtualMFADevice = new VirtualMFADevice(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return virtualMFADevice; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SerialNumber", targetDepth)) { if (context.testExpression("Base32StringSeed", targetDepth)) { virtualMFADevice.setBase32StringSeed(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("QRCodePNG", targetDepth)) { virtualMFADevice.setQRCodePNG(ByteBufferStaxUnmarshaller.getInstance().unmarshall(context)); continue;