I have found a regression when using wsdl2ruby in my case, starting with soap4r version 1.5.5.20070528 and still not fixed in 1.5.5.20070602. This is the schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sMsg="http://some.name/sMessage/Payload" elementFormDefault="qualified" targetNamespace="http://some.name/sMessage/Payload">
<xs:annotation>
<xs:documentation>Defines sMessage (Service Message) payload.</xs:documentation>
</xs:annotation>
<xs:complexType abstract="true" name="Payload">
<xs:annotation>
<xs:documentation>All concrete payloads derives from this type.</xs:documentation>
</xs:annotation>
</xs:complexType>
</xs:schema>
And this is what gets added to the mapping registry when using recent wsdl2ruby (this did not happen when I was using 1.5.5.20070520):
LiteralRegistry?.register(
:class => Payload,
:schema_ns => "http://some.name/sMessage/Envelope",
:schema_name => "Payload",
:schema_qualified => true,
:schema_element => []
)
The problem is that now the XML messages are always sent with empty element Payload (as <n2:Payload></n2:Payload> - n2 is defined as xmlns:n2="http://some.name/sMessage/Envelope" earlier), which is incorrect - I specify a concrete payload, which is described in another schema with <xs:extension base="sMessagePayload:Payload"> (the namespace sMessagePayload is "http://some.name/sMessage/Payload"). So I beleive that wsdl2ruby should not add classes which are defined in the schema as abstract="true", exactly as it did not add them in version 1.5.5.20070520 (and possibly earlier, I did not check that).
When I delete that one LiteralRegistry?.register(:class=>Payload,...), everything works fine for me again.