You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ji...@apache.org on 2004/03/23 16:28:58 UTC

[jira] Commented: (AXIS-1259) local xsd:group constructs are not processed properly

The following comment has been added to this issue:

     Author: Dominic Battre
    Created: Tue, 23 Mar 2004 7:27 AM
       Body:
Thank you for your very quick fix but I think the issue is not solved completely.

WSDL2Java runs now without problems now but does not generate code for SimpleRestrictionModel so it does not compile.

domi@domi2:~/uni/bachelor/tmp0$ java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true --verbose -a test.wsdl
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Parsing XML file:  test.wsdl
Generating com/your_company/www/Untitled_xsd1/Foobartype.java
UntitledBindingImpl.java already exists, WSDL2Java will not overwrite it.
Generating com/your_company/www/Untitled_wsdl/UntitledPortType.java
Generating com/your_company/www/Untitled_wsdl/UntitledBindingStub.java
Generating com/your_company/www/Untitled_wsdl/UntitledBindingSkeleton.java
Generating com/your_company/www/Untitled_wsdl/Untitled.java
Generating com/your_company/www/Untitled_wsdl/UntitledLocator.java
Generating com/your_company/www/Untitled_wsdl/deploy.wsdd
Generating com/your_company/www/Untitled_wsdl/undeploy.wsdd
domi@domi2:~/uni/bachelor/tmp0$ find . -iname '*.java' | xargs javac
./com/your_company/www/Untitled_xsd1/Foobartype.java:11: package org.w3.www._2001.XMLSchema does not exist
    private org.w3.www._2001.XMLSchema.SimpleRestrictionModel simpleRestrictionModel;
                                      ^
./com/your_company/www/Untitled_xsd1/Foobartype.java:22: package org.w3.www._2001.XMLSchema does not exist
    public org.w3.www._2001.XMLSchema.SimpleRestrictionModel getSimpleRestrictionModel() {
                                     ^
./com/your_company/www/Untitled_xsd1/Foobartype.java:32: package org.w3.www._2001.XMLSchema does not exist
    public void setSimpleRestrictionModel(org.w3.www._2001.XMLSchema.SimpleRestrictionModel simpleRestrictionModel) {
                                                                    ^
./com/your_company/www/Untitled_xsd1/Foobartype.java:63: inconvertible types
found   : java.lang.String
required: int
            _hashCode += getSimpleRestrictionModel().hashCode();
                                                             ^
./com/your_company/www/Untitled_wsdl/UntitledBindingStub.java:64: package org.w3.www._2001.XMLSchema does not exist
            cls = org.w3.www._2001.XMLSchema.SimpleRestrictionModel.class;
                                            ^
5 errors


I added
<xsd:import schema="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd" />
right in front of the <types>-section. Now WSDL2Java produces code for XMLSchema, but raises an exception:

domi@domi2:~/uni/bachelor/tmp0$ java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true --verbose -a test.wsdl
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Parsing XML file:  test.wsdl
{http://www.w3.org/2001/XMLSchema}derivationSet>null already exists
{http://www.w3.org/2001/XMLSchema}fullDerivationSet>null already exists
{http://www.w3.org/2001/XMLSchema}blockSet>null already exists
{http://www.w3.org/2001/XMLSchema}namespaceList>null already exists
{http://www.w3.org/2001/XMLSchema}simpleDerivationSet>null already exists
Generating org/w3/www/_2001/XMLSchema/TopLevelSimpleType.java
Generating com/your_company/www/Untitled_xsd1/Foobartype.java
Generating org/w3/www/_2001/XMLSchema/DerivationControl.java
Generating org/w3/www/_2001/XMLSchema/_keyref.java
Generating org/w3/www/_2001/XMLSchema/LocalElement.java
Generating org/w3/www/_2001/XMLSchema/AttrDecls.java
Generating org/w3/www/_2001/XMLSchema/Redefinable.java
Generating org/w3/www/_2001/XMLSchema/TypeDefParticle.java
Generating org/w3/www/_2001/XMLSchema/BlockSet.java
Generating org/w3/www/_2001/XMLSchema/_namedGroup_all.java
Generating org/w3/www/_2001/XMLSchema/LocalComplexType.java
Generating org/w3/www/_2001/XMLSchema/RealGroup.java
Generating org/w3/www/_2001/XMLSchema/_totalDigits.java
Generating org/w3/www/_2001/XMLSchema/FullDerivationSet.java
Generating org/w3/www/_2001/XMLSchema/SimpleRestrictionModel.java
Generating org/w3/www/_2001/XMLSchema/SimpleDerivationSet_null.java
Generating org/w3/www/_2001/XMLSchema/_notation.java
Generating org/w3/www/_2001/XMLSchema/AllNNI_null.java
Generating org/w3/www/_2001/XMLSchema/FormChoice.java
Generating org/w3/www/_2001/XMLSchema/RestrictionType.java
Generating org/w3/www/_2001/XMLSchema/Keybase.java
Generating org/w3/www/_2001/XMLSchema/FullDerivationSet_null.java
Generating org/w3/www/_2001/XMLSchema/TopLevelElement.java
Generating org/w3/www/_2001/XMLSchema/_attribute_use.java
Generating org/w3/www/_2001/XMLSchema/Group.java
Generating org/w3/www/_2001/XMLSchema/NamespaceList.java
Generating org/w3/www/_2001/XMLSchema/Facets.java
Generating org/w3/www/_2001/XMLSchema/_union.java
Generating org/w3/www/_2001/XMLSchema/ComplexRestrictionType.java
Generating org/w3/www/_2001/XMLSchema/Particle.java
Generating org/w3/www/_2001/XMLSchema/SimpleDerivation.java
Generating org/w3/www/_2001/XMLSchema/IdentityConstraint.java
Generating org/w3/www/_2001/XMLSchema/ComplexType.java
Generating org/w3/www/_2001/XMLSchema/_selector.java
Generating org/w3/www/_2001/XMLSchema/__whiteSpace_value.java
Generating org/w3/www/_2001/XMLSchema/SimpleDerivationSet.java
Generating org/w3/www/_2001/XMLSchema/SimpleType.java
Generating org/w3/www/_2001/XMLSchema/Annotated.java
Generating org/w3/www/_2001/XMLSchema/NamedAttributeGroup.java
Generating org/w3/www/_2001/XMLSchema/NamespaceList_null.java
Generating org/w3/www/_2001/XMLSchema/_pattern.java
Generating org/w3/www/_2001/XMLSchema/AllModel.java
Generating org/w3/www/_2001/XMLSchema/All.java
Generating org/w3/www/_2001/XMLSchema/_whiteSpace.java
Generating org/w3/www/_2001/XMLSchema/TopLevelComplexType.java
Generating org/w3/www/_2001/XMLSchema/DerivationSet_null.java
Generating org/w3/www/_2001/XMLSchema/BlockSet_null.java
Generating org/w3/www/_2001/XMLSchema/_all_minOccurs.java
Generating org/w3/www/_2001/XMLSchema/Attribute.java
Generating org/w3/www/_2001/XMLSchema/_simpleContent.java
org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: org/w3/www/_2001/XMLSchema/DerivationControl.java.
Hint: you may have mapped two namespaces with elements of the same name to the same package name.
        at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
        at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:112)
        at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:409)
        at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:519)
        at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:406)
        at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:336)
        at java.lang.Thread.run(Thread.java:536)

Thank you for your help.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1259&page=comments#action_26479

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1259

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1259
    Summary: local xsd:group constructs are not processed properly
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Axis
 Components: 
             WSDL processing
   Fix Fors:
             current (nightly)
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Dominic Battre

    Created: Tue, 23 Mar 2004 5:07 AM
    Updated: Tue, 23 Mar 2004 7:27 AM
Environment: Gentoo Linux, Blackdown JDK 1.4.1

Description:
The fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26548 seems to create some problems concerning xsd:groups.

At least WSDL2Java (cvs as of Feb 5 2004) processes the following code without complains whilst WSDL2Java (cvs as of Feb 6 2004) produces this exception:

java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true --verbose test.wsdl

Parsing XML file:  test.wsdl
java.io.IOException: Type {http://www.w3.org/2001/XMLSchema}simpleRestrictionModel is referenced but not defined.
        at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:670)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:550)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:524)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:501)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:374)
        at java.lang.Thread.run(Thread.java:536)


The wsdl code creating the problem is

 <xsd:complexType name="foobartype">
    <xsd:sequence>
       <xsd:group ref="xsd:simpleRestrictionModel" minOccurs="0"/>
    </xsd:sequence>
 </xsd:complexType>

I will attach the whole wsdl file and the patch that was applied on Feb 6 2004.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira