def self.schema_definition_classdef(klass)
if Thread.current[:SOAPMapping][:SchemaDefinition].key?(klass)
return Thread.current[:SOAPMapping][:SchemaDefinition][klass]
end
schema_ns = schema_ns_definition(klass)
schema_name = schema_name_definition(klass)
schema_type = schema_type_definition(klass)
qualified = schema_qualified_definition(klass)
elements = schema_element_definition(klass)
attributes = schema_attribute_definition(klass)
return nil if schema_name.nil? and schema_type.nil?
schema_name = Mapping.to_qname(schema_name, schema_ns) if schema_name
schema_type = Mapping.to_qname(schema_type, schema_ns) if schema_type
definition = create_schema_definition(klass,
:schema_name => schema_name,
:schema_type => schema_type,
:is_anonymous => false,
:schema_qualified => qualified,
:schema_element => elements,
:schema_attribute => attributes
)
Thread.current[:SOAPMapping][:SchemaDefinition][klass] = definition
definition
end