private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) { com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName); if (typeInfo == null) { typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm); typeInfoCache.put(fieldName, typeInfo); } return typeInfo; }
private String getNamespace(TypeInfo info) { return info.isElementFormQualified() ? info.getNamespace() : null; }
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()); } }
public void writeObject(XmlOutputStream out, TypeInfo info, Object value, boolean isSet) throws IOException { if (!isSet && info.getMinOcc() == 0) { return; } if (value == null) { writeNull(out, info); return; } if (info.getMaxOcc() == 1) { writeSingleObject(out, info, value); } else { writeArrayObject(out, info, value); } }
protected void writeFields(XmlOutputStream __out, TypeMapper __typeMapper) throws java.io.IOException { if (actor__is_set) { __out.writeAttribute(actor__typeInfo.getNamespace(), "actor", actor); } if (mustUnderstand__is_set) { String val = mustUnderstand ? "1" : "0"; __out.writeAttribute(mustUnderstand__typeInfo.getNamespace(), "mustUnderstand", val); } }
public Object readObject(XmlInputStream in, TypeInfo info, Class<?> type) throws ConnectionException, IOException { Object result; if (info.getMaxOcc() == 1) { result = readSingle(in, info, type); } else { result = readArray(in, info, type, false); } return result; }
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()); } }
public void writeObject(XmlOutputStream out, TypeInfo info, Object value, boolean isSet) throws IOException { if (!isSet && info.getMinOcc() == 0) { return; } if (value == null) { writeNull(out, info); return; } if (info.getMaxOcc() == 1) { writeSingleObject(out, info, value); } else { writeArrayObject(out, info, value); } }
protected void writeFields(XmlOutputStream __out, TypeMapper __typeMapper) throws java.io.IOException { if (actor__is_set) { __out.writeAttribute(actor__typeInfo.getNamespace(), "actor", actor); } if (mustUnderstand__is_set) { String val = mustUnderstand ? "1" : "0"; __out.writeAttribute(mustUnderstand__typeInfo.getNamespace(), "mustUnderstand", val); } }
public Object readObject(XmlInputStream in, TypeInfo info, Class<?> type) throws ConnectionException, IOException { Object result; if (info.getMaxOcc() == 1) { result = readSingle(in, info, type); } else { result = readArray(in, info, type, false); } return result; }
if ("date".equals(typeInfo.getType()) || (xsiType != null && "date".equals(xsiType.getLocalPart()))) { return dateCodec.deserialize(readString(in, typeInfo, type));
private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) { com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName); if (typeInfo == null) { typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm); typeInfoCache.put(fieldName, typeInfo); } return typeInfo; }
public boolean isElement(XmlInputStream in, TypeInfo info) throws ConnectionException { if (in.getEventType() != XmlInputStream.START_TAG) { return false; } return sameTag(getNamespace(info), info.getName(), in.getNamespace(), in.getName()); }
private String getNamespace(TypeInfo info) { return info.isElementFormQualified() ? info.getNamespace() : null; }
protected void loadFields(XmlInputStream __in, TypeMapper __typeMapper) throws IOException, ConnectionException { actor = __in.getAttributeValue(actor__typeInfo.getNamespace(), "actor"); String val = __in.getAttributeValue(mustUnderstand__typeInfo.getNamespace(), "mustUnderstand"); if (val != null) { if ("0".equals(val)) { setMustUnderstand(false); } else if ("1".equals(val)) { setMustUnderstand(true); } else { throw new ConnectionException("mustUndrestand must be 1 or 0. but found " + val); } } }
private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) { com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName); if (typeInfo == null) { typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm); typeInfoCache.put(fieldName, typeInfo); } return typeInfo; }
public boolean isElement(XmlInputStream in, TypeInfo info) throws ConnectionException { if (in.getEventType() != XmlInputStream.START_TAG) { return false; } return sameTag(getNamespace(info), info.getName(), in.getNamespace(), in.getName()); }