Hi,

I'm having a very similar problem as described here:
http://marc.theaimsgroup.com/?l=axis-user&m=113819830006177&w=2

My schema is included below.
I'm trying to implement a composite pattern. There are three types derived from an abstract type as follows:

        Workflow (abstract)
       /         |        \
   Parallel   Sequence  Pipeline

Both parallel and sequence elements must contain nested Workflow elements (one or more of parallel, sequence or pipeline), whereas pipeline elements cannot - they form the leaves of the workflow tree.
An example of a document would be:

<perform>
  <sequence>
    <parallel>
      <pipeline> ... </pipeline>
      <pipeline> ... </pipeline>
    </parallel>
    <pipeline> ... </pipeline>
  </sequence>
<perform>

In the schema I've defined an abstract Workflow element and elements parallel, sequence and pipeline. These are substitution elements for the Workflow element. When I generate Java beans with WSDL2Java there is no trace of the parallel and sequence elements. There is a Java class called Composite which extends WorkflowComponent but there is no way of telling whether this Composite object used to be a sequence or a parallel element. How can I force Axis to generate Java beans corresponding to those elements?

Any help with this would be appreciated.

Thanks,
Amy



 <!-- root element -->
 <xsd:element name="perform">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="tns:workflow"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <!-- work flow group and component -->

  <xsd:element name="workflow" abstract="true"
               type="tns:WorkflowComponent">
  </xsd:element>

  <xsd:complexType name="WorkflowComponent">
  </xsd:complexType>

  <xsd:element name="parallel"
               substitutionGroup="tns:workflow"
               type="tns:Composite"/>
  <xsd:element name="sequence"
               substitutionGroup="tns:workflow"
               type="tns:Composite"/>

  <xsd:complexType name="Composite">
    <xsd:complexContent>
      <xsd:extension base="tns:WorkflowComponent">
        <xsd:sequence>
          <xsd:element ref="tns:workflow" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="pipeline"
               substitutionGroup="tns:workflow"
               type="tns:Pipeline"/>

  <xsd:complexType name="Pipeline">
    <xsd:complexContent>
      <xsd:extension base="tns:WorkflowComponent">
        <xsd:sequence>
          <xsd:element ref="tns:activity" minOccurs="1"
                                          maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="activity">
     <!-- some definitions here ... -->
  </xsd:element>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to