axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: [WSDL2C] Bug in C - ServerStubs - Unexpected Subelement
Date Sun, 19 Aug 2007 04:34:46 GMT
hi,
    This is an error in the serialize logic and the deserialize logic.
The problem arises because adb structures are generated for
all the elements (+for complex types), and there are two ways to
define an element

    1. <xs:element name="matrixAdd" type="ns1:matrixAddType">
       </xs:element>
       <xs:complexType name="matrixAddType">
           <xs:sequence>
              <xs:element minOccurs="0" name="param0" nillable="true"
type="ns1:Matrix"/>
              <xs:element minOccurs="0" name="param1" nillable="true"
type="ns1:Matrix"/>
           </xs:sequence>
        </xs:complexType>

and

    2. <xs:element name="matrixAdd">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="param0"
nillable="true" type="ns1:Matrix"/>
                        <xs:element minOccurs="0" name="param1"
nillable="true" type="ns1:Matrix"/>
                    </xs:sequence>
                </xs:complexType>
       </xs:element>


If the above mentioned "if(has_parent)" check is not done, in the
first case there are two matrixAdd element are
generated in the xml one inside other. So to distinguish these two
cases, we have to use the @anon flag in the
adb templates.

I have done several tests and seems the changes are working.

used wsdls
used wsdls

Adder.wsdl - all outer elements have anonymous types
Adder2.wsdl - Outer elements have anonyous and named types
Adder3.wsdl - All having anonymous type

Attachment consists of the test code for (both stub and skel)

step1 - when if(has_parent) is used in line 1575 -- all outer elements
have anonymous types
step2 - when if(!has_parent) is used
step3 - when the if is removed
step4 - when the if is removed and MatrixAdd has a named type (not a
anonymous type)

step5 - when the @anon is used with all outer elements have anonymous types
step6 - when the @anon is used with outer elements have anonymous
types and named types
step7 - when the @anon is used with all having anonymous types -Adder3.wsdl


Thanks
Dimuthu

On 8/9/07, Dr. Florian Steinborn <florian.steinborn@drb.insel.de> wrote:
> Hi Samisa
>
> > Looks like a logic error in the generated code. I could change the style
> > sheet logic to include this.
> > However, I would like to have a test case to ensure the change works.
> >
>
> attached you find a WSDL and the generated C code with the error. This
> could make it easier to see your change works.
>
> Thanks,
> Flori
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Mime
View raw message