<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://ejb.workorderses.mfg.jent.spec.org" xmlns:tns="http://ejb.workorderses.mfg.jent.spec.org" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="cancelWorkOrder" type="tns:cancelWorkOrder"/>

  <xs:element name="cancelWorkOrderResponse" type="tns:cancelWorkOrderResponse"/>

  <xs:element name="checkForRequestedWork" type="tns:checkForRequestedWork"/>

  <xs:element name="checkForRequestedWorkResponse" type="tns:checkForRequestedWorkResponse"/>

  <xs:element name="completeWorkOrder" type="tns:completeWorkOrder"/>

  <xs:element name="completeWorkOrderResponse" type="tns:completeWorkOrderResponse"/>

  <xs:element name="findWorkOrder" type="tns:findWorkOrder"/>

  <xs:element name="findWorkOrderResponse" type="tns:findWorkOrderResponse"/>

  <xs:element name="getAllWorkOrders" type="tns:getAllWorkOrders"/>

  <xs:element name="getAllWorkOrdersResponse" type="tns:getAllWorkOrdersResponse"/>

  <xs:element name="getWorkOrdersByStatus" type="tns:getWorkOrdersByStatus"/>

  <xs:element name="getWorkOrdersByStatusResponse" type="tns:getWorkOrdersByStatusResponse"/>

  <xs:element name="scheduleWorkOrder" type="tns:scheduleWorkOrder"/>

  <xs:element name="scheduleWorkOrderByDate" type="tns:scheduleWorkOrderByDate"/>

  <xs:element name="scheduleWorkOrderByDateResponse" type="tns:scheduleWorkOrderByDateResponse"/>

  <xs:element name="scheduleWorkOrderBySalesId" type="tns:scheduleWorkOrderBySalesId"/>

  <xs:element name="scheduleWorkOrderBySalesIdResponse" type="tns:scheduleWorkOrderBySalesIdResponse"/>

  <xs:element name="scheduleWorkOrderResponse" type="tns:scheduleWorkOrderResponse"/>

  <xs:element name="updateWorkOrder" type="tns:updateWorkOrder"/>

  <xs:element name="updateWorkOrderResponse" type="tns:updateWorkOrderResponse"/>

  <xs:complexType name="checkForRequestedWork">
    <xs:sequence>
      <xs:element name="location" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="checkForRequestedWorkResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="workOrder">
    <xs:sequence>
      <xs:element name="id" type="xs:int"/>
      <xs:element name="salesId" type="xs:int"/>
      <xs:element name="orderLineId" type="xs:int"/>
      <xs:element name="status" type="tns:workOrderStatus" minOccurs="0"/>
      <xs:element name="originalQuantity" type="xs:int"/>
      <xs:element name="completedQuantity" type="xs:int"/>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="dueDate" type="xs:date" minOccurs="0"/>
      <xs:element name="startDate" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="assembly" type="tns:assembly" minOccurs="0"/>
      <xs:element name="version" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="assembly">
    <xs:complexContent>
      <xs:extension base="tns:component">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="component">
    <xs:sequence>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
      <xs:element name="himark" type="xs:int" minOccurs="0"/>
      <xs:element name="id" type="xs:string" minOccurs="0"/>
      <xs:element name="lomark" type="xs:int" minOccurs="0"/>
      <xs:element name="name" type="xs:string" minOccurs="0"/>
      <xs:element name="planner" type="xs:int" minOccurs="0"/>
      <xs:element name="purchased" type="xs:int" minOccurs="0"/>
      <xs:element name="revision" type="xs:string" minOccurs="0"/>
      <xs:element name="type" type="xs:int" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="findWorkOrder">
    <xs:sequence>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="id" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="findWorkOrderResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="updateWorkOrder">
    <xs:sequence>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="wid" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="updateWorkOrderResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrderBySalesId">
    <xs:sequence>
      <xs:element name="salesId" type="xs:int"/>
      <xs:element name="oLineId" type="xs:int"/>
      <xs:element name="assemblyId" type="xs:string" minOccurs="0"/>
      <xs:element name="qty" type="xs:int"/>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="dueDate" type="xs:date" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrderBySalesIdResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrderByDate">
    <xs:sequence>
      <xs:element name="assemblyId" type="xs:string" minOccurs="0"/>
      <xs:element name="qty" type="xs:int"/>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="dueDate" type="xs:date" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrderByDateResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrder">
    <xs:sequence>
      <xs:element name="assemblyId" type="xs:string" minOccurs="0"/>
      <xs:element name="qty" type="xs:int"/>
      <xs:element name="location" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduleWorkOrderResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="getWorkOrdersByStatus">
    <xs:sequence>
      <xs:element name="status" type="tns:workOrderStatus" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="getWorkOrdersByStatusResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="getAllWorkOrders">
    <xs:sequence/>
  </xs:complexType>

  <xs:complexType name="getAllWorkOrdersResponse">
    <xs:sequence>
      <xs:element name="return" type="tns:workOrder" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="cancelWorkOrder">
    <xs:sequence>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="wid" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="cancelWorkOrderResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="completeWorkOrder">
    <xs:sequence>
      <xs:element name="location" type="xs:int"/>
      <xs:element name="wid" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="completeWorkOrderResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="workOrderStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="OPEN"/>
      <xs:enumeration value="STAGE1"/>
      <xs:enumeration value="STAGE2"/>
      <xs:enumeration value="STAGE3"/>
      <xs:enumeration value="COMPLETED"/>
      <xs:enumeration value="ARCHIVED"/>
      <xs:enumeration value="CANCELLED"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

