Service Data Object XSDs

Each service data object has one XSD that describes the object and its attributes. For example, the Sales Lead object is defined in MklLead.xsd, the Sales Lead products are defined in MklProdAssoc.xsd, and the Sales Lead contacts are defined in MklLeadTcMembers.xsd. A service data object is uniquely defined by a QName, which is the qualified name of the corresponding XSD.

An XSD schema corresponding to a service data object has the following basic structure:

  • Namespace declarations

  • Imports and includes the specifications of XSDs on which this schema definition has dependencies

  • Schema documentation, which includes display name and description, as well as the name and description of the service data object attributes.

  • Definition of the derived types. For example, when you enable service warnings in the service implementation, you need to define a wrapper type.

  • Definition of the service data object, which is a complex type. The service data object attributes are defined as elements in the complex type.

  • Definition of the element, with the type set to complex

The following is an excerpt from MklLead.xsd, which corresponds to the Sales Lead object:

<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/oracle/apps/marketing/leadMgmt/leads/leadService/"
     sdoJava:package="oracle.apps.marketing.leadMgmt.leads.leadService"
xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/"
     xmlns:ns1="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/" 
xmlns:ns2="http://xmlns.oracle.com/apps/crmCommon/notes/noteService" 
     xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java" 
xmlns="http://xmlns.oracle.com/apps/sales/marketing/leadMgmt/leads/leadService/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   <xsd:annotation>
       <xsd:documentation xmlns:oer="http://xmlns.oracle.com/oer">
           <name>SalesLead</name>
           <description>A lead is a transaction record created when 
           a party has expressed an interest in a product or service.
           It represents a selling opportunity.
           </description>
           <oer:attributes>
           <oer:attribute description="Lead Name used for identifying the lead." name="Name"/>
           <oer:attribute description="User friendly unique identifier for a lead."
           name="LeadNumber""/>
           <oer:attribute description="Name associated with the owner of this sales lead."
           name="OwnerPartyName"/>
           <oer:attribute description="Pre-defined code used to indicate the status of a lead."
           name="StatusCode"/>
           <oer:attribute description="Rank associated with this sales lead."
           name="Rank"/>
           ...
           </oer:attributes>
       </xsd:documentation>
   </xsd:annotation>
   <xsd:import namespace="http://xmlns.oracle.com/adf/svc/types/"
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/META-INF/wsdl/BC4JService.xsd"/>
   <xsd:import namespace="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/"
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/oracle/apps/marketing/leadMgmt/leads/leadService/MklLeadResources.xsd"/>
   <xsd:import namespace="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/"
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/oracle/apps/marketing/leadMgmt/leads/leadService/MklLeadTcMembers.xsd"/>
   <xsd:import namespace="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/"
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/oracle/apps/marketing/leadMgmt/leads/leadService/MklProdAssoc.xsd"/>
   <xsd:import namespace="http://xmlns.oracle.com/apps/crmCommon/notes/noteService" 
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/oracle/apps/crmCommon/notes/noteService/Note.xsd"/>
   <xsd:import namespace="commonj.sdo/java" 
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/xml/sdoJava.xsd"/>
   <xsd:import namespace="commonj.sdo/xml"
   schemaLocation="https://crm-your-cloud-hostname:port/mklLeads/
   SalesLeadService?XSD=/xml/sdoXML.xsd"/>
   <xsd:complexType name="MklLead">
       <xsd:annotation>
           <xsd:appinfo source="http://xmlns.oracle.com/adf/svc/metadata/">
               <key xmlns="http://xmlns.oracle.com/adf/svc/metadata/">
                   <attribute>LeadId</attribute>
               </key>
           </xsd:appinfo>
       </xsd:annotation>
       <xsd:sequence>
           <xsd:element minOccurs="0" name="Name" nillable="true" type="xsd:string"/>
           <xsd:element minOccurs="0" name="LeadNumber" type="xsd:string"/>
           <xsd:element minOccurs="0" name="OwnerPartyName" type="xsd:string"/>
           <xsd:element minOccurs="0" name="StatusCode" nillable="true" type="xsd:string"/>
           <xsd:element minOccurs="0" name="Rank" nillable="true" type="xsd:string"/>
           <xsd:element minOccurs="0" name="SourceCode" nillable="true" type="xsd:string"/>
           ...
       </xsd:sequence>
   </xsd:complexType>
   <xsd:element name="mklLead" type="MlkLead"/>
</xsd:schema>
Related Topics
  • Service Interface Artifacts
  • Service WSDL
  • Service XSD