Hi,

I have followed the AIXS2 version 1.0 userguide to generate code from
WSDL file, and I have detected that the code to parsing the incomming
message of type <all> is false. According to the W3C standard, the order
of elements within <all> is not identical. However, the generated code
treats only one identical order as correct, all others as false.
Considering the data type SOAPStruct in example
$AXIS2_HOME/samples/wsdl/Axis2SampleDocLit.wsdl:
<complexType name="SOAPStruct">
   <all>
       <element name="varFloat" type="xsd:float"/>
       <element name="varInt" type="xsd:int"/>
       <element name="varString" type="xsd:string"/>
   </all>
</complexType>

According to the generated code, only element with the subelements in
the order varFloar - varString - varInt is correct. The abbr. generated
code is in the following.

P.S.: Could anyone to enhance the layout of the generated codes?

Thanks,

Lijun Liao

Abbr. generated Code:

public static SOAPStruct parse(javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception{
           try {
               while (!reader.isStartElement() && !reader.isEndElement())
                   reader.next();
                   reader.next();
                                   while (!reader.isStartElement() &&
!reader.isEndElement())
                                       reader.next();
                           if (reader.isStartElement() && new
javax.xml.namespace.QName("http://userguide.axis2.apache.org/xsd","varFloat";).equals(reader.getName())){
                                ...
                                       reader.next();

                             }  // End of if for expected property
start element
                               else{
                                   throw new
java.lang.RuntimeException(...);
                               }
                                   while (!reader.isStartElement() &&
!reader.isEndElement())
                                       reader.next();
                           if (reader.isStartElement() && new
javax.xml.namespace.QName("http://userguide.axis2.apache.org/xsd","varString";).equals(reader.getName())){
                                        ...
                                       reader.next();

                             }  // End of if for expected property
start element
                               else{
                                   throw new
java.lang.RuntimeException(...);
                               }
                                   while (!reader.isStartElement() &&
!reader.isEndElement())
                                       reader.next();
                           if (reader.isStartElement() && new
javax.xml.namespace.QName("http://userguide.axis2.apache.org/xsd","varInt";).equals(reader.getName())){
                                        ...
                                       reader.next();
                             }  // End of if for expected property
start element

                               else{
                                   // A start element we are not
expecting indicates an invalid parameter was passed
                                   throw new
java.lang.RuntimeException(...);
                               }

           } catch (javax.xml.stream.XMLStreamException e) {
               throw new java.lang.Exception(e);
           }

           return object;
}

--
Dipl.-Ing. Lijun Liao
Chair for Network and Data Security
Ruhr-Universitaet Bochum
D- 44780 Bochum

Dept. of Electr. Eng. Information Sciences
Building IC, Level 4, Room 147
Universitaetsstr. 150
Phone: (+49) (0)234 / 32 - 25199
Fax:   (+49) (0)234 / 32 - 14347




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to