Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #352 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

abstract type is added to the Mapping Registry, which causes malfunction

Reported by: user Assigned to: nahi
Priority: normal Milestone: 1.5.6
Component: soap4r Version: 1.5
Keywords: Cc: leos.bitto@gmail.com

Description

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.

Attachments

literalregistry.diff (0.8 kB) - added by nahi on 06/04/07 10:55:01.
I found that [1805] unintentionally changed schema definition detection order.

Change History

06/03/07 06:07:25 changed by user

Additionally, I have found two new entries in the Mapping Registry created by wsdl2ruby - and as with Payload, they are added in versions 1.5.5.20070528 and 1.5.5.20070602, but they were not in 1.5.5.20070520:

LiteralRegistry?.register(

:class => Pack, :schema_ns => "http://some.name/sMessage/Envelope", :schema_name => "Pack", :schema_qualified => true, :schema_element => [

["header", [nil, XSD::QName.new("http://some.name/sMessage/Envelope", "Header")], [0, 1]], ["envelope", ["Envelope[]", XSD::QName.new("http://some.name/sMessage/Envelope", "Envelope")], [1, nil]]

]

)

LiteralRegistry?.register(

:class => Envelope, :schema_ns => "http://some.name/sMessage/Envelope", :schema_name => "Envelope", :schema_qualified => true, :schema_element => [

["header", [nil, XSD::QName.new("http://some.name/sMessage/Envelope", "Header")]], ["payload", ["Payload", XSD::QName.new("http://some.name/sMessage/Envelope", "Payload")]]

]

)

Those entries seem to be suspicious to be, because they are nearly the same as these similar entries (which were in 1.5.5.20070520, too):

LiteralRegistry?.register(

:class => Pack, :schema_ns => "http://cz.o2.com/sMessage/Envelope", :schema_type => "Pack", :schema_qualified => false, :schema_element => [

["header", [nil, XSD::QName.new("http://cz.o2.com/sMessage/Envelope", "Header")], [0, 1]], ["envelope", ["Envelope[]", XSD::QName.new("http://cz.o2.com/sMessage/Envelope", "Envelope")], [1, nil]]

]

)

LiteralRegistry?.register(

:class => Envelope, :schema_ns => "http://cz.o2.com/sMessage/Envelope", :schema_type => "Envelope", :schema_qualified => false, :schema_element => [

["header", [nil, XSD::QName.new("http://cz.o2.com/sMessage/Envelope", "Header")]], ["payload", ["Payload", XSD::QName.new("http://cz.o2.com/sMessage/Envelope", "Payload")]]

]

)

As you can see, they differ only in :schema_qualified. Is it just weird or is it a bug?

06/03/07 06:11:00 changed by user

  • cc set to leos.bitto@gmail.com.
  • milestone changed from undefined to 1.5.6.

06/04/07 10:55:01 changed by nahi

  • attachment literalregistry.diff added.

I found that [1805] unintentionally changed schema definition detection order.

06/05/07 00:21:55 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1830]) * abstract return type definition causes illegal marshalling/unmarshalling. [1805] unintentionally changed schema definition detection order. closes #352.