On Tue, Nov 15, 2011 at 1:34 PM, winneymj13 <mark.win...@fisglobal.com>wrote:

>
> Hi,
> I am using WSDL2Java (Axis2 version 1.5.6) to generate my java classes but
> I
> am having a problem with a WSDL/xsd that contains the same named element
> under different name space, creating a class with the variables named the
>

Can you test your WSDL file with Axis2 1.7.0 SNAPSHOT version [1] , if the
issue will remains please create a JRIA issue here [2]  and attach your
WSDL file there.

[1] -
https://builds.apache.org/view/A-F/view/Axis2/job/Axis2/ws/axis2/modules/distribution/target/
[2] - https://issues.apache.org/jira/browse/AXIS2

Thanks !



> same.  Below is a small excerpt of the xsd:
>
>
> ---------------------------------------------------------------------------------------------------
> <xs:schema xmlns:DX2="mtvnDXIntopGenReqData"
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:DX1="mtvnDXIntopAcctOpenReqData"
> xmlns:LOS="mtvnLOSIntopAcctOpenReqData"
> targetNamespace="mtvnExtInteropReqData" elementFormDefault="qualified"
> attributeFormDefault="unqualified">
> <xs:element name="MI">
>        <xs:complexType>
>                <xs:choice>
>                        <xs:element ref="LOS:AccountOpen"/>
>                        <xs:element ref="DX1:AccountOpen"/>
>                        <xs:element ref="DX2:GenIntop"/>
>                </xs:choice>
>        </xs:complexType>
> </xs:element>
>
>
> ---------------------------------------------------------------------------------------------------
>
> Notice above how AccountOpen has been defined twice under the LOS and DX1
> namespace.  Below is a snippet of the java generated ( I have removed
> comments for clarity):
>
>
> ---------------------------------------------------------------------------------------------------
> protected mtvnLOSIntopAcctOpenReqData.AccountOpen_type0 localAccountOpen ;
>
> protected boolean localAccountOpenTracker = false ;
>
> public  mtvnLOSIntopAcctOpenReqData.AccountOpen_type0 getAccountOpen(){
>   return localAccountOpen;
> }
>
> protected mtvnDXIntopAcctOpenReqData.AccountOpen_type1 localAccountOpen ;
>
> protected boolean localAccountOpenTracker = false ;
>
> public  mtvnDXIntopAcctOpenReqData.AccountOpen_type1 getAccountOpen(){
>   return localAccountOpen;
> }
>
>
> ---------------------------------------------------------------------------------------------------
>
> As can be seen above the localAccountOpen variable has been declared twice
> with the same name, which will not compile.
>
> A previous version of Axis 1.3 created the class differently and actually
> got it right by declaring the variables as accountOpen and accountOpen2:
>
>
> ---------------------------------------------------------------------------------------------------
>
> private mtvnLOSIntopAcctOpenReqData.AccountOpen accountOpen;
>
> private mtvnDXIntopAcctOpenReqData.AccountOpen accountOpen2;
>
> private mtvnDXIntopGenReqData.GenIntop genIntop;
>
> public ExtIntOpInteropDataMI() {
> }
>
> public ExtIntOpInteropDataMI(
>           mtvnLOSIntopAcctOpenReqData.AccountOpen accountOpen,
>           mtvnDXIntopAcctOpenReqData.AccountOpen accountOpen2,
>           mtvnDXIntopGenReqData.GenIntop genIntop) {
>           this.accountOpen = accountOpen;
>           this.accountOpen2 = accountOpen2;
>           this.genIntop = genIntop;
> }
>
>
> ---------------------------------------------------------------------------------------------------
>
> Any help is appreciated.
>
> --
> View this message in context:
> http://old.nabble.com/Axis2-WSDL2Java-has-probem-with-WSDL-elements-of-the-same-name...-tp32850645p32850645.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

Reply via email to