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 "clint dovholuk (JIRA)" <ax...@ws.apache.org> on 2005/04/26 22:29:37 UTC

[jira] Created: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Axis 1.2rc3 does not write derived types from abstract classes to wsdl
----------------------------------------------------------------------

         Key: AXIS-1955
         URL: http://issues.apache.org/jira/browse/AXIS-1955
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC3    
 Environment: os: ms windows xp pro build 2600 with sp 2
app server: resin 2.1.14
ide: eclipse 3.1M6 (used to launch and debug the app)
hardware: p4 3GHz + 1.0 G ram and ample hd space
    Reporter: clint dovholuk
 Attachments: test.jar

After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.

Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
  create these files and compile them:
    TestObj.java
        package test;
        public class TestObj {
          public void testShapeHolder(ShapeHolder shapeHolder) {
            System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
          }
          /*
          this is commented out on purpose, you will remove it in the last steps of the test case
          public void testAbstractShape(AbstractShape shape) {
            System.err.println("SHAPE CLASS: " + shape.getClass());
          }
          */
        }
        
    ShapeTester.java
        package test;
        public class ShapeTester {
          private AbstractShape shape;
          public AbstractShape getShape () { return shape; }
          //public void setShape (AbstractShape shape) { this.shape = shape; }
        }
    
    AbstractShape.java
        package test;
        public abstract class AbstractShape {}
    
    Square.java
        package test;
        public class Square extends AbstractShape {}
    
    Circle.java
        package test;
        public class Circle extends AbstractShape {}
  
  Add this service to the server-config.wsdd
   <service name="absTest" provider="java:RPC">
     <parameter name="allowedMethods" value="*" />
     <parameter name="className" value="test.TestObj" />
     <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
     <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
     <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
   </service>
  
  
  install axis 1.1 and get it running
  
  hit the wsdl and look at the wsdl:types, on my box it looks like:
    <wsdl:types>
      <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType abstract="true" name="AbstractShape">
          <sequence />
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="Circle">
          <complexContent>
            <extension base="tns2:AbstractShape">
              <sequence />
            </extension>
          </complexContent>
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="ShapeTester">
          <sequence>
            <element name="shape" nillable="true" type="tns2:AbstractShape" />
          </sequence>
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="Square">
          <complexContent>
            <extension base="tns2:AbstractShape">
              <sequence />
            </extension>
          </complexContent>
        </complexType>
      </schema>
    </wsdl:types>
  
  replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
  
  hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
    <wsdl:types>
      <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="myWebApp:ShapeTester" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType abstract="true" name="AbstractShape">
          <sequence />
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://test" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="ShapeTester">
          <sequence>
            <element name="shape" nillable="true" type="tns2:AbstractShape" />
          </sequence>
        </complexType>
      </schema>
    </wsdl:types>
  
  uncomment the method in TestObj named testAbstractShape
  
  restart the application
  
  hit the wsdl. you now get the FULL wsdl written out including the types: 
    <wsdl:types>
      <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="myWebApp:ShapeTester" />
        <import namespace="myWebApp:Circle" />
        <import namespace="myWebApp:Square" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType abstract="true" name="AbstractShape">
          <sequence />
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="myWebApp:Circle" />
        <import namespace="http://test" />
        <import namespace="myWebApp:Square" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="ShapeTester">
          <sequence>
            <element name="shape" nillable="true" type="tns2:AbstractShape" />
          </sequence>
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="myWebApp:ShapeTester" />
        <import namespace="myWebApp:Circle" />
        <import namespace="http://test" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="Square">
          <complexContent>
            <extension base="tns2:AbstractShape">
              <sequence />
            </extension>
          </complexContent>
        </complexType>
      </schema>
      <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="myWebApp:ShapeTester" />
        <import namespace="http://test" />
        <import namespace="myWebApp:Square" />
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="Circle">
          <complexContent>
            <extension base="tns2:AbstractShape">
              <sequence />
            </extension>
          </complexContent>
        </complexType>
      </schema>
    </wsdl:types>
  

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by Venkat Reddy <vr...@gmail.com>.
Jaya,
Can you resubmit your patch after running "cvs diff -u" in the specific folder?

- venkat

On 5/27/05, Jayachandra Sekhara Rao Sunkara (JIRA)
<ax...@ws.apache.org> wrote:
>     [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_66427 ]
> 
> Jayachandra Sekhara Rao Sunkara commented on AXIS-1955:
> -------------------------------------------------------
> 
> Thanks Clint, for pointing out this subtle but major issue.
> 
> This didn't appear in the first go as a serious issue to me, but now I totally agree with you that a concrete class if it has field declaration as abstract class, then all the mapped types extending (i.e. deriving from) that abstract class should be written out in the wsdl, otherwise it's not quite possible to create a client request properly for an unaware remote user of that service. In one sense written out WSDL is no longer self descriptive. I've worked on this and came up with a patch.
> I've noticed that in the BeanSerializer.java code when writing out type information for fields, they are just being written out using the types.writeType() method this method doesn't have the necessary logic to write out subTypes of the type we are trying to write out. So I tried to use the types.writeTypeAndSubTypeForPart() method that has the required functionality. I've tried to see I don't disturb *any* other functionality of the class. I'll attach the patch as a diff
> 
> > Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> > ----------------------------------------------------------------------
> >
> >          Key: AXIS-1955
> >          URL: http://issues.apache.org/jira/browse/AXIS-1955
> >      Project: Axis
> >         Type: Bug
> >   Components: WSDL processing
> >     Versions: 1.2RC3
> >  Environment: os: ms windows xp pro build 2600 with sp 2
> > app server: resin 2.1.14
> > ide: eclipse 3.1M6 (used to launch and debug the app)
> > hardware: p4 3GHz + 1.0 G ram and ample hd space
> >     Reporter: clint dovholuk
> >  Attachments: Patch_BeanSerializer.diff, test.jar
> >
> > After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> > Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
> >   create these files and compile them:
> >     TestObj.java
> >         package test;
> >         public class TestObj {
> >           public void testShapeHolder(ShapeHolder shapeHolder) {
> >             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
> >           }
> >           /*
> >           this is commented out on purpose, you will remove it in the last steps of the test case
> >           public void testAbstractShape(AbstractShape shape) {
> >             System.err.println("SHAPE CLASS: " + shape.getClass());
> >           }
> >           */
> >         }
> >
> >     ShapeTester.java
> >         package test;
> >         public class ShapeTester {
> >           private AbstractShape shape;
> >           public AbstractShape getShape () { return shape; }
> >           //public void setShape (AbstractShape shape) { this.shape = shape; }
> >         }
> >
> >     AbstractShape.java
> >         package test;
> >         public abstract class AbstractShape {}
> >
> >     Square.java
> >         package test;
> >         public class Square extends AbstractShape {}
> >
> >     Circle.java
> >         package test;
> >         public class Circle extends AbstractShape {}
> >
> >   Add this service to the server-config.wsdd
> >    <service name="absTest" provider="java:RPC">
> >      <parameter name="allowedMethods" value="*" />
> >      <parameter name="className" value="test.TestObj" />
> >      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
> >      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
> >      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
> >    </service>
> >
> >
> >   install axis 1.1 and get it running
> >
> >   hit the wsdl and look at the wsdl:types, on my box it looks like:
> >     <wsdl:types>
> >       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType abstract="true" name="AbstractShape">
> >           <sequence />
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="Circle">
> >           <complexContent>
> >             <extension base="tns2:AbstractShape">
> >               <sequence />
> >             </extension>
> >           </complexContent>
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="ShapeTester">
> >           <sequence>
> >             <element name="shape" nillable="true" type="tns2:AbstractShape" />
> >           </sequence>
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="Square">
> >           <complexContent>
> >             <extension base="tns2:AbstractShape">
> >               <sequence />
> >             </extension>
> >           </complexContent>
> >         </complexType>
> >       </schema>
> >     </wsdl:types>
> >
> >   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
> >
> >   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
> >     <wsdl:types>
> >       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="myWebApp:ShapeTester" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType abstract="true" name="AbstractShape">
> >           <sequence />
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="http://test" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="ShapeTester">
> >           <sequence>
> >             <element name="shape" nillable="true" type="tns2:AbstractShape" />
> >           </sequence>
> >         </complexType>
> >       </schema>
> >     </wsdl:types>
> >
> >   uncomment the method in TestObj named testAbstractShape
> >
> >   restart the application
> >
> >   hit the wsdl. you now get the FULL wsdl written out including the types:
> >     <wsdl:types>
> >       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="myWebApp:ShapeTester" />
> >         <import namespace="myWebApp:Circle" />
> >         <import namespace="myWebApp:Square" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType abstract="true" name="AbstractShape">
> >           <sequence />
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="myWebApp:Circle" />
> >         <import namespace="http://test" />
> >         <import namespace="myWebApp:Square" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="ShapeTester">
> >           <sequence>
> >             <element name="shape" nillable="true" type="tns2:AbstractShape" />
> >           </sequence>
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="myWebApp:ShapeTester" />
> >         <import namespace="myWebApp:Circle" />
> >         <import namespace="http://test" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="Square">
> >           <complexContent>
> >             <extension base="tns2:AbstractShape">
> >               <sequence />
> >             </extension>
> >           </complexContent>
> >         </complexType>
> >       </schema>
> >       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
> >         <import namespace="myWebApp:ShapeTester" />
> >         <import namespace="http://test" />
> >         <import namespace="myWebApp:Square" />
> >         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> >         <complexType name="Circle">
> >           <complexContent>
> >             <extension base="tns2:AbstractShape">
> >               <sequence />
> >             </extension>
> >           </complexContent>
> >         </complexType>
> >       </schema>
> >     </wsdl:types>
> >
> 
> --
> 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
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
> 
>

[jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "clint dovholuk (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_12313467 ] 

clint dovholuk commented on AXIS-1955:
--------------------------------------

ok, this works great for an attribute that is a single class.  but it turns out that if you use an array, it doesn't write the wsdl properly.

for example:

public class Myclass
{
   private AbstractSomething            thing1;
   private AbstractSomethingElse[]  thing2;
  /*  
  ... more code...
   */
}

AbstractSomething will be written to the wsdl, AbstractSomethingElse will not...

should i post another bug or reopen this one?

Thanks,
-Clint

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>      Fix For: 1.2.1
>  Attachments: 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_66341 ]
     
Jayachandra Sekhara Rao Sunkara commented on AXIS-1955:
-------------------------------------------------------

Hi,
I tried to reproduce the issue. Well, as such I don't think this is hindering the SOAP message processing for now. My Testclients ran fine. Also to me what Axis1.2 did (with the second method commented out) appeared to be sensible. We better publish only those types that take part in the message exchange than giving out type information of all the unnecessary helper(?) classes described in the server-config.wsdd, isn't it? I'm yet to precisely figure out why that behaviour is not getting reflected when we uncomment the second method and run things. Will post my observations soon on that as well.

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "clint dovholuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_66347 ]
     
clint dovholuk commented on AXIS-1955:
--------------------------------------

I agree that the message processing isn't being affected by this issue.  Once you add the second method though, it "forces" Axis to write the AbstractShape type and it's derivitives out to the wsdl.  Without those types written out, how can you invoke the web service via a client?  Maybe it's something that I'm missing, but when a concrete class contains an abstract class, all the derived abstract classes need to be written out or else Axis will never be able to instantiate the object fully, right?

ie, i can send an AbstractShape, but it's an abstract class, thus can't be instantiated... Comment out the second method and the AbstractShape is still written to the wsdl, but there's no instantiable class.

Maybe it's something I'm missing, or maybe there's a "better" way... If so, I'd love to know it, but for now, I still feel this is a bug...

Thanks for taking the time!
-clint



> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "clint dovholuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_66444 ]
     
clint dovholuk commented on AXIS-1955:
--------------------------------------

Thanks for you work on this Jayachandra.

-Clint

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]
     
Jayachandra Sekhara Rao Sunkara reopened AXIS-1955:
---------------------------------------------------

     Assign To: Jayachandra Sekhara Rao Sunkara

Hi Clint,
Reopening the bug. Can you come up with a test case to quickly reproduce the problem, wrap all the files needed as a zip/jar...just the way you did earlier (test.jar).

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>     Assignee: Jayachandra Sekhara Rao Sunkara
>      Fix For: 1.2.1
>  Attachments: 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]
     
Tom Jordahl resolved AXIS-1955:
-------------------------------

     Resolution: Fixed
    Fix Version: 1.2.1

Applies the patch.  Thanks.

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>      Fix For: 1.2.1
>  Attachments: 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=comments#action_66427 ]
     
Jayachandra Sekhara Rao Sunkara commented on AXIS-1955:
-------------------------------------------------------

Thanks Clint, for pointing out this subtle but major issue.

This didn't appear in the first go as a serious issue to me, but now I totally agree with you that a concrete class if it has field declaration as abstract class, then all the mapped types extending (i.e. deriving from) that abstract class should be written out in the wsdl, otherwise it's not quite possible to create a client request properly for an unaware remote user of that service. In one sense written out WSDL is no longer self descriptive. I've worked on this and came up with a patch. 
I've noticed that in the BeanSerializer.java code when writing out type information for fields, they are just being written out using the types.writeType() method this method doesn't have the necessary logic to write out subTypes of the type we are trying to write out. So I tried to use the types.writeTypeAndSubTypeForPart() method that has the required functionality. I've tried to see I don't disturb *any* other functionality of the class. I'll attach the patch as a diff

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]

Jayachandra Sekhara Rao Sunkara updated AXIS-1955:
--------------------------------------------------

    Attachment: 1955Patch_cvs_diff.txt

Here is the patch in cvs diff -u format

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]

Jayachandra Sekhara Rao Sunkara updated AXIS-1955:
--------------------------------------------------

    Attachment: Patch_BeanSerializer.diff

Attaching the patch file for earlier mentioned change.

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: Patch_BeanSerializer.diff, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "clint dovholuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]

clint dovholuk updated AXIS-1955:
---------------------------------

    Attachment: test.jar

just figured out i could attach file(s)... attached a jar of the source for use

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>  Attachments: test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "Tom Parker (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]

Tom Parker updated AXIS-1955:
-----------------------------

    Attachment: 1955ArrayTypesPatch.txt

This patch against 1.2.1 should fix the problem of unreferenced subclasses not showing up in the generated wsdl where the only reference to the parent class is via an array.

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>     Assignee: Jayachandra Sekhara Rao Sunkara
>      Fix For: 1.2.1
>  Attachments: 1955ArrayTypesPatch.txt, 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1955) Axis 1.2rc3 does not write derived types from abstract classes to wsdl

Posted by "clint dovholuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1955?page=all ]

clint dovholuk updated AXIS-1955:
---------------------------------

    Attachment: test.jar

Jayachandra, here's the attached test.jar...

Two new files: AbstractTest.java and TestSubclass.java

In TestObj.java (read the comment) uncomment the last method and the wsdl is written properly... but when the input parameter is an array, it doesn't write the wsdl properly.

-Clint

> Axis 1.2rc3 does not write derived types from abstract classes to wsdl
> ----------------------------------------------------------------------
>
>          Key: AXIS-1955
>          URL: http://issues.apache.org/jira/browse/AXIS-1955
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC3
>  Environment: os: ms windows xp pro build 2600 with sp 2
> app server: resin 2.1.14
> ide: eclipse 3.1M6 (used to launch and debug the app)
> hardware: p4 3GHz + 1.0 G ram and ample hd space
>     Reporter: clint dovholuk
>     Assignee: Jayachandra Sekhara Rao Sunkara
>      Fix For: 1.2.1
>  Attachments: 1955Patch_cvs_diff.txt, Patch_BeanSerializer.diff, test.jar, test.jar
>
> After upgrading to Axis 1.2rc3 I noticed that the wsdl is no longer being written properly when using derived types from abstract classes.
> Test Case: (i hope you perserve spaces as this is indented properly when i submit it)
>   create these files and compile them:
>     TestObj.java
>         package test;
>         public class TestObj {
>           public void testShapeHolder(ShapeHolder shapeHolder) {
>             System.err.println("SHAPE CLASS: " + shapeHolder.getClass());
>           }
>           /*
>           this is commented out on purpose, you will remove it in the last steps of the test case
>           public void testAbstractShape(AbstractShape shape) {
>             System.err.println("SHAPE CLASS: " + shape.getClass());
>           }
>           */
>         }
>         
>     ShapeTester.java
>         package test;
>         public class ShapeTester {
>           private AbstractShape shape;
>           public AbstractShape getShape () { return shape; }
>           //public void setShape (AbstractShape shape) { this.shape = shape; }
>         }
>     
>     AbstractShape.java
>         package test;
>         public abstract class AbstractShape {}
>     
>     Square.java
>         package test;
>         public class Square extends AbstractShape {}
>     
>     Circle.java
>         package test;
>         public class Circle extends AbstractShape {}
>   
>   Add this service to the server-config.wsdd
>    <service name="absTest" provider="java:RPC">
>      <parameter name="allowedMethods" value="*" />
>      <parameter name="className" value="test.TestObj" />
>      <beanMapping qname="THENS:ShapeTester" xmlns:THENS="myWebApp:ShapeTester" languageSpecificType="java:test.ShapeTester"/>
>      <beanMapping qname="THENS:Square" xmlns:THENS="myWebApp:Square" languageSpecificType="java:test.Square" />
>      <beanMapping qname="THENS:Circle" xmlns:THENS="myWebApp:Circle" languageSpecificType="java:test.Circle" />
>    </service>
>   
>   
>   install axis 1.1 and get it running
>   
>   hit the wsdl and look at the wsdl:types, on my box it looks like:
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   replace axis libraries (I replaced axis.jar, saaj.jar, and wsdl.jar) with corresponding axis 1.2rc3 jars
>   
>   hit the wsdl and look at the wsdl:types, i NOW get: (that can't be right, is it?)
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   
>   uncomment the method in TestObj named testAbstractShape
>   
>   restart the application
>   
>   hit the wsdl. you now get the FULL wsdl written out including the types: 
>     <wsdl:types>
>       <schema targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType abstract="true" name="AbstractShape">
>           <sequence />
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:ShapeTester" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="ShapeTester">
>           <sequence>
>             <element name="shape" nillable="true" type="tns2:AbstractShape" />
>           </sequence>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Square" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="myWebApp:Circle" />
>         <import namespace="http://test" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Square">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>       <schema targetNamespace="myWebApp:Circle" xmlns="http://www.w3.org/2001/XMLSchema">
>         <import namespace="myWebApp:ShapeTester" />
>         <import namespace="http://test" />
>         <import namespace="myWebApp:Square" />
>         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>         <complexType name="Circle">
>           <complexContent>
>             <extension base="tns2:AbstractShape">
>               <sequence />
>             </extension>
>           </complexContent>
>         </complexType>
>       </schema>
>     </wsdl:types>
>   

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira