[ 
https://issues.apache.org/jira/browse/AXIS2-5296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nguyen Giap updated AXIS2-5296:
-------------------------------

    Description: 
Hi, 

WSDL and XML Schema Data Types should be with attached.

I am working with the XML Schema datatypes of Open Travel Alliance. It should 
do a simple operation with the request data type OTA_HotelAvailRQ.

After I implemented WSDL document and validated it with no error, I have tried 
generating the java code of the server side by using the WSDL2Java tool. 

But it fail on the console with the error message: can not find the attribute 
group reference name {http://www.opentravel.org/OTA/2003/05}RateRangeGroup from 
the parent schema http://www.opentravel.org/OTA/2003/05
Anyhow the attribute group RateRangeGroup is found in tge file 
OTA_CommonTypes.xsd.

Thanks in advance,

Giap

  was:
Hi, 

WSDL and XML Schema Data Types should be with attached.

I am working with the XML Schema datatypes of Open Travel Alliance. It should 
do a simple Operation with the request data type OTA_HotelAvailRQ.

After I implemented WSDL document and validated it with no error, I have tried 
generating the java code of the server side by using the WSDL2Java tool. 

But it fail on the console with the error message: can not find the attribute 
group reference name {http://www.opentravel.org/OTA/2003/05}RateRangeGroup from 
the parent schema http://www.opentravel.org/OTA/2003/05
Anyhow the attribute group RateRangeGroup is found in tge file 
OTA_CommonTypes.xsd

C:\tomcat\workspace\Hotel\OpenTravel2011B_XML>C:\tomcat\axis2-1.6.1\bin\wsdl2java.bat
 -uri Hotel.wsdl -ss -sd
Using AXIS2_HOME:   C:\tomcat\axis2-1.6.1
Using JAVA_HOME:    D:\Programme\Java\java_ee_sdk-6u2-jdk-windows-ml\jdk
Retrieving document at 'Hotel.wsdl'.
Retrieving schema at 'OTA_HotelAvailRQ.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/Hotel.wsdl'.
Retrieving schema at 'OTA_HotelCommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_HotelAvailRQ.xsd'.
Retrieving schema at 'OTA_Profile.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_HotelCommonTypes.xsd'.
Retrieving schema at 'OTA_AirPreferences.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_Profile.xsd'.
Retrieving schema at 'OTA_AirCommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_AirPreferences.xsd'.
Retrieving schema at 'OTA_CommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_AirCommonTypes.xsd'.
Retrieving schema at 'OTA_SimpleTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_CommonTypes.xsd'.
Retrieving schema at 'OTA_AirPreferences.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_AirCommonTypes.xsd'.
Retrieving schema at 'OTA_CommonPrefs.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_AirPreferences.xsd'.
Retrieving schema at 'OTA_CommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_CommonPrefs.xsd'.
Retrieving schema at 'OTA_HotelPreferences.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_Profile.xsd'.
Retrieving schema at 'OTA_CommonPrefs.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_HotelPreferences.xsd'.
Retrieving schema at 'OTA_VehicleCommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_Profile.xsd'.
Retrieving schema at 'OTA_CommonPrefs.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_VehicleCommonTypes.xsd'.
Retrieving schema at 'OTA_RailPreferences.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_Profile.xsd'.
Retrieving schema at 'OTA_CommonPrefs.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_RailPreferences.xsd'.
Retrieving schema at 'OTA_RailCommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_RailPreferences.xsd'.
Retrieving schema at 'OTA_HotelPreferences.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_RailCommonTypes.xsd'.
Retrieving schema at 'OTA_CommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_RailCommonTypes.xsd'.
Retrieving schema at 'OTA_HotelReservation.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_HotelCommonTypes.xsd'.
Retrieving schema at 'OTA_HotelCommonTypes.xsd', relative to 
'file:/C:/tomcat/workspace/Hotel/OpenTravel2011B_XML/OTA_HotelReservation.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:35)
        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: can not find the 
attribute group reference name 
{http://www.opentravel.org/OTA/2003/05}RateRangeGroup from the parent schema 
http://www.opentravel.org/OTA/2003/05
        at 
org.apache.axis2.schema.SchemaCompiler.processAttributeGroupReference(SchemaCompiler.java:1200)
        at 
org.apache.axis2.schema.SchemaCompiler.processAttributes(SchemaCompiler.java:1187)
        at 
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1159)
        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: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.processNamedComplexSchemaType(SchemaCompiler.java:1091)
        at 
org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1260)
        at 
org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1227)
        at 
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1171)
        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:291)
        at 
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
        ... 8 more

Regards,

Giap

    
> WSDL2Java fails with "Can not find an attribute group for group reference" 
> ---------------------------------------------------------------------------
>
>                 Key: AXIS2-5296
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5296
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.6.1
>         Environment: Windows XP 
> Java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)
>            Reporter: Nguyen Giap
>              Labels: none
>         Attachments: OpenTravel2011B_XML.rar, log.txt
>
>
> Hi, 
> WSDL and XML Schema Data Types should be with attached.
> I am working with the XML Schema datatypes of Open Travel Alliance. It should 
> do a simple operation with the request data type OTA_HotelAvailRQ.
> After I implemented WSDL document and validated it with no error, I have 
> tried generating the java code of the server side by using the WSDL2Java 
> tool. 
> But it fail on the console with the error message: can not find the attribute 
> group reference name {http://www.opentravel.org/OTA/2003/05}RateRangeGroup 
> from the parent schema http://www.opentravel.org/OTA/2003/05
> Anyhow the attribute group RateRangeGroup is found in tge file 
> OTA_CommonTypes.xsd.
> Thanks in advance,
> Giap

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to