axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon McClenahan" <simon.mcclena...@stellent.com>
Subject RE: Derivation from anyType
Date Tue, 07 May 2002 14:47:31 GMT
The Schema in the WSDL generated by gSOAP for our service for some reason derives from anyType
by restriction, i.e.

  <complexType name="AltLink">
   <complexContent>
    <restriction base="xsd:anyType">
     <sequence>
      <element name="prev" type="ts:stringData" />
      <element name="next" type="ts:stringData" />
     </sequence>
    </restriction>
   </complexContent>
  </complexType>

Like I said, with my limited Schema knowledge deriving by restriction from anyType doesn't
make sense to me, but gSOAP does it, and VisualStudio.NET prefers it that way (yet to be verified
by myself). To resolve this issue, I need to find out whether gSOAP generated WSDL is incorrect,
or Axis Java generation is incorrect, and making sure that VisualStudio.NET can grok the generated
WSDL too.

cheers,
	Simon



> -----Original Message-----
> From: St-Germain, Sylvain [mailto:Sylvain.StGermain@cognos.com]
> Sent: Tuesday, May 07, 2002 9:33 AM
> To: axis-user@xml.apache.org
> Subject: RE: Derivation from anyType
> 
> 
> 
> If my memory serves me right it is JAX-RPC (which Axis 
> implements) that do
> not define any java mapping for the XML xsd:anyType type.  I 
> simply avoided
> using it.
> 
> May I ask what is the purpose of extending xsd:anyType?  If 
> you need an
> abstract layer maybe you should do something like:
> 
>       <xs:complexType name="baseClass">
>         <xs:all/>
>       </xs:complexType>
> 
>       <xs:complexType name="concreteType">
>         <xs:complexContent>
>           <xs:extension base="tns:baseClass">
>             <xs:all>
>               <xs:element name="value" type="xs:string"/>
>             </xs:all>
>           </xs:extension>
>         </xs:complexContent>
>       </xs:complexType>
> 
> Sylvain.
> 
> -----Original Message-----
> From: Simon McClenahan [mailto:simon.mcclenahan@stellent.com]
> Sent: Tuesday, May 07, 2002 9:29 AM
> To: Axis User (E-mail)
> Subject: FW: Derivation from anyType
> 
> 
> Previously posted, but unanswered:
> 
> In my WSDL I have types that are derived from anyType. By changing the
> derivation from anyType from by extension to by restriction, 
> my Java code
> generated by WSDL2Java has no getters/setters, resulting in 
> compilation
> errors in my client code.
> 
> Apparently DevStudio.NET won't take the WSDLs if derivation 
> from anyType is
> by extension.
>  
> Axis won't generate correct code if the WSDLs if derivation 
> from anyType by
> restriction is used.
> 
> 
> In my mind, deriving from anyType by restriction doesn't make 
> sense anyway.
> Regardless, is Axis' behavior correct in this case? I will 
> email my WSDL
> upon request.
> 
> e.g.
> 
>   <complexType name="AltLink">
>    <complexContent>
>     <extension base="xsd:anyType">
>      <sequence>
>       <element name="prev" type="ts:stringData" minOccurs="0"
> maxOccurs="1"/>
>       <element name="next" type="ts:stringData" minOccurs="0"
> maxOccurs="1"/>
>      </sequence>
>     </extension>
>    </complexContent>
>   </complexType>
> 
> FYI, this schema is generated by gSOAP using <restriction> instead of
> <extension>.
> 
> cheers,
> 	Simon
> 
> This message may contain privileged and/or confidential 
> information.  If you
> have received this e-mail in error or are not the intended 
> recipient, you
> may not use, copy, disseminate or distribute it; do not open any
> attachments, delete it immediately from your system and 
> notify the sender
> promptly by e-mail that you have done so.  Thank you.
> 
> 

Mime
View raw message