List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList)
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); requestToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { useKeyType.add(domElement); requestToken.setUseKey(useKeyType); useKeyType = requestToken.getUseKey(); if (useKeyType == null) { useKeyType = new UseKeyType(); useKeyType.add(keyInfo); requestToken.setUseKey(useKeyType); } else
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); requestToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { useKeyType.add(domElement); requestToken.setUseKey(useKeyType); useKeyType = requestToken.getUseKey(); if (useKeyType == null) { useKeyType = new UseKeyType(); useKeyType.add(keyInfo); requestToken.setUseKey(useKeyType); } else
UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); useKeyType.add(domElement); responseToken.setUseKey(useKeyType);
List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList)
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); requestToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { useKeyType.add(domElement); requestToken.setUseKey(useKeyType); useKeyType = requestToken.getUseKey(); if (useKeyType == null) { useKeyType = new UseKeyType(); useKeyType.add(keyInfo); requestToken.setUseKey(useKeyType); } else
List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList)
UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); useKeyType.add(domElement); responseToken.setUseKey(useKeyType);
List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList)
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { Element domElement = StaxParserUtil.getDOMElement(xmlEventReader); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else
/** * Write an {@code UseKeyType} to stream * * @param useKeyType * @throws ProcessingException */ private void writeUseKeyType(UseKeyType useKeyType) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE); List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList) { if (useKeyTypeValue instanceof Element) { Element domElement = (Element) useKeyTypeValue; StaxUtil.writeDOMElement(writer, domElement); } else if (useKeyTypeValue instanceof byte[]) { byte[] certificate = (byte[]) useKeyTypeValue; StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT, WSTrustConstants.DSIG_NS); StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS); StaxUtil.writeCharacters(writer, new String(certificate)); StaxUtil.writeEndElement(writer); } else if (useKeyTypeValue instanceof KeyValueType) { writeKeyValueType((KeyValueType) useKeyTypeValue); } else if (useKeyTypeValue instanceof KeyInfoType) { StaxUtil.writeKeyInfo(writer, (KeyInfoType) useKeyTypeValue); } else throw logger.writerUnknownTypeError(useKeyTypeValue.getClass().getName()); } StaxUtil.writeEndElement(writer); }
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { Element domElement = StaxParserUtil.getDOMElement(xmlEventReader); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else
/** * Write an {@code UseKeyType} to stream * * @param useKeyType * * @throws ProcessingException */ private void writeUseKeyType(UseKeyType useKeyType) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE); List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList) { if (useKeyTypeValue instanceof Element) { Element domElement = (Element) useKeyTypeValue; StaxUtil.writeDOMElement(writer, domElement); } else if (useKeyTypeValue instanceof byte[]) { byte[] certificate = (byte[]) useKeyTypeValue; StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT, WSTrustConstants.DSIG_NS); StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS); StaxUtil.writeCharacters(writer, new String(certificate)); StaxUtil.writeEndElement(writer); } else if (useKeyTypeValue instanceof KeyValueType) { writeKeyValueType((KeyValueType) useKeyTypeValue); } else if (useKeyTypeValue instanceof KeyInfoType) { StaxWriterUtil.writeKeyInfo(writer, (KeyInfoType) useKeyTypeValue); } else throw logger.writerUnknownTypeError(useKeyTypeValue.getClass().getName()); } StaxUtil.writeEndElement(writer); }
} else if (tag.equals(WSTrustConstants.USE_KEY)) { subEvent = StaxParserUtil.getNextStartElement(xmlEventReader); UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else if (StaxParserUtil.matches(subEvent, KEYVALUE)) { Element domElement = StaxParserUtil.getDOMElement(xmlEventReader); useKeyType.add(domElement); responseToken.setUseKey(useKeyType); } else
/** * Write an {@code UseKeyType} to stream * * @param useKeyType * * @throws ProcessingException */ private void writeUseKeyType(UseKeyType useKeyType) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE); List<Object> theList = useKeyType.getAny(); for (Object useKeyTypeValue : theList) { if (useKeyTypeValue instanceof Element) { Element domElement = (Element) useKeyTypeValue; StaxUtil.writeDOMElement(writer, domElement); } else if (useKeyTypeValue instanceof byte[]) { byte[] certificate = (byte[]) useKeyTypeValue; StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT, WSTrustConstants.DSIG_NS); StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS); StaxUtil.writeCharacters(writer, new String(certificate)); StaxUtil.writeEndElement(writer); } else if (useKeyTypeValue instanceof KeyValueType) { writeKeyValueType((KeyValueType) useKeyTypeValue); } else if (useKeyTypeValue instanceof KeyInfoType) { StaxWriterUtil.writeKeyInfo(writer, (KeyInfoType) useKeyTypeValue); } else throw logger.writerUnknownTypeError(useKeyTypeValue.getClass().getName()); } StaxUtil.writeEndElement(writer); }
UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); requestToken.setUseKey(useKeyType); useKeyType.add(domElement); requestToken.setUseKey(useKeyType);
List<Object> theList = useKeyType.getAny(); for (Object value : theList)
UseKeyType useKeyType = new UseKeyType(); StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY); useKeyType.add(domElement); requestToken.setUseKey(useKeyType); useKeyType.add(domElement); requestToken.setUseKey(useKeyType);
List<Object> theList = useKeyType.getAny(); for (Object value : theList)
List<Object> theList = useKeyType.getAny(); for (Object value : theList) { if (value instanceof Element) {