public QName getSuggestedName(Service s, TypeMapping tm, OperationInfo op, int param) { Method m = getMethod(s, op); if (m == null) { return null; } QName name = tm.getTypeCreator().getElementName(m, param); // No mapped name was specified, so if its a complex type use that name // instead if (name == null) { AegisType type = tm.getTypeCreator().createType(m, param); if (type.isComplex() && !type.isAbstract()) { name = type.getSchemaType(); } } return name; }
/** * Allow writing of collections when the type of the collection object is known via * an {@link java.lang.reflect.Type} object. * @param globalContext the context * @param value the object to write. * @param reflectType the type to use in writing the object. * @return */ public static AegisType getWriteTypeStandalone(AegisContext globalContext, Object value, java.lang.reflect.Type reflectType) { if (reflectType == null) { return getWriteTypeStandalone(globalContext, value, (AegisType)null); } return globalContext.getTypeMapping().getTypeCreator().createType(reflectType); }
/** * Allow writing of collections when the type of the collection object is known via * an {@link java.lang.reflect.Type} object. * @param globalContext the context * @param value the object to write. * @param reflectType the type to use in writing the object. * @return */ public static AegisType getWriteTypeStandalone(AegisContext globalContext, Object value, java.lang.reflect.Type reflectType) { if (reflectType == null) { return getWriteTypeStandalone(globalContext, value, (AegisType)null); } return globalContext.getTypeMapping().getTypeCreator().createType(reflectType); }
public QName getSuggestedName(Service s, TypeMapping tm, OperationInfo op, int param) { Method m = getMethod(s, op); if (m == null) { return null; } QName name = tm.getTypeCreator().getElementName(m, param); // No mapped name was specified, so if its a complex type use that name // instead if (name == null) { AegisType type = tm.getTypeCreator().createType(m, param); if (type.isComplex() && !type.isAbstract()) { name = type.getSchemaType(); } } return name; }
AegisType aegisType = typeMapping.getTypeCreator().createType(reflectType); typeMapping.register(aegisType); AegisType t = typeMapping.getType(c); if (t == null) { t = typeMapping.getTypeCreator().createType(c); typeMapping.register(t);
if (superType == null) { superType = getTypeMapping().getTypeCreator().createType(c); if (superType != null) { tm.register(superType);
if (superType == null) { superType = getTypeMapping().getTypeCreator().createType(c); if (superType != null) { tm.register(superType);
/** * Get the <code>AegisType</code> of the elements in the array. * * @return */ public AegisType getComponentType() { Class<?> compType = getTypeClass().getComponentType(); AegisType type; if (componentName == null) { type = getTypeMapping().getType(compType); } else { type = getTypeMapping().getType(componentName); // We couldn't find the type the user specified. One is created // below instead. if (type == null) { LOG.finest("Couldn't find array component type " + componentName + ". Creating one instead."); } } if (type == null) { type = getTypeMapping().getTypeCreator().createType(compType); getTypeMapping().register(type); } return type; }
/** * Get the <code>AegisType</code> of the elements in the array. This is only used for writing an array. * When reading the type is solely determined by the required arrayType soap attribute. */ public AegisType getComponentType() { Class<?> compType = getTypeClass().getComponentType(); AegisType type; if (componentName == null) { type = getTypeMapping().getType(compType); } else { type = getTypeMapping().getType(componentName); // We couldn't find the type the user specified. One is created // below instead. if (type == null) { LOG.finest("Couldn't find array component type " + componentName + ". Creating one instead."); } } if (type == null) { type = getTypeMapping().getTypeCreator().createType(compType); getTypeMapping().register(type); } return type; }
/** * Get the <code>AegisType</code> of the elements in the array. * * @return */ public AegisType getComponentType() { Class<?> compType = getTypeClass().getComponentType(); AegisType type; if (componentName == null) { type = getTypeMapping().getType(compType); } else { type = getTypeMapping().getType(componentName); // We couldn't find the type the user specified. One is created // below instead. if (type == null) { LOG.finest("Couldn't find array component type " + componentName + ". Creating one instead."); } } if (type == null) { type = getTypeMapping().getTypeCreator().createType(compType); getTypeMapping().register(type); } return type; }
/** * Get the <code>AegisType</code> of the elements in the array. This is only used for writing an array. * When reading the type is solely determined by the required arrayType soap attribute. */ public AegisType getComponentType() { Class<?> compType = getTypeClass().getComponentType(); AegisType type; if (componentName == null) { type = getTypeMapping().getType(compType); } else { type = getTypeMapping().getType(componentName); // We couldn't find the type the user specified. One is created // below instead. if (type == null) { LOG.finest("Couldn't find array component type " + componentName + ". Creating one instead."); } } if (type == null) { type = getTypeMapping().getTypeCreator().createType(compType); getTypeMapping().register(type); } return type; }
type = tm.getTypeCreator().createType(instance.getClass()); tm.register(type);
type = tm.getTypeCreator().createType(instance.getClass()); tm.register(type);
@Override public void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException { if (null == object) { MessageWriter nilWriter = writer.getAttributeWriter(XSI_NIL); nilWriter.writeValue("true"); nilWriter.close(); } else { AegisType type = determineType(context, object.getClass()); if (null == type) { TypeMapping tm = context.getTypeMapping(); if (tm == null) { tm = getTypeMapping(); } type = tm.getTypeCreator().createType(object.getClass()); tm.register(type); } writer.writeXsiType(type.getSchemaType()); boolean nextIsBeanType = type instanceof BeanType; if (nextIsBeanType) { ((BeanType)type).writeObjectFromObjectType(object, writer, context, true); } else { type.writeObject(object, writer, context); } } }
@Override public void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException { if (null == object) { MessageWriter nilWriter = writer.getAttributeWriter(XSI_NIL); nilWriter.writeValue("true"); nilWriter.close(); } else { AegisType type = determineType(context, object.getClass()); if (null == type) { TypeMapping tm = context.getTypeMapping(); if (tm == null) { tm = getTypeMapping(); } type = tm.getTypeCreator().createType(object.getClass()); tm.register(type); } writer.writeXsiType(type.getSchemaType()); boolean nextIsBeanType = type instanceof BeanType; if (nextIsBeanType) { ((BeanType)type).writeObjectFromObjectType(object, writer, context, true); } else { type.writeObject(object, writer, context); } } }
/** * {@inheritDoc} */ public void write(Object obj, QName elementName, boolean optional, XMLStreamWriter output, java.lang.reflect.Type objectType) throws Exception { AegisType aegisType = null; if (objectType instanceof Class) { aegisType = getContext().getTypeMapping().getType(objectType); } if (aegisType == null) { TypeCreator creator = getContext().getTypeMapping().getTypeCreator(); aegisType = creator.createType(objectType); } if (aegisType == null) { Message message = new Message("NO_MAPPING_FOR_TYPE", LOG, objectType); throw new DatabindingException(message); } write(obj, elementName, optional, output, aegisType); } }
/** * {@inheritDoc} */ public void write(Object obj, QName elementName, boolean optional, XMLStreamWriter output, java.lang.reflect.Type objectType) throws Exception { AegisType aegisType = null; if (objectType instanceof Class) { aegisType = getContext().getTypeMapping().getType(objectType); } if (aegisType == null) { TypeCreator creator = getContext().getTypeMapping().getTypeCreator(); aegisType = creator.createType(objectType); } if (aegisType == null) { Message message = new Message("NO_MAPPING_FOR_TYPE", LOG, objectType); throw new DatabindingException(message); } write(obj, elementName, optional, output, aegisType); } }
TypeCreator tc = tm.getTypeCreator(); type = tc.createType(desc); } catch (DatabindingException e) {
TypeCreator tc = tm.getTypeCreator(); type = tc.createType(desc); } catch (DatabindingException e) {
aegisType = getContext().getTypeMapping().getType(obj.getClass()); if (aegisType == null) { TypeCreator creator = getContext().getTypeMapping().getTypeCreator(); aegisType = creator.createType(obj.getClass());