Hi,
I downloaded the 1.7.0 Snapshot and ran again, and it has even bigger
problems with the WSDL.  It threw and exception and really was not happy
with the duplicated element names.  Below is the exception trace, and as can
be seen in bold, it is balking on the AccountOpen.  So it seems Axis2 1.5.6
generates the wrong code and 1.7.0 cannot handle the WSDL at all.  Let me
know if you still need me to open a JRIA.  Only problem is that my WSDL file
is huge, and includes many xsd files.  Unless you can reproduce the problem
with a smaller WSDL sample.

Let me know.  Mark


D:\development\3.1\activeSourceProjects\CEB_MockServer_v2.0\java\scripts>"D:/axi
s2-1.7.0-SNAPSHOT/bin/wsdl2java"        -o D:/temp/CWExternInteropWSV2/
-p "mtvnCWExternInteropWSV2_pkg"        -u      -ns2p
mtvnCBCMSeInteropReqData=m
tvnCBCMSeInteropReqData,mtvnCEExternSSOReqData=mtvnCEExternSSOReqData,mtvnCWExte
rnInteropReq=mtvnCWExternInteropReq,mtvnCWExternInteropRes=mtvnCWExternInteropRe
s,mtvnCWExternInteropResData=mtvnCWExternInteropResData,mtvnDXIntopAcctOpenReqDa
ta=mtvnDXIntopAcctOpenReqData,mtvnDXIntopGenReqData=mtvnDXIntopGenReqData,mtvnEx
tInteropReqData=mtvnExtInteropReqData,mtvnGCAcctOpenSSOReqData=mtvnGCAcctOpenSSO
ReqData,mtvnLOSIntopAcctOpenReqData=mtvnLOSIntopAcctOpenReqData         -or
-d adb  -uri
D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/ws
dl/CWExternInteropWSV2.wsdl
Using AXIS2_HOME:   D:/axis2-1.7.0-SNAPSHOT
Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_20
Retrieving document at
'D:/development/3.1/activeSourceProjects/CEB_MockServer_v
2.0/java/wsdl/CWExternInteropWSV2.wsdl'.
Retrieving schema at './ExternInteropReqV2.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/CWExternInteropWSV2.ws
dl'.
Retrieving schema at 'ExternalInteropReqDatav5.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternInteropReqV2
.xsd'.
Retrieving schema at 'LOSAcctOpenInteropReqDataV2.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInterop
ReqDatav5.xsd'.
Retrieving schema at 'CBCMSeInteropReqData.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInteropReqData
v5.xsd'.
Retrieving schema at 'GCAcctOpenSSOReqData.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInteropReqData
v5.xsd'.
Retrieving schema at 'DXAcctOpenInteropReqDataV3.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInteropR
eqDatav5.xsd'.
Retrieving schema at 'CEExternSSOReqData.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInteropReqDatav5
.xsd'.
Retrieving schema at 'DXGenIntopReqDataV2.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternalInteropReqDatav
5.xsd'.
Retrieving schema at './ExternInteropResV2.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/CWExternInteropWSV2.ws
dl'.
Retrieving schema at './ExternalInteropResDataV2.xsd', relative to
'file:/D:/development/3.1/activeSourceProjects/CEB_MockServer_v2.0/java/wsdl/ExternInteropRes
V2.xsd'.
log4j:WARN No appenders could be found for logger
(org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
        ... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: The
referenced element '{mtvnDXIntopAcctOpenReqData}AccountOpen' was not found!
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:603)
        at
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2063)
        at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1982)
        at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1155)
        at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1054)
        at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1008)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:644)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:603)
        at
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2063)
        at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1982)
        at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1155)
        at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1054)
        at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1008)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:644)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:603)
        at
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2063)
        at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1946)
        at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1155)
        at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1054)
        at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1008)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:644)
        at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:614)
        at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:422)
        at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:381)
        at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:381)
        at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:291)
        at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
        ... 8 more



Sagara wrote:
> 
> 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
> 
> 
> -----
> Sagara Gunathunga
> 
> Blog -  http://ssagara.blogspot.com 
> Web - http://sagaras.awardspace.com/ 
> 

-- 
View this message in context: 
http://old.nabble.com/Axis2-WSDL2Java-has-probem-with-WSDL-elements-of-the-same-name...-tp32850645p32855211.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

Reply via email to