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 di...@apache.org on 2005/07/23 19:50:29 UTC

cvs commit: ws-axis/java/xsd soap.xsd wsdl.xsd

dims        2005/07/23 10:50:29

  Modified:    java/xmls path_refs.xml targets.xml
  Added:       java/xsd soap.xsd wsdl.xsd
  Log:
  - Codegen schemas for soap and wsdl if xmlbeans is present
  - Generates an additional axis-schema-jar for use in xmlbeans serializer/de-serializer.
  
  Revision  Changes    Path
  1.16      +1 -0      ws-axis/java/xmls/path_refs.xml
  
  Index: path_refs.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/xmls/path_refs.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- path_refs.xml	19 Dec 2003 23:51:53 -0000	1.15
  +++ path_refs.xml	23 Jul 2005 17:50:29 -0000	1.16
  @@ -21,6 +21,7 @@
       <pathelement location="${build.dest}" />
       <pathelement location="${build.dir}/tools" />
       <pathelement location="${build.lib}/axis-ant.jar" />
  +    <pathelement location="${build.lib}/axis-schema.jar" />
   <!--
       <pathelement location="${build.dir}/work" />
   -->
  
  
  
  1.81      +26 -2     ws-axis/java/xmls/targets.xml
  
  Index: targets.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/xmls/targets.xml,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- targets.xml	14 Feb 2005 13:17:13 -0000	1.80
  +++ targets.xml	23 Jul 2005 17:50:29 -0000	1.81
  @@ -70,7 +70,7 @@
     <!-- Determine what dependencies are present                             -->
     <!-- =================================================================== -->
   
  -  <target name="setenv" unless="setenv.already.executed" depends="axis-clover-setup">
  +  <target name="setenv" unless="setenv.already.executed" depends="axis-clover-setup, axis-xmlbeans-setup">
       <property name="setenv.already.executed" value="true"/>
   
       <condition property="ant.good">
  @@ -237,7 +237,6 @@
       <condition property="xmlbeans.present" >
         <and>
           <available classname="org.apache.xmlbeans.XmlObject" classpathref="classpath" />
  -        <available classname="org.xmlsoap.schemas.wsdl.DefinitionsDocument" classpathref="classpath" />
           <available classname="javax.xml.stream.XMLStreamReader" classpathref="classpath" />
         </and>
       </condition>
  @@ -680,3 +679,28 @@
          <available classname="com.cortexeb.tools.clover.tasks.CloverTask" classpathref="classpath" />
        </condition>
     </target>
  +
  +  <target name="axis-xmlbeans-setup" depends="axis-xmlbeans-setenv" if="generate.schema.jar">
  +    <mkdir dir="${build.lib}"/>
  +     <echo message="Registering xmlbeans tasks"/>
  +     <taskdef name="xmlbeanbuild" 
  +              classname="org.apache.xmlbeans.impl.tool.XMLBean" 
  +              classpathref="classpath"/>
  +	 <xmlbeanbuild
  +              schema="${axis.home}/xsd"
  +              classgendir="${build.dir}/schema/"
  +              failonerror="true"
  +              classpathref="classpath"/>
  +	 <jar jarfile="${build.lib}/axis-schema.jar" basedir="${build.dir}/schema/"/>
  +  </target>
  +
  +  <target name="axis-xmlbeans-setenv">
  +     <condition property="generate.schema.jar">
  +       <and>
  +         <available classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="classpath" />
  +         <not>
  +		    <available file="${build.lib}/axis-schema.jar"/>
  +         </not>
  +       </and>
  +     </condition>
  +  </target>
  
  
  
  1.1                  ws-axis/java/xsd/soap.xsd
  
  Index: soap.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?> 
  <!-- 
   
  Copyright 2001-2003 International Business Machines Corporation, Microsoft Corporation. All rights reserved.
  
  The presentation, distribution or other dissemination of the
  information contained herein by Microsoft is not a license,
  either expressly or impliedly, to any intellectual property owned or
  controlled by Microsoft.
  
  This document and the information contained herein is provided on an
  "AS IS" basis and to the maximum extent permitted by applicable law,
  Microsoft provides the document AS IS AND WITH ALL FAULTS, and hereby
  disclaims all other warranties and conditions, either express, implied
  or statutory, including, but not limited to, any (if any) implied
  warranties, duties or conditions of merchantability, of fitness for a
  particular purpose, of accuracy or completeness of responses, of
  results, of workmanlike effort, of lack of viruses, and of lack of
  negligence, all with regard to the document. ALSO, THERE IS NO
  WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
  CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
  DOCUMENT.
  
  IN NO EVENT WILL MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE COST
  OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE,
  LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR
  SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE,
  ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
  DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE
  POSSIBILITY OF SUCH DAMAGES.  
  
  --> 
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             targetNamespace="http://schemas.xmlsoap.org/wsdl/soap/" >
  
    <xs:import namespace = "http://schemas.xmlsoap.org/wsdl/" />
  
    <xs:simpleType name="encodingStyle" >
      <xs:annotation>
        <xs:documentation>
        "encodingStyle" indicates any canonicalization conventions followed in the contents of the containing element.  For example, the value "http://schemas.xmlsoap.org/soap/encoding/" indicates the pattern described in SOAP specification
        </xs:documentation>
      </xs:annotation>
      <xs:list itemType="xs:anyURI" />
    </xs:simpleType>
  
    <xs:element name="binding" type="soap:tBinding" />
    <xs:complexType name="tBinding" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibilityElement" >
          <xs:attribute name="transport" type="xs:anyURI" use="required" />
          <xs:attribute name="style" type="soap:tStyleChoice" use="optional" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:simpleType name="tStyleChoice" >
      <xs:restriction base="xs:string" >
        <xs:enumeration value="rpc" />
        <xs:enumeration value="document" />
      </xs:restriction>
    </xs:simpleType>
  
    <xs:element name="operation" type="soap:tOperation" />
    <xs:complexType name="tOperation" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibilityElement" >
          <xs:attribute name="soapAction" type="xs:anyURI" use="optional" />
          <xs:attribute name="style" type="soap:tStyleChoice" use="optional" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:element name="body" type="soap:tBody" />
    <xs:attributeGroup name="tBodyAttributes" >
      <xs:attribute name="encodingStyle" type="soap:encodingStyle" use="optional" />	   
      <xs:attribute name="use" type="soap:useChoice" use="optional" />
      <xs:attribute name="namespace" type="xs:anyURI" use="optional" />
    </xs:attributeGroup>
    <xs:complexType name="tBody" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibilityElement" >
          <xs:attribute name="parts" type="xs:NMTOKENS" use="optional" />
          <xs:attributeGroup ref = "soap:tBodyAttributes" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
    
    <xs:simpleType name="useChoice" >
      <xs:restriction base="xs:string" >
        <xs:enumeration value="literal" />
        <xs:enumeration value="encoded" />
      </xs:restriction>
    </xs:simpleType>
  
    <xs:element name="fault" type="soap:tFault" />
    <xs:complexType name="tFaultRes" abstract="true" >
      <xs:complexContent>
        <xs:restriction base="soap:tBody" >
  	    <xs:attribute ref="wsdl:required" use="optional" /> 
          <xs:attribute name="parts" type="xs:NMTOKENS" use="prohibited" />
  		<xs:attributeGroup ref="soap:tBodyAttributes" />
        </xs:restriction>
      </xs:complexContent>  	
    </xs:complexType>
    <xs:complexType name="tFault" >
      <xs:complexContent>
        <xs:extension base="soap:tFaultRes">
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
  
    <xs:element name="header" type="soap:tHeader" />
    <xs:attributeGroup name="tHeaderAttributes" >
      <xs:attribute name="message" type="xs:QName" use="required" />
      <xs:attribute name="part" type="xs:NMTOKEN" use="required" />
      <xs:attribute name="use" type="soap:useChoice" use="required" />
      <xs:attribute name="encodingStyle" type="soap:encodingStyle" use="optional" />
      <xs:attribute name="namespace" type="xs:anyURI" use="optional" />      
    </xs:attributeGroup>
    <xs:complexType name="tHeader" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibilityElement" >
          <xs:sequence>
            <xs:element ref="soap:headerfault" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
  		<xs:attributeGroup ref="soap:tHeaderAttributes" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:element name="headerfault" type="soap:tHeaderFault" />
    <xs:complexType name="tHeaderFault" >
  	<xs:attributeGroup ref="soap:tHeaderAttributes" />
    </xs:complexType>
  
    <xs:element name="address" type="soap:tAddress" />
    <xs:complexType name="tAddress" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibilityElement" >
          <xs:attribute name="location" type="xs:anyURI" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
  </xs:schema>
  
  
  1.1                  ws-axis/java/xsd/wsdl.xsd
  
  Index: wsdl.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?> 
  <!-- 
   
  Copyright 2001-2003 International Business Machines Corporation, Microsoft Corporation. All rights reserved.
  
  The presentation, distribution or other dissemination of the
  information contained herein by Microsoft is not a license,
  either expressly or impliedly, to any intellectual property owned or
  controlled by Microsoft.
  
  This document and the information contained herein is provided on an
  "AS IS" basis and to the maximum extent permitted by applicable law,
  Microsoft provides the document AS IS AND WITH ALL FAULTS, and hereby
  disclaims all other warranties and conditions, either express, implied
  or statutory, including, but not limited to, any (if any) implied
  warranties, duties or conditions of merchantability, of fitness for a
  particular purpose, of accuracy or completeness of responses, of
  results, of workmanlike effort, of lack of viruses, and of lack of
  negligence, all with regard to the document. ALSO, THERE IS NO
  WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
  CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
  DOCUMENT.
  
  IN NO EVENT WILL MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE COST
  OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE,
  LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR
  SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE,
  ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
  DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE
  POSSIBILITY OF SUCH DAMAGES.  
  
  --> 
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             targetNamespace="http://schemas.xmlsoap.org/wsdl/"
             elementFormDefault="qualified" >
     
    <xs:complexType mixed="true" name="tDocumentation" >
      <xs:sequence>
        <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
      </xs:sequence>
    </xs:complexType>
  
    <xs:complexType name="tDocumented" >
      <xs:annotation>
        <xs:documentation>
        This type is extended by  component types to allow them to be documented
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="documentation" type="wsdl:tDocumentation" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  	 
    <xs:complexType name="tExtensibleAttributesDocumented" abstract="true" >
      <xs:complexContent>
        <xs:extension base="wsdl:tDocumented" >
          <xs:annotation>
            <xs:documentation>
            This type is extended by component types to allow attributes from other namespaces to be added.
            </xs:documentation>
          </xs:annotation>
          <xs:anyAttribute namespace="##other" processContents="lax" />    
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:complexType name="tExtensibleDocumented" abstract="true" >
      <xs:complexContent>
        <xs:extension base="wsdl:tDocumented" >
          <xs:annotation>
            <xs:documentation>
            This type is extended by component types to allow elements from other namespaces to be added.
            </xs:documentation>
          </xs:annotation>
          <xs:sequence>
            <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:element name="definitions" type="wsdl:tDefinitions" >
      <xs:key name="message" >
        <xs:selector xpath="wsdl:message" />
        <xs:field xpath="@name" />
      </xs:key>
      <xs:key name="portType" >
        <xs:selector xpath="wsdl:portType" />
        <xs:field xpath="@name" />
      </xs:key>
      <xs:key name="binding" >
        <xs:selector xpath="wsdl:binding" />
        <xs:field xpath="@name" />
      </xs:key>
      <xs:key name="service" >
        <xs:selector xpath="wsdl:service" />
        <xs:field xpath="@name" />
      </xs:key>
      <xs:key name="import" >
        <xs:selector xpath="wsdl:import" />
        <xs:field xpath="@namespace" />
      </xs:key>
    </xs:element>
  
    <xs:group name="anyTopLevelOptionalElement" >
      <xs:annotation>
        <xs:documentation>
        Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place.
        </xs:documentation>
      </xs:annotation>
      <xs:choice>
        <xs:element name="import" type="wsdl:tImport" />
        <xs:element name="types" type="wsdl:tTypes" />                     
        <xs:element name="message"  type="wsdl:tMessage" >
          <xs:unique name="part" >
            <xs:selector xpath="wsdl:part" />
            <xs:field xpath="@name" />
          </xs:unique>
        </xs:element>
        <xs:element name="portType" type="wsdl:tPortType" />
        <xs:element name="binding"  type="wsdl:tBinding" />
        <xs:element name="service"  type="wsdl:tService" >
          <xs:unique name="port" >
            <xs:selector xpath="wsdl:port" />
            <xs:field xpath="@name" />
          </xs:unique>
  	  </xs:element>
      </xs:choice>
    </xs:group>
  
    <xs:complexType name="tDefinitions" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:sequence>
            <xs:group ref="wsdl:anyTopLevelOptionalElement"  minOccurs="0"   maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="targetNamespace" type="xs:anyURI" use="optional" />
          <xs:attribute name="name" type="xs:NCName" use="optional" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
     
    <xs:complexType name="tImport" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleAttributesDocumented" >
          <xs:attribute name="namespace" type="xs:anyURI" use="required" />
          <xs:attribute name="location" type="xs:anyURI" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
     
    <xs:complexType name="tTypes" >
      <xs:complexContent>   
        <xs:extension base="wsdl:tExtensibleDocumented" />
      </xs:complexContent>   
    </xs:complexType>
       
    <xs:complexType name="tMessage" >
      <xs:complexContent>   
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:sequence>
            <xs:element name="part" type="wsdl:tPart" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>   
    </xs:complexType>
  
    <xs:complexType name="tPart" >
      <xs:complexContent>   
        <xs:extension base="wsdl:tExtensibleAttributesDocumented" >
          <xs:attribute name="name" type="xs:NCName" use="required" />
          <xs:attribute name="element" type="xs:QName" use="optional" />
          <xs:attribute name="type" type="xs:QName" use="optional" />    
        </xs:extension>
      </xs:complexContent>   
    </xs:complexType>
  
    <xs:complexType name="tPortType" >
      <xs:complexContent>   
        <xs:extension base="wsdl:tExtensibleAttributesDocumented" >
          <xs:sequence>
            <xs:element name="operation" type="wsdl:tOperation" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>   
    </xs:complexType>
     
    <xs:complexType name="tOperation" >
      <xs:complexContent>   
        <xs:extension base="wsdl:tExtensibleDocumented" >
  	    <xs:sequence>
            <xs:choice>
              <xs:group ref="wsdl:request-response-or-one-way-operation" />
              <xs:group ref="wsdl:solicit-response-or-notification-operation" />
            </xs:choice>
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
          <xs:attribute name="parameterOrder" type="xs:NMTOKENS" use="optional" />
        </xs:extension>
      </xs:complexContent>   
    </xs:complexType>
      
    <xs:group name="request-response-or-one-way-operation" >
      <xs:sequence>
        <xs:element name="input" type="wsdl:tParam" />
  	  <xs:sequence minOccurs='0' >
  	    <xs:element name="output" type="wsdl:tParam" />
  		<xs:element name="fault" type="wsdl:tFault" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
      </xs:sequence>
    </xs:group>
  
    <xs:group name="solicit-response-or-notification-operation" >
      <xs:sequence>
        <xs:element name="output" type="wsdl:tParam" />
  	  <xs:sequence minOccurs='0' >
  	    <xs:element name="input" type="wsdl:tParam" />
  		<xs:element name="fault" type="wsdl:tFault" minOccurs="0" maxOccurs="unbounded" />
  	  </xs:sequence>
      </xs:sequence>
    </xs:group>
          
    <xs:complexType name="tParam" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleAttributesDocumented" >
          <xs:attribute name="name" type="xs:NCName" use="optional" />
          <xs:attribute name="message" type="xs:QName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:complexType name="tFault" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleAttributesDocumented" >
          <xs:attribute name="name" type="xs:NCName"  use="required" />
          <xs:attribute name="message" type="xs:QName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
       
    <xs:complexType name="tBinding" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:sequence>
            <xs:element name="operation" type="wsdl:tBindingOperation" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
          <xs:attribute name="type" type="xs:QName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
      
    <xs:complexType name="tBindingOperationMessage" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:attribute name="name" type="xs:NCName" use="optional" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="tBindingOperationFault" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:complexType name="tBindingOperation" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:sequence>
            <xs:element name="input" type="wsdl:tBindingOperationMessage" minOccurs="0" />
            <xs:element name="output" type="wsdl:tBindingOperationMessage" minOccurs="0" />
            <xs:element name="fault" type="wsdl:tBindingOperationFault" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
       
    <xs:complexType name="tService" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:sequence>
            <xs:element name="port" type="wsdl:tPort" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="name" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
       
    <xs:complexType name="tPort" >
      <xs:complexContent>
        <xs:extension base="wsdl:tExtensibleDocumented" >
          <xs:attribute name="name" type="xs:NCName" use="required" />
          <xs:attribute name="binding" type="xs:QName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  
    <xs:attribute name="arrayType" type="xs:string" />
    <xs:attribute name="required" type="xs:boolean" />
    <xs:complexType name="tExtensibilityElement" abstract="true" >
      <xs:attribute ref="wsdl:required" use="optional" />
    </xs:complexType>
  
  </xs:schema>