adb-bindings for typeless parameter only gives access to the first element if passed an array ---------------------------------------------------------------------------------------------
Key: AXIS2C-1421 URL: https://issues.apache.org/jira/browse/AXIS2C-1421 Project: Axis2-C Issue Type: Bug Components: wsdl2c tool Affects Versions: 1.6.0 Environment: MS Windows XP, Visual C++ 6.0 Reporter: Thomas Baier When generating server code including adb bindings from a WSDL like the following: ... <wsdl:types> ... <s:element name="SetSymbol"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="pName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="pData" /> </s:sequence> </s:complexType> </s:element> <s:element name="SetSymbolResponse"> <s:complexType /> </s:element> ... </wsdl:types> ... <wsdl:message name="SetSymbolSoapIn"> <wsdl:part name="parameters" element="tns:SetSymbol" /> </wsdl:message> <wsdl:message name="SetSymbolSoapOut"> <wsdl:part name="parameters" element="tns:SetSymbolResponse" /> </wsdl:message> ... <wsdl:portType name="StatConnectorSoap"> ... <wsdl:operation name="SetSymbol"> <wsdl:input message="tns:SetSymbolSoapIn" /> <wsdl:output message="tns:SetSymbolSoapOut" /> </wsdl:operation> ... </wsdl:portType> ... <wsdl:binding name="StatConnectorSoap" type="tns:StatConnectorSoap"> ... <wsdl:operation name="SetSymbol"> <soap:operation soapAction="http://www.statconn.com/StatConnector/SetSymbol" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> ... </wsdl:binding> <wsdl:binding name="StatConnectorSoap12" type="tns:StatConnectorSoap"> ... <wsdl:operation name="SetSymbol"> <soap12:operation soapAction="http://www.statconn.com/StatConnector/SetSymbol" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> ... </wsdl:binding> ... the code generated for adb_SetSymbol.c does not correctly give access to the parameter "pData". E.g, when passing the following SOAP request to the WS: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <SetSymbol xmlns="http://www.statconn.com/StatConnector"> <pName>myvar</pName> <pData xsi:type="ArrayOfAnyType"> <anyType xsi:type="xsd:double">3.14</anyType> <anyType xsi:type="xsd:int">815</anyType> <anyType xsi:type="xsd:string">My String</anyType> </pData> </SetSymbol> </soap:Body> </soap:Envelope> Only access to the first element of pData is provided (<anyType xsi:type="xsd:double">3.14</anyType>). axiom_node_get_next_sibling() for pData returns NULL and not as expected the node <anyType xsi:type="xsd:int">815</anyType>. Changing the WSDL definition for pData to <s:element minOccurs="0" maxOccurs="1" name="pData" type="s:anyType" /> produces the expected results for arrays. A comment by Dimuthu Gamage on axis-c-user may give a hint on how to fix this > yea look like it is a bug in wsdl2c. I think having the condition check > <xsl:when test="@any or not(@type)"> should solve the issue. Please raise a > jira for this. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.