DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9060>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9060 (BETA-2) Bean Deserialization Fails - Bad Element Sequence Summary: (BETA-2) Bean Deserialization Fails - Bad Element Sequence Product: Axis Version: beta-1 Platform: All OS/Version: Windows NT/2K Status: NEW Severity: Critical Priority: Other Component: Serialization/Deserialization AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Environment: Axis Beta-2, JDK 1.3.1_01 (using both JAVAC and JIKES 1.15), XERCES 2.0.1 libraries on PC/Win 2000. Used WSDL4J to build a Java SOAP client to accessa SOAP service with sequence constraints on the elements in the SOAP request. (XML example attached below.) The generated classes have setXXX() methods in correct sequence, but do not (runtime) produce a SOAP request with elements in correct order. Cause: The method BeanUtils::processPropertyDescriptors() heavily depends upon Class::GetMethods() to return a list of methods IN THE SAME ORDER as defined in the Java source code. This assumption DOES NOT hold, see http://java.sun.com/j2se/1.3/docs/api/java/lang/Class.html#getMethods() Suggestion: The meta data should contain element sequence information as well. WSDL example: <?xml version="1.0" encoding="UTF-8"?> <definitions name="ValidateCard-interface" targetNamespace="urn:ValidateCard- interface" xmlns:def="urn:ValidateCard-interface" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:cpq_tns_ValidateCard" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <xsd:schema targetNamespace="urn:cpq_tns_ValidateCard" xmlns="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="server_req_info"> <xsd:sequence> <xsd:element name="request_cd" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="airline_cd" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="track_1" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="track_2" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="track_3" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="compid"> <xsd:sequence> <xsd:element name="country_code" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="carrier" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="lineone"> <xsd:sequence> <xsd:element name="filler_180" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="lineone_common_data" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="lineone_data"> <xsd:sequence> <xsd:element name="lineone" type="tns:lineone" minOccurs="1" maxOccurs="1"/> <xsd:element name="trcd" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="delim" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ltermid"> <xsd:sequence> <xsd:element name="lterm_cty_node" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="lterm_line_nr" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="filler" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="userid"> <xsd:sequence> <xsd:element name="usergrp" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="operid" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="user_info"> <xsd:sequence> <xsd:element name="userid" type="tns:userid" minOccurs="1" maxOccurs="1"/> <xsd:element name="dept" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="seclev" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="trg" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="mod" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="logind" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="ltermid" type="tns:ltermid" minOccurs="1" maxOccurs="1"/> <xsd:element name="lineone_data" type="tns:lineone_data" minOccurs="1" maxOccurs="1"/> <xsd:element name="time_out" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="compid" type="tns:compid" minOccurs="1" maxOccurs="1"/> <xsd:element name="pathname" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="sysname" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="resptime" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="addlength" type="xsd:int" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ValidateCardResponse0"> <xsd:sequence> <xsd:element name="reply_cd" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="reply_text" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="valid_for_use_sw" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="id_ty_cd" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="b_e_id_cd" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="b_e_no" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="b_e_id_no" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="b_e_nm" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="first_nm" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="expiry_dt" type="xsd:int" minOccurs="1" maxOccurs="1"/> <xsd:element name="password_req_sw" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ValidateCard"> <xsd:sequence> <xsd:element name="user_info" type="tns:user_info" minOccurs="1" maxOccurs="1"/> <xsd:element name="server_req_info" type="tns:server_req_info" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:schema> </types> <message name="outValidateCardResponse0"> <part name="ValidateCardResponse0" type="tns:ValidateCardResponse0"/> </message> <message name="inValidateCard"> <part name="ValidateCard" type="tns:ValidateCard"/> </message> <portType name="portValidateCard"> <operation name="ValidateCard"> <input name="inValidateCard" message="def:inValidateCard"/> <output name="outValidateCardResponse0" message="def:outValidateCardResponse0"/> </operation> </portType> <binding name="ValidateCardBinding" type="def:portValidateCard"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation type="def:ValidateCard" name="ValidateCard"> <soap:operation soapAction="ValidateCard"/> <input name="inValidateCard"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="ValidateCard" use="encoded"/> </input> <output name="outValidateCardResponse0"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="ValidateCard" use="encoded"/> </output> </operation> </binding> <service name="ValidateCardService"> <port name="def:portValidateCard" binding="def:ValidateCardBinding"> <soap:address location="http://xxxx"/> </port> </service> </definitions>