cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gamma Tora (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4981) wsdl2js failes to generate deserializer for nested complex sequences, but calles the deserialize in the outer type
Date Tue, 21 May 2013 08:39:15 GMT

    [ https://issues.apache.org/jira/browse/CXF-4981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13662810#comment-13662810
] 

Gamma Tora commented on CXF-4981:
---------------------------------

I have the exact same problem with nested complexe types.

Environment: OSX 10.8.3

The following releases have been tested and contains this bug :
- 2.5.10
- 2.6.8
- 2.7.5

                
> wsdl2js failes to generate deserializer for nested complex sequences, but calles the
deserialize in the outer type
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4981
>                 URL: https://issues.apache.org/jira/browse/CXF-4981
>             Project: CXF
>          Issue Type: Bug
>          Components: JavaScript Client
>    Affects Versions: 2.7.4
>         Environment: windows, 2.7.4 released binaries
>            Reporter: Stephen Muccione
>         Attachments: XMLFile1.wsdl
>
>
> When createing a js client where the wsdl has nested complex types, the client code calls
a deserializer that is never emitted (the call looks appropriate)
> The wsdl in question is:
> <xsi:complexType name="continuousNBData">
> <xsi:sequence>
> <xsi:element name="type" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="classId" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="active" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="frequencyRange" minOccurs="2" maxOccurs="2" type="xsi:unsignedInt"/>
> <xsi:element name="peakPower" minOccurs="1" maxOccurs="1" type="xsi:int"/>
> <xsi:element name="peakFrequency" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="capacityImpact" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="duration" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="perMinDuration" minOccurs="15" maxOccurs="15" type="xsi:unsignedInt"/>
> <xsi:element name="hits" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> <xsi:element name="perMinHits" minOccurs="15" maxOccurs="15" type="xsi:unsignedInt"/>
> <xsi:element name="stabilityImpact" minOccurs="1" maxOccurs="1">
> <xsi:complexType>
> <xsi:sequence>
> <xsi:sequence minOccurs="1" maxOccurs="1">
> <xsi:element name="CRC" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> <xsi:sequence minOccurs="1" maxOccurs="1">
> <xsi:element name="FEC" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> <xsi:sequence minOccurs="1" maxOccurs="1">
> <xsi:element name="SES" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> </xsi:sequence>
> </xsi:complexType>
> </xsi:element>
> <xsi:element name="perMinHits" minOccurs="15" maxOccurs="15" type="xsi:unsignedInt"/>
> <xsi:element name="noisePSD" minOccurs="1" maxOccurs="1">
> <xsi:complexType>
> <xsi:sequence>
> <xsi:sequence minOccurs="12" maxOccurs="12">
> <xsi:element name="avgNoisePSD" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> <xsi:sequence minOccurs="12" maxOccurs="12">
> <xsi:element name="maxNoisePSD" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> <xsi:sequence minOccurs="12" maxOccurs="12">
> <xsi:element name="minNoisePSD" minOccurs="1" maxOccurs="1" type="xsi:unsignedInt"/>
> </xsi:sequence>
> </xsi:sequence>
> </xsi:complexType>
> </xsi:element>
> </xsi:sequence>
> </xsi:complexType>
> and the emitted code is:
>     cxfjsutils.trace('curElement: ' + cxfjsutils.traceElementName(curElement));
>     cxfjsutils.trace('processing stabilityImpact');
>     var value = null;
>     if (!cxfjsutils.isElementNil(curElement)) {
>      item = XSDI_stabilityImpact_deserialize(cxfjsutils, curElement);
>     }
>     newobject.setStabilityImpact(item);
> where XSDI_stabilityImpact_deserialize is never emitted:
> of note, this function naming may well be inappropriate.   I have multiple top-level
types declared with the same element name (stabilityImpact) as part of a sequence.   If a
top-level deserializer is emitted, they would have identical names for their embedded element
deserializers.   
> A more appropriate name would be:
> XSDI_continuousNBData_stabilityImpact_deserialize
> should probably chain the element names up the stack until you reach root-level in order
to guarantee uniqueness of names (either that or some other obfuscation mechanism to guarantee
uniqueness)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message