[ 
http://issues.apache.org/jira/browse/AXISCPP-778?page=comments#action_12318300 
] 

Dushshantha Chandradasa commented on AXISCPP-778:
-------------------------------------------------

Hi Mark,


The reason for the missing int element is that you dont set the namespace for 
int element in the wsdl.
If i change the wsdl as follows, wsdl2ws tool doesn't miss the int element in 
the middle.

<xsd:complexType name="MyType"> 
        <xsd:sequence> 
          <xsd:any/> 
          <xsd:element name="IntType" type="xsd:int"/> 
          <xsd:any/> 
        </xsd:sequence> 
      </xsd:complexType> 

Your original wsdl defined IntType as follows
         <element name="IntType" type="xsd:int"/> 

The tool generates codes for this in the following manner which has the a 
problem in defining the any type.

                     AnyType*   any;
        xsd__int        IntType;
        AnyType*        any;


The Current implementation of wsdl2ws tool assumes that there can be only one 
element of xsd_any type for a complex type. But this assumption is wrong. we 
can have more than one any element for a complex type. 

To solve this prblem, i propose to have a counter for any elements and add the 
the number to the any element name ( any1 , any2 ...)

Thoughts please...



> WSDL2Ws generates bad code with multiple xsd:any's in a complex type
> --------------------------------------------------------------------
>
>          Key: AXISCPP-778
>          URL: http://issues.apache.org/jira/browse/AXISCPP-778
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Reporter: Mark Whitlock

>
> I had a wsdl that has a complex type that contained a sequence of xsd:any, 
> xsd:int and another xsd:any. The class that WSDL2Ws generated contained two 
> AnyType's both with a field name of any and no int. Firstly the int was 
> missing. Secondly the generated class would not compile since the two fields 
> had the same name.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to