private void writeSimpleType(XmlOutputStream out, TypeInfo info, String value, boolean isSet, String javaType) throws IOException { if (!isSet && info.getMinOcc() == 0) { return; } if (value == null) { writeNull(out, info); } else { out.writeStartTag(getNamespace(info), info.getName()); if (writeFieldXsiType) { writeXsiType(out, info.getTypeNS(), info.getType()); } else { if ("anyType".equals(info.getType()) && Constants.SCHEMA_NS.equals(info.getTypeNS())) { QName xmlType = getXmlType(javaType); if (xmlType == null) { throw new IOException("Failed to find xml type for java type: " + javaType); } writeXsiType(out, xmlType.getNamespaceURI(), xmlType.getLocalPart()); } } out.writeText(value); out.writeEndTag(getNamespace(info), info.getName()); } }
if ("date".equals(typeInfo.getType()) || (xsiType != null && "date".equals(xsiType.getLocalPart()))) { return dateCodec.deserialize(readString(in, typeInfo, type));
private void writeSimpleType(XmlOutputStream out, TypeInfo info, String value, boolean isSet, String javaType) throws IOException { if (!isSet && info.getMinOcc() == 0) { return; } if (value == null) { writeNull(out, info); } else { out.writeStartTag(getNamespace(info), info.getName()); if (writeFieldXsiType) { writeXsiType(out, info.getTypeNS(), info.getType()); } else { if ("anyType".equals(info.getType()) && Constants.SCHEMA_NS.equals(info.getTypeNS())) { QName xmlType = getXmlType(javaType); if (xmlType == null) { throw new IOException("Failed to find xml type for java type: " + javaType); } writeXsiType(out, xmlType.getNamespaceURI(), xmlType.getLocalPart()); } } out.writeText(value); out.writeEndTag(getNamespace(info), info.getName()); } }
if ("date".equals(typeInfo.getType()) || (xsiType != null && "date".equals(xsiType.getLocalPart()))) { return dateCodec.deserialize(readString(in, typeInfo, type));