You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Stephen Muccione (JIRA)" <ji...@apache.org> on 2013/04/23 22:03:16 UTC
[jira] [Updated] (CXF-4911) wsdl2js generated code does not parse
type when itterating through array (maxOccur) arrays
[ https://issues.apache.org/jira/browse/CXF-4911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Muccione updated CXF-4911:
----------------------------------
Attachment: XMLFile1.xml
offending schema (wsdl file)
> wsdl2js generated code does not parse type when itterating through array (maxOccur) arrays
> ------------------------------------------------------------------------------------------
>
> Key: CXF-4911
> URL: https://issues.apache.org/jira/browse/CXF-4911
> Project: CXF
> Issue Type: Bug
> Components: JavaScript Client
> Affects Versions: 2.7.3
> Environment: cxf 2.73, windows 7, custom soap server/wsdl generator (WS-I compliant)
> Reporter: Stephen Muccione
> Labels: javascript, wsdl2js
> Attachments: XMLFile1.xml
>
>
> rpc/literal WSDL
> section of WSDL:
> <xsd:complexType name="tdGL0Data">
> <xsd:sequence>
> <xsd:element name="syncIsrCount" minOccurs="1" maxOccurs="1" type="xsd:unsignedInt"/>
> <xsd:element name="GroupSize" minOccurs="1" maxOccurs="1" type="xsd:unsignedInt"/>
> <xsd:element name="LNdata" minOccurs="512" maxOccurs="512" type="xsd:short"/>
> </xsd:sequence>
> </xsd:complexType>
> The generated deserializer for the LNdata element is:
> cxfjsutils.trace('processing LNdata');
> if (curElement != null && cxfjsutils.isNodeNamedNS(curElement, '', 'LNdata')) {
> item = [];
> do {
> var arrayItem = null;
> var value = null;
> if (!cxfjsutils.isElementNil(curElement)) {
> value = cxfjsutils.getNodeText(curElement);
> arrayItem = value;
> }
> item.push(arrayItem);
> curElement = cxfjsutils.getNextElementSibling(curElement);
> }
> while(curElement != null && cxfjsutils.isNodeNamedNS(curElement, '', 'LNdata'));
> newobject.setLNdata(item);
> var item = null;
> }
> return
> }
> the lines:
> value = cxfjsutils.getNodeText(curElement);
> arrayItem = value;
> simply extract the data from the dom and place it directly in into the output array.
> The element was declared as a short, however the parseInt() call was not present in the generated code.
> note: there is no issue with the schema... xsd:unsignedInt was handled in the above 2 cases without issue
--
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