[ 
https://issues.apache.org/jira/browse/AXIS2-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463263
 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-1921:
-----------------------------------------------------

hi 
Is your problem Creating the above java files (NumberColumns, size and type) 
directly under src folder without going to a package?
Here is the reason
<xsd:complexType name="QueryResultSetType">
        <xsd:sequence>

            <xsd:element name="size" minOccurs="1">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:int">
                        <xsd:minInclusive value="0"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="numberColumns" minOccurs="1">
                <xsd:simpleType>
                    <xsd:restriction base="xsd:int">
                        <xsd:minInclusive value="1"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>
          
    </xsd:complexType>

size and numberColumns have difined as two elements under complex type 
QueryResultSetType  . Axis2 creates two seperate classes for these elements 
since they do not have previously defined types. 
Axis2 chooses the packge and class names using the qulified name of the 
element. i.e. package name is selected using the element namespace and the 
class name is choosen using the element local name. In this case if 
elementFormQualified has not set to qualified then the element namespace is 
absent. As a the result package name becomes an empty string and class file is 
created directly under root folder.

therefore I belive this is the correct way of generating the code if the 
element namespace is absent(i.e. if elementFormQualified attribute is not set 
to qualified).

> WSDL2JAVA fail to generate class from IBM Process Server BFM Web Service 
> Service(BFMWS.wsdl)
> --------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1921
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1921
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1, 1.1, nightly
>         Environment: Windows XP, JDK 1.5.07
>            Reporter: Giampaolo Tranchida
>         Attachments: BFMIF.wsdl, BFMIF.xsd, BFMWS.wsdl, BPCGen.xsd, 
> SAP_example.wsdl
>
>
> The WSDL 
> With Axis2 1.1
> C:\TEMP\processServer>wsdl2java -uri BFMWS.wsdl -o BFMIF
> Using AXIS2_HOME:   C:\apps\java\axis2-1.1
> Using JAVA_HOME:    C:\jdk1.5.0_07
> Retrieving document at 'BFMIF.wsdl', relative to 
> 'file:/C:/TEMP/processServer/'.
> Retrieving schema at 'BFMIF.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.wsdl'.
> Retrieving schema at 'BPCGen.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.xsd'.
> Retrieving schema at 'BPCGen.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.wsdl'.
> Exception in thread "main" 
> org.apache.axis2.wsdl.codegen.CodeGenerationException: 
> java.lang.RuntimeException: java.lang.reflect.Invo
> cationTargetException
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: java.lang.RuntimeException: 
> java.lang.reflect.InvocationTargetException
>         at 
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:52)
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>         ... 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:585)
>         at 
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:49)
>         ... 3 more
> Caused by: org.apache.axis2.schema.SchemaCompilationException: 
> java.lang.NullPointerException
>         at 
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:257)
>         at 
> org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
>         ... 8 more
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
>         at 
> org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
>         at 
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
>         at 
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
>         at 
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:318)
>         at 
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:318)
>         at 
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
>         ... 9 more
> With Axis2 1.1.1-snapshot
> Using AXIS2_HOME:   C:\apps\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    C:\jdk1.5.0_07
> Retrieving document at 'BFMIF.wsdl', relative to 
> 'file:/C:/TEMP/processServer/'.
> Retrieving schema at 'BFMIF.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.wsdl'.
> Retrieving schema at 'BPCGen.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.xsd'.
> Retrieving schema at 'BPCGen.xsd', relative to 
> 'file:/C:/TEMP/processServer/BFMIF.wsdl'.
> 29 d?c. 2006 08:32:47 org.apache.axis2.schema.SchemaCompiler findClassName
> ATTENTION: Type {http://www.w3.org/2001/XMLSchema}anySimpleType missing!
> 29 d?c. 2006 08:32:47 org.apache.axis2.schema.SchemaCompiler findClassName
> ATTENTION: Type {http://www.w3.org/2001/XMLSchema}anySimpleType missing!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.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