WSDL declares this type:
<xs:complexType name="TTMHeader">
<xs:sequence>
<xs:element name="DSN" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
<xs:element name="Schema" type="xs:string"/>
<xs:element name="Username" type="xs:string"/>
</xs:sequence>
</xs:complexType>
wsdl2ruby generates this class:
# {urn:TruckMateTypes}TTMHeader
class TTMHeader
@@schema_type = "TTMHeader"
@@schema_ns = "urn:TruckMateTypes"
@@schema_element = [
["dSN", ["SOAP::SOAPString", XSD::QName.new(nil, "DSN")]],
["password", ["SOAP::SOAPString", XSD::QName.new(nil,
"Password")]],
["schema", ["SOAP::SOAPString", XSD::QName.new(nil, "Schema")]],
["username", ["SOAP::SOAPString", XSD::QName.new(nil,
"Username")]]
]
attr_accessor :dSN
attr_accessor :password
attr_accessor :schema
attr_accessor :username
def initialize(dSN = nil, password = nil, schema = nil, username =
nil)
@dSN = dSN
@password = password
@schema = schema
@username = username
end
end
Mapping generates this output
<n1:TTMHeader xmlns:n1="urn:TruckMateTypes"
xsi:type="n1:TTMHeader"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<dSN xsi:type="xsd:string">xxx</dSN>
<password xsi:type="xsd:string">xxx</password>
<schema xsi:type="xsd:string">xxx</schema>
<username xsi:type="xsd:string">xxx</username>
</n1:TTMHeader>
which is violates the schema definition.
Note that soap4r version which is bundled with the current Ruby doesn't
have this problem