ヘッダーをスキップ
Oracle® Enterprise Manager Connectors統合ガイド
12c リリース2 (12.1.0.2)
B70511-02
  目次へ移動
目次
索引へ移動
索引

前
 
次
 

C MOMイベント・コネクタのサンプル

この付録では、MOMイベント・コネクタのサンプル実装を示します。

例C-1 connectorDeploy.xml

<?xml version="1.0" encoding="UTF-8" ?>
 
<ManagementConnector xmlns="http://xmlns.oracle.com/sysman/connector">
  <Name>Microsoft Operations Manager Connector</Name>
  <Version>12.1.0.1.0</Version>
  <EMCompatibleVersion>12.1.0.1.0</EMCompatibleVersion>
  <Description>Microsoft Operations Manager Integration with Enterprise Manager</Description>
  <Category>EventConnector</Category>
  <ConfigVariable required="true">
    <VariableName>SETUP_NAME</VariableName>
    <DisplayName>MOM Registered Connector Name</DisplayName>
  </ConfigVariable>
  <ConfigVariable required="true">
    <VariableName>RESOLUTION_STATE</VariableName>
    <DisplayName>Resolution State</DisplayName>
  </ConfigVariable>
  <Service>
    <Method>setup</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/SetupWithResolutionState</SOAPAction>
  </Service>
  <Service>
    <Method>initialize</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/Initialize</SOAPAction>
  </Service>
  <Service>
    <Method>createEvent</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/InsertAlerts</SOAPAction>
  </Service>
  <Service>
    <Method>updateEvent</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/UpdateAlerts</SOAPAction>
  </Service>
  <Service>
    <Method>uninitialize</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/Uninitialize</SOAPAction>
  </Service>
  <Service>
    <Method>cleanup</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/Cleanup</SOAPAction>
  </Service>
  <TemplateRegistration>
    <FileName>setup_request.xml</FileName>
    <InternalName>setup</InternalName>
    <TemplateName>Setup</TemplateName>
    <TemplateType>OutboundXML</TemplateType>
    <Description>This is the request xml file for setup method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>setup_response.xsl</FileName>
    <InternalName>setup</InternalName>
    <TemplateName>Setup</TemplateName>
    <TemplateType>InboundXSL</TemplateType>
    <Description>This is the response xsl file for setup method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>initialize_request.xml</FileName>
    <InternalName>initialize</InternalName>
    <TemplateName>Initialize</TemplateName>
    <TemplateType>OutboundXML</TemplateType>
    <Description>This is the request xml file for initialize method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>createEvent_request.xsl</FileName>
    <InternalName>createEvent</InternalName>
    <TemplateName>Create Event</TemplateName>
    <TemplateType>OutboundXSL</TemplateType>
    <Description>This is the request xsl file for createEvent method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>createEvent_response.xsl</FileName>
    <InternalName>createEvent</InternalName>
    <TemplateName>Create Event</TemplateName>
    <TemplateType>InboundXSL</TemplateType>
    <Description>This is the response xsl file for createEvent method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>updateEvent_request.xsl</FileName>
    <InternalName>updateEvent</InternalName>
    <TemplateName>Update Event</TemplateName>
    <TemplateType>OutboundXSL</TemplateType>
    <Description>This is the request xsl file for updateEvent method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>updateEvent_response.xsl</FileName>
    <InternalName>updateEvent</InternalName>
    <TemplateName>Update Event</TemplateName>
    <TemplateType>InboundXSL</TemplateType>
    <Description>This is the response xsl file for updateEvent method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>uninitialize_request.xml</FileName>
    <InternalName>uninitialize</InternalName>
    <TemplateName>Uninitializ</TemplateName>
    <TemplateType>OutboundXML</TemplateType>
    <Description>This is the request xml file for uninitialize method</Description>    
  </TemplateRegistration>
  <TemplateRegistration>
    <FileName>cleanup_request.xml</FileName>
    <InternalName>cleanup</InternalName>
    <TemplateName>Cleanup</TemplateName>
    <TemplateType>OutboundXML</TemplateType>
    <Description>This is the request xml file for cleanup method</Description>    
  </TemplateRegistration>
</ManagementConnector>

例C-2 setup_request.xml

<?xml version="1.0" encoding="UTF-8" ?>
<SetupWithResolutionState xmlns="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2">
  <forwardeeInfo>
    <ForwardeeName>$SETUP_NAME$</ForwardeeName>
  </forwardeeInfo>
  <resolutionState>$RESOLUTION_STATE$</resolutionState>
</SetupWithResolutionState>

例C-3 setup_response.xsl

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:a="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2"
                xmlns:ns0="http://xmlns.oracle.com/sysman/connector">
 <xsl:template match="/">
  <ns0:SetupResponse>
   <ns0:ConnectorVariable>
    <ns0:VariableName>REGISTRATION_ID</ns0:VariableName>
    <ns0:VariableValue>
     <xsl:value-of select="a:SetupWithResolutionStateResponse/a:SetupWithResolutionStateResult"/>
    </ns0:VariableValue>
   </ns0:ConnectorVariable>
  </ns0:SetupResponse>
 </xsl:template>
</xsl:transform>

例C-4 initialize_request.xml

<?xml version="1.0" encoding="UTF-8" ?>
<Initialize xmlns="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2">
  <registrationId>$REGISTRATION_ID$</registrationId>
  <dataChangeFlags>NewAlerts UpdatedAlerts</dataChangeFlags>
</Initialize>

例C-5 uninitialize_request.xml

<?xml version="1.0" encoding="UTF-8" ?>
<Uninitialize xmlns="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2">
  <registrationId>$REGISTRATION_ID$</registrationId>
  <dataChangeFlags>NewAlerts UpdatedAlerts</dataChangeFlags>
</Uninitialize>

例C-6 cleanup_request.xml

<?xml version="1.0" encoding="UTF-8" ?>
<Cleanup xmlns="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2">
  <registrationId>$REGISTRATION_ID$</registrationId>
</Cleanup>

例C-7 createEvent_request.xsl

<?xml version='1.0' ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:ns0="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2"
               xmlns:a="http://xmlns.oracle.com/sysman/connector">
    <xsl:template match="a:EMEvent">
        <ns0:InsertAlerts>
            <ns0:registrationId>
                <xsl:for-each select="a:ConnectorVariable">
                    <xsl:if test="a:VariableName = 'REGISTRATION_ID'"><xsl:value-of select="a:VariableValue"/></xsl:if>
                </xsl:for-each>
            </ns0:registrationId>
            <ns0:alerts>
                <ns0:AlertInsert>
                    <ns0:Name><xsl:value-of select="a:SystemAttributes/a:EventClass"/></ns0:Name>
                    <ns0:ComputerName>
                      <xsl:choose>
<xsl:when test="normalize-space(a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetName) != ''">
                                <xsl:value-of select="a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetName"/>
                          </xsl:when>
                          <xsl:otherwise>N/A</xsl:otherwise>
                      </xsl:choose>
                    </ns0:ComputerName>
                    <ns0:ComputerDomain></ns0:ComputerDomain>
                    <ns0:Description>                    
                        Received event reported by Oracle Enterprise Manager:   
                        
                        Occurred Date: <xsl:choose><xsl:when test="normalize-space(a:SystemAttributes/a:OccurredDate) != ''"><xsl:value-of select="a:SystemAttributes/a:OccurredDate"/></xsl:when><xsl:otherwise>N/A</xsl:otherwise></xsl:choose>
                        Reported Date: <xsl:choose><xsl:when test="normalize-space(a:SystemAttributes/a:ReportedDate) != ''"><xsl:value-of select="a:SystemAttributes/a:ReportedDate"/></xsl:when><xsl:otherwise>N/A</xsl:otherwise></xsl:choose>
                        Event Class: <xsl:value-of select="a:SystemAttributes/a:EventClass"/>
                        Event Name: <xsl:value-of select="a:SystemAttributes/a:EventName"/>
                        Target Type: <xsl:value-of select="a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetType"/>
                        Target Name: <xsl:value-of select="a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetName"/>
                        Severity: <xsl:value-of select="a:SystemAttributes/a:Severity"/>
                        Message: <xsl:value-of select="a:SystemAttributes/a:Message"/>
                        URL: <xsl:value-of select="a:SystemAttributes/a:EventURL"/>
                        Event Context:
                        <xsl:for-each select="a:EventContextAttributes">
                            <xsl:choose>
                                <xsl:when test="a:StringAttribute"><xsl:value-of select="a:StringAttribute/a:Name"/>: <xsl:value-of select="a:StringAttribute/a:Value"/></xsl:when>
                                <xsl:when test="a:NumberAttribute"><xsl:value-of select="a:NumberAttribute/a:Name"/>: <xsl:value-of select="a:NumberAttribute/a:Value"/></xsl:when>
                            </xsl:choose>
                        </xsl:for-each>
                    </ns0:Description>
                    <ns0:Severity>
                        <xsl:choose>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'CLEAR'">Success</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'INFORMATIONAL'">Information</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'WARNING'">Warning</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'MINOR_WARNING'">Warning</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'CRITICAL'">CriticalError</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'FATAL'">CriticalError</xsl:when>
                            <xsl:otherwise>Error</xsl:otherwise>
                        </xsl:choose>
                    </ns0:Severity>
                    <CustomField1></CustomField1>
                    <CustomField2></CustomField2>
                    <CustomField3></CustomField3>
                    <CustomField4></CustomField4>
                    <CustomField5></CustomField5>
                    <ns0:RuleId>00000000-0000-0000-0000-000000000000</ns0:RuleId>
                    <ns0:Source>
                        <xsl:value-of select="a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetType"/>: <xsl:value-of select="a:SystemAttributes/a:SourceInfo/a:TargetInfo/a:TargetName"/>
                    </ns0:Source>
                    <ns0:TimeRaised>
                      <xsl:choose>
                        <xsl:when test="normalize-space(a:SystemAttributes/a:OccurredDate) != ''">
                          <xsl:value-of select="a:SystemAttributes/a:OccurredDate"/>
                        </xsl:when>
                        <xsl:when test="normalize-space(a:SystemAttributes/a:ReportedDate) != ''">
                          <xsl:value-of select="a:SystemAttributes/a:ReportedDate"/>
                        </xsl:when>
                        <xsl:otherwise>N/A</xsl:otherwise>
                      </xsl:choose>
                    </ns0:TimeRaised>
                    <ns0:ResolutionState>0</ns0:ResolutionState>
                    <ns0:ServerRole></ns0:ServerRole>
                    <ns0:ServerRoleInstance></ns0:ServerRoleInstance>
                    <ns0:Component></ns0:Component>
                    <ns0:ComponentInstance></ns0:ComponentInstance>                    
                </ns0:AlertInsert>
            </ns0:alerts>
        </ns0:InsertAlerts>
    </xsl:template>
</xsl:transform>

例C-8 createEvent_response.xsl

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:a="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2"
               xmlns:ns0="http://xmlns.oracle.com/sysman/connector">
<xsl:template match="a:InsertAlertsResponse/a:InsertAlertsResult">
  <ns0:EMEventResponse>
   <xsl:choose>
    <xsl:when test="a:InsertedAlerts/a:SuccessfulAlertInsert/a:NewAlertId">
     <ns0:SuccessFlag>true</ns0:SuccessFlag>
     <ns0:ExternalEventId>
      <xsl:value-of select="a:InsertedAlerts/a:SuccessfulAlertInsert/a:NewAlertId"/>
     </ns0:ExternalEventId>
    </xsl:when>
    <xsl:otherwise>
     <ns0:SuccessFlag>false</ns0:SuccessFlag>
     <ns0:ErrorMessage>
      <xsl:value-of select="a:FailedAlerts/a:FailedAlertInsert/a:Error"/>
     </ns0:ErrorMessage>
    </xsl:otherwise>
   </xsl:choose>
  </ns0:EMEventResponse>
 </xsl:template>
</xsl:transform>

例C-9 updateEvent_request.xsl

<?xml version='1.0' ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:ns0="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2"
               xmlns:a="http://xmlns.oracle.com/sysman/connector">
    <xsl:template match="a:EMEvent">
        <ns0:UpdateAlerts>
            <ns0:registrationId>
                <xsl:for-each select="a:ConnectorVariable">
                    <xsl:if test="a:VariableName = 'REGISTRATION_ID'"><xsl:value-of select="a:VariableValue"/></xsl:if>
                </xsl:for-each>
            </ns0:registrationId>       
            <ns0:updatedAlerts>
                <ns0:AlertUpdate>
                    <ns0:AlertId><xsl:value-of select="a:ExternalEventID"/></ns0:AlertId>
                    <ns0:OwnerNameUseExisting>true</ns0:OwnerNameUseExisting>
                    <ns0:SeverityUseExisting>false</ns0:SeverityUseExisting>
                    <xsl:variable name="MOMSeverity">
                        <xsl:choose>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'CLEAR'">Success</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'INFORMATIONAL'">Information</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 
'WARNING'">Warning</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'MINOR_WARNING'">Warning</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'CRITICAL'">CriticalError</xsl:when>
                            <xsl:when test="a:SystemAttributes/a:SeverityCode = 'FATAL'">CriticalError</xsl:when>
                            <xsl:otherwise>Error</xsl:otherwise>
                        </xsl:choose>
                    </xsl:variable>
                    <ns0:Severity>
                        <xsl:value-of select="$MOMSeverity"/>                        
                    </ns0:Severity>
                    <xsl:choose>
                        <xsl:when test="$MOMSeverity = 'Success'">
                            <ns0:ResolutionStateUseExisting>false</ns0:ResolutionStateUseExisting>
                            <ns0:ResolutionState>255</ns0:ResolutionState>
                        </xsl:when>
                        <xsl:otherwise>
                            <ns0:ResolutionStateUseExisting>true</ns0:ResolutionStateUseExisting>
                            <ns0:ResolutionState>0</ns0:ResolutionState>
                        </xsl:otherwise>
                    </xsl:choose>
                    <ns0:CustomField1UseExisting>true</ns0:CustomField1UseExisting>
                    <ns0:CustomField2UseExisting>true</ns0:CustomField2UseExisting>
                    <ns0:CustomField3UseExisting>true</ns0:CustomField3UseExisting>
                    <ns0:CustomField4UseExisting>true</ns0:CustomField4UseExisting>
                    <ns0:CustomField5UseExisting>true</ns0:CustomField5UseExisting>
                    <ns0:LastModifiedByUseExisting>true</ns0:LastModifiedByUseExisting>
                    <ns0:RepeatCountUseExisting>true</ns0:RepeatCountUseExisting>
                    <ns0:RepeatCount>0</ns0:RepeatCount>
                    <ns0:TicketIDUseExisting>true</ns0:TicketIDUseExisting>
                    <ns0:TimeOfFirstEventUseExisting>true</ns0:TimeOfFirstEventUseExisting>
                    <ns0:TimeOfLastEventUseExisting>true</ns0:TimeOfLastEventUseExisting>
                    <ns0:ProblemStateUseExisting>true</ns0:ProblemStateUseExisting>
                    <ns0:AlertHistory>
                        <ns0:AlertHistoryInsert>
                            <ns0:AlertId><xsl:value-of select="a:ExternalEventID"/></ns0:AlertId>
                            <ns0:OwnerNameUseExisting>true</ns0:OwnerNameUseExisting>
                            <ns0:CommentUseExisting>false</ns0:CommentUseExisting>
                            <ns0:Comment>
                                Event has been updated in Oracle Enterprise Manager
                                Occurred Date: <xsl:choose><xsl:when test="normalize-space(a:SystemAttributes/a:OccurredDate) != ''"><xsl:value-of select="a:SystemAttributes/a:OccurredDate"/></xsl:when><xsl:otherwise>N/A</xsl:otherwise></xsl:choose>
                                Reported Date: <xsl:choose><xsl:when test="normalize-space(a:SystemAttributes/a:ReportedDate) != ''"><xsl:value-of 
select="a:SystemAttributes/a:ReportedDate"/></xsl:when><xsl:otherwise>N/A</xsl:otherwise></xsl:choose>
                                Message: <xsl:value-of select="a:SystemAttributes/Message"/>
                                Changed 'Severity' to '<xsl:value-of select="$MOMSeverity"/>'
                            </ns0:Comment>
                            <xsl:choose>
                                <xsl:when test="$MOMSeverity = 'Success'">
                                    <ns0:ResolutionStateUseExisting>false</ns0:ResolutionStateUseExisting>
                                    <ns0:ResolutionState>255</ns0:ResolutionState>
                                </xsl:when>
                                <xsl:otherwise>
                                    <ns0:ResolutionStateUseExisting>true</ns0:ResolutionStateUseExisting>
                                    <ns0:ResolutionState>0</ns0:ResolutionState>
                                </xsl:otherwise>
                            </xsl:choose>
                            <ns0:CustomField1UseExisting>true</ns0:CustomField1UseExisting>
                            <ns0:CustomField2UseExisting>true</ns0:CustomField2UseExisting>
                            <ns0:CustomField3UseExisting>true</ns0:CustomField3UseExisting>
                            <ns0:CustomField4UseExisting>true</ns0:CustomField4UseExisting>
                            <ns0:CustomField5UseExisting>true</ns0:CustomField5UseExisting>
                            <ns0:LastModifiedByUseExisting>true</ns0:LastModifiedByUseExisting>
                            <ns0:TicketIDUseExisting>true</ns0:TicketIDUseExisting>
                        </ns0:AlertHistoryInsert>
                    </ns0:AlertHistory>
                </ns0:AlertUpdate>
            </ns0:updatedAlerts>
        </ns0:UpdateAlerts>
    </xsl:template>
</xsl:transform>

例C-10 updateEvent_response.xsl

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:a="http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2"
               xmlns:ns0="http://xmlns.oracle.com/sysman/connector">
 <xsl:template match="a:UpdateAlertsResponse">
  <ns0:EMEventResponse>
   <xsl:choose>
    <xsl:when test="a:UpdateAlertsResult/a:UpdatedAlerts/a:guid">
     <ns0:SuccessFlag>true</ns0:SuccessFlag>
     <ns0:ExternalEventId>
      <xsl:value-of select="a:UpdateAlertsResult/a:UpdatedAlerts/a:guid"/>
     </ns0:ExternalEventId>
    </xsl:when>
    <xsl:otherwise>
     <ns0:SuccessFlag>false</ns0:SuccessFlag>
     <ns0:ErrorMessage>
      <xsl:value-of select="a:UpdateAlertsResult/a:FailedUpdatedAlerts/a:FailedAlertUpdate/a:Error"/>
     </ns0:ErrorMessage>
    </xsl:otherwise>
   </xsl:choose>
  </ns0:EMEventResponse>
 </xsl:template>
</xsl:transform>

例C-11 connectorDeploy.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  <xsd:include schemaLocation="connectorCommon.xsd"/>
  <xsd:element name="ManagementConnector">
    <xsd:annotation>
      <xsd:documentation>Deployment Descriptor for Management Connectors</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Name" type="StringT64">                    
          <xsd:annotation>
              <xsd:documentation>
                The name of the connector type.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:element name="Version" type="VersionT">                    
          <xsd:annotation>
              <xsd:documentation>
                Version of the connector type.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:element name="EMCompatibleVersion" type="VersionT">                    
          <xsd:annotation>
              <xsd:documentation>
                The EM compabilitity version of the connector type.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:element name="Description" type="StringT256">                    
          <xsd:annotation>
              <xsd:documentation>
                The description of the connector type.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:element name="Category">                    
          <xsd:annotation>
              <xsd:documentation>
                The category of the connector type. It must be one of the three
                values listed next.
              </xsd:documentation>
          </xsd:annotation>                     
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="EventConnector"/>
              <xsd:enumeration value="TicketingConnector"/>
              <xsd:enumeration value="ChangeManagementConnector"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <!-- NewTargetType is for EventConnector only. -->
        <xsd:element name="NewTargetType" minOccurs="0">
          <xsd:annotation>
              <xsd:documentation>
                New target type definition for event connectors. This target type
                will be registered with Enterprise Manager and target instances can
                be created subsequently, including a default target. These targets
                are used to accommodate external events.
              </xsd:documentation>
          </xsd:annotation>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="TargetTypeName" type="StringStrictT64">                    
                <xsd:annotation>
                    <xsd:documentation>
                      The name of the target type.
                    </xsd:documentation>
                </xsd:annotation>                     
              </xsd:element>
              <xsd:element name="TargetTypeDisplayName" type="StringT128">                    
                <xsd:annotation>
                    <xsd:documentation>
                      The name of the target type, as shown on UI.
                    </xsd:documentation>
                </xsd:annotation>                     
              </xsd:element>
              <xsd:element name="DefaultTargetName" type="StringStrictT256">                    
                <xsd:annotation>
                    <xsd:documentation>
                      The name of the default target of the target type. The default
                      target will be used as a generic bucket to hold external events.
                    </xsd:documentation>
                </xsd:annotation>                     
              </xsd:element>
              <xsd:element name="DefaultTargetDisplayName" type="StringT256">                    
                <xsd:annotation>
                    <xsd:documentation>
                      The name of the default target of the target type, to be displayed
                       on UI.
                    </xsd:documentation>
                </xsd:annotation>                     
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="SOAPHeaderAuthentication"
                     type="SOAPHeaderAuthenticationType" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                Specification for SOAP Header authentication.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>             
        <xsd:element name="HTTPBasicAuthentication"
                     type="UsernamePasswordAuthenticationType" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                Specification for HTTP basic authentication.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:element name="UserNameTokenAuthentication"
                     type="UsernamePasswordAuthenticationType" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                Specification for Username Token authentication.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
        <xsd:element name="ConfigVariable" type="ConfigVariableType"
                     minOccurs="0" maxOccurs="20">                    
          <xsd:annotation>
              <xsd:documentation>
                The vaiables used during connector configuration. These variables
                are required by external system to complete connector configuration,
                which includes regitering with the external system. For instance,
                one configuration variable can be the resolution state required by
                Microsoft Operation Manager.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
        <xsd:element name="ConnectivityTestVariable" type="ConfigVariableType"
                     minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                An optional variable used to test connection to an external server.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
        <xsd:element name="Service" type="ServiceType" maxOccurs="20">                    
          <xsd:annotation>
              <xsd:documentation>
                Specification for web services, which define how connector framework
                can communicate with external system.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
        <xsd:element name="ExternalURL" type="ExternalURLType" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                Secification for the URL link to the external server, including
                the URL pattern and server specific variables. It is used to provide links
                to external server for viewing ticket details.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
        <xsd:element name="TemplateRegistration" type="TemplateRegistrationType"
                     minOccurs="0" maxOccurs="50">                    
          <xsd:annotation>
              <xsd:documentation>
                Specification for template registration. A template is registered
                based on the information provided in the element. A connector deployment
                descriptor can have an optional list of upto 50 template registratin
                elements.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>    
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:complexType name="ServiceType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complext type for a web service.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="Method">
          <xsd:annotation>
              <xsd:documentation>
                The name of the web service method. Each connector category has a
                predefined set of methods as defined next.
              </xsd:documentation>
          </xsd:annotation>       
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <!-- event connector: -->
            <xsd:enumeration value="setup"/>
            <xsd:enumeration value="initialize"/>
            <xsd:enumeration value="getNewAlerts"/>
            <xsd:enumeration value="getUpdatedAlerts"/>
            <xsd:enumeration value="acknowledgeAlerts"/>
            <xsd:enumeration value="updateAlerts"/>
            <xsd:enumeration value="createEvent"/>
            <xsd:enumeration value="updateEvent"/>
            <xsd:enumeration value="uninitialize"/>
            <xsd:enumeration value="cleanup"/>
            <!-- ticketing connector: -->
            <xsd:enumeration value="createTicket"/>
            <xsd:enumeration value="updateTicket"/>
            <xsd:enumeration value="getTicket"/>
            <!-- change management connector: -->
            <xsd:enumeration value="publishCS"/>
            <xsd:enumeration value="updateChangeRequest"/>
            <xsd:enumeration value="getChangeRequest"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
      <xsd:element name="WebServiceEndpoint" type="StringT256">                    
          <xsd:annotation>
              <xsd:documentation>
                The web service end point indicating a specific location for accessing
                a service.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="SOAPAction" type="StringT64" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                The SOAP action which carries out the web service call for the method.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="SOAPBindingType" minOccurs="0">                    
          <xsd:annotation>
              <xsd:documentation>
                The type of SOAP over HTTP binding. Choose from one of the four
                options defined next.
              </xsd:documentation>
          </xsd:annotation>
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:enumeration value="SOAP11HTTP_BINDING"/>
            <xsd:enumeration value="SOAP12HTTP_BINDING"/>
            <xsd:enumeration value="SOAP11HTTP_MTOM_BINDING"/>
            <xsd:enumeration value="SOAP12HTTP_MTOM_BINDING"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="SOAPHeaderAuthenticationType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complext type for SOAP Header Authentication.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="Username" type="ConfigVariableType">                    
        <xsd:annotation>
            <xsd:documentation>
              The username of the authentication.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
      <xsd:element name="Password" type="ConfigVariableType">                    
        <xsd:annotation>
            <xsd:documentation>
              The password of the authentication.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
      <xsd:element name="AuthVariable" type="ConfigVariableType" minOccurs="0"
                   maxOccurs="20">                    
        <xsd:annotation>
            <xsd:documentation>
              An optional list of extra authentication variables besides username
              and password.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
      <xsd:element name="SOAPHeader" type="StringT256">                    
        <xsd:annotation>
            <xsd:documentation>
              A SOAP header string serving as template for the SOAP header. It is
              to be updated with user inputs for variables defined above and
              bound with a HTTP request.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="UsernamePasswordAuthenticationType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complext type for Username Password authentication.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="Username" type="ConfigVariableType">                    
        <xsd:annotation>
            <xsd:documentation>
              The username of the authentication.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
      <xsd:element name="Password" type="ConfigVariableType">                    
        <xsd:annotation>
            <xsd:documentation>
              The password of the authentication.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ConfigVariableType">                    
    <xsd:annotation>
        <xsd:documentation>
          This seciton defines a complext type for configuration variables.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="VariableName" type="StringStrictT32">                    
        <xsd:annotation>
            <xsd:documentation>
              Name of the variable.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
      <xsd:element name="DisplayName" type="StringT64">                    
        <xsd:annotation>
            <xsd:documentation>
              Name of the variable used for display on UI.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="required" type="xsd:boolean" default="false">                    
      <xsd:annotation>
          <xsd:documentation>
            A Flag indicating whether or not the variable is mandatory.
          </xsd:documentation>
      </xsd:annotation>                     
    </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="ExternalURLType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for external URL.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="Pattern" type="StringT256">                    
          <xsd:annotation>
              <xsd:documentation>
                The URL pattern used to format links to the external server.
              </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      <xsd:element name="ConfigVariable" type="ConfigVariableType" minOccurs="0"
                   maxOccurs="50">
          <xsd:annotation>
              <xsd:documentation>
                An optional list of configuration variablees representing the details
                of the external server. They are used for constructing links to
                the server based on the URL pattern.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="TemplateRegistrationType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for template registration metadata
          which is used to register templates during connector deployment.
        </xsd:documentation>
    </xsd:annotation>                     
    <xsd:sequence>
      <xsd:element name="FileName" type="StringT256">                    
          <xsd:annotation>
              <xsd:documentation>
                The template file name.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="InternalName" type="StringStrictT128">                    
          <xsd:annotation>
              <xsd:documentation>
                A name representing the template in the connector framework.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="TemplateName" type="StringStrictT128">                    
          <xsd:annotation>
              <xsd:documentation>
                The template display name to be used on UI.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="TemplateType">                    
          <xsd:annotation>
              <xsd:documentation>
                The template type as one of the three options defined next.
              </xsd:documentation>
          </xsd:annotation>
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:enumeration value="InboundXSL"/>
            <xsd:enumeration value="OutboundXSL"/>
            <xsd:enumeration value="OutboundXML"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
      <xsd:element name="Description" type="StringT512">                    
          <xsd:annotation>
              <xsd:documentation>
                A description of the template.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

例C-12 EMEvent.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  jaxb:version="2.0"
  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
  jaxb:extensionBindingPrefixes="xjc">
 
  <xsd:annotation>
    <xsd:appinfo>
      <jaxb:globalBindings>
        <xjc:simple />
      </jaxb:globalBindings>
    </xsd:appinfo>
  </xsd:annotation>
   <xsd:include schemaLocation="connectorCommon.xsd"/>
   <xsd:element name="EMEvent" type="EMEventType" />
   <xsd:complexType name="EMEventType">
         <xsd:sequence>
            <xsd:element name="ConnectorGUID" type="xsd:string"/>
            <xsd:element name="ExternalEventID" type="xsd:string"
                         minOccurs="0"/>
            <xsd:element name="NotificationRuleOwner" type="xsd:string"/>
            <xsd:element name="NotificationRuleName" type="xsd:string"/>
            <xsd:element name="ConnectorVariable" type="VariableType"
                         minOccurs="0" maxOccurs="50"/>
            <xsd:element name="Property" type="PropertyType" minOccurs="0"
                         maxOccurs="50"/>
            <xsd:element name="SystemAttributes"
                         type="EventSystemAttributesType"/>
            <xsd:element name="EventClassSpecificAttributes">
               <xsd:complexType>
                  <xsd:sequence>
                     <xsd:choice minOccurs="0" maxOccurs="200">
                     <xsd:element name="StringAttribute" type="StringValueType"/>
                     <xsd:element name="NumberAttribute" type="StringValueType"/>
                     <xsd:element name="RawAttribute" type="StringValueType"/>
                     <xsd:element name="DateAttribute" type="DateValueType"/>
                     </xsd:choice>
                  </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
            <xsd:element name="EventContextAttributes">
               <xsd:complexType>
                  <xsd:sequence>
                     <xsd:choice minOccurs="0" maxOccurs="200">
                     <xsd:element name="StringAttribute" type="StringValueType"/>
                     <xsd:element name="NumberAttribute" type="StringValueType"/>
                     </xsd:choice>
                  </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   <xsd:complexType name="EventSystemAttributesType">
      <xsd:sequence>
         <xsd:element name="EventClass" type="xsd:string"/>
         <xsd:element name="EventID" type="xsd:string"/>
         <xsd:element name="SequenceID" type="xsd:string"/>
         <xsd:element name="OccurredDate" type="xsd:dateTime" minOccurs="0"/>
         <xsd:element name="ReportedDate" type="xsd:dateTime"/>
         <xsd:element name="DisplayTZ" type="xsd:string"/>
         <xsd:element name="EventName" type="xsd:string"/>
         <xsd:element name="Severity" type="xsd:string"/>
         <xsd:element name="SeverityCode" type="xsd:string"/>
         <xsd:element name="SourceInfo" type="SourceInfoType"/>
         <xsd:element name="Message" type="xsd:string" minOccurs="0"/>
         <xsd:element name="ActionMessage" type="xsd:string" minOccurs="0"/>
         <xsd:element name="EventURL" type="xsd:string"/>
         <xsd:element name="AutoClose" type="xsd:boolean"/>
         <xsd:element name="EventCategory" type="xsd:string" minOccurs="0"
                      maxOccurs="50"/>
      </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="StringValueType">
      <xsd:sequence>
         <xsd:element name="Name" type="xsd:string"/>
         <xsd:element name="Value" type="xsd:string"/>
      </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="DateValueType">
      <xsd:sequence>
         <xsd:element name="Name" type="xsd:string"/>
         <xsd:element name="Value" type="xsd:dateTime"/>
      </xsd:sequence>
   </xsd:complexType>
</xsd:schema>

例C-13 connectorCommon.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  <xsd:include schemaLocation="externalEvent.xsd"/>
  <xsd:complexType name="SourceInfoType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complext type for Source Information.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="SourceObjInfo" type="SourceObjInfoType" minOccurs="0">                    
        <xsd:annotation>
            <xsd:documentation>
              This element defines the data structure for the source object, the EM
              subsystem or component, that raises an EM event or an incident.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetInfo" type="TargetInfoType" minOccurs="0">                    
        <xsd:annotation>
            <xsd:documentation>
              The element defines the data structure for an EM target as related
              to the connector framework.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="SourceObjInfoType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for Source Object Information.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="ObjID" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              The unique ID to identify the source object.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ObjName" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              The name of the source object.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ObjOwner" type="xsd:string" minOccurs="0">                    
        <xsd:annotation>
            <xsd:documentation>
              The owner of the source object.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="SourceObjType" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              The type of the source object.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="SourceObjSubType" type="xsd:string" minOccurs="0">                    
        <xsd:annotation>
            <xsd:documentation>
              The subtype of the source object.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="TargetInfoType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for target information.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="TargetGUID" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              A unique GUID for the target.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetName" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              Name of the target.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetType" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              Type of the target.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetTypeLabel" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              The display label of the target type.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetURL" type="xsd:string">                    
        <xsd:annotation>
            <xsd:documentation>
              The URL of the target.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TargetProperty" type="PropertyType" minOccurs="0"
                   maxOccurs="50">                    
        <xsd:annotation>
            <xsd:documentation>
              An optional list of properties for the target.
            </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="PropertyType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for a property attribute.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Name" type="xsd:string">                    
          <xsd:annotation>
              <xsd:documentation>
                A string name defining a property attribute.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="Value" type="xsd:string" nillable="true">                    
          <xsd:annotation>
              <xsd:documentation>
                A non-null string value.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="VariableType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for a general variable.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="VariableName" type="StringStrictT32">                    
          <xsd:annotation>
              <xsd:documentation>
                Name of the variable. It has to be a string containing 1 or upto
                32 upper case or lower case letters or numbers.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
      <xsd:element name="VariableValue" type="StringT2048">                    
          <xsd:annotation>
              <xsd:documentation>
                Value of the variable. It has to be a string containing 1 or upto
                2048 characters.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="GetAlertsResponse">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for responses to a getAlerts request.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Alert" minOccurs="0" maxOccurs="200">                    
          <xsd:annotation>
              <xsd:documentation>
                The individual alerts contained in the response. A response may have
                upto 200 alerts.
              </xsd:documentation>
          </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="ExternalEvent">                    
              <xsd:annotation>
                  <xsd:documentation>
                    Details of the external event in the alert, as defined in
                    ExternalEvent.xsd.
                  </xsd:documentation>
              </xsd:annotation>                     
            </xsd:element>
            <xsd:element name="InstanceVariable" type="VariableType"
                         minOccurs="0" maxOccurs="50">                    
              <xsd:annotation>
                  <xsd:documentation>
                    A list of instance variables for the alert.
                  </xsd:documentation>
              </xsd:annotation>                     
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ConnectorVariablesType">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a complex type for connector variables. An element
          of type ConnectorVariablesType may have up to 50 connector variables, as
          defined next.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="ConnectorVariable" type="VariableType" minOccurs="0"
                   maxOccurs="50">                    
        <xsd:annotation>
            <xsd:documentation>
              A connector varialbe as a name/value pair.
            </xsd:documentation>
        </xsd:annotation>                     
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:simpleType name="StringT64">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          64 bytes.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="64"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringT128">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          128 bytes.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="128"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringT256">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          256 bytes.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="256"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringT512">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          512 bytes.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="512"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringT2048">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          2048 bytes.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="2048"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringStrictT16">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          16 bytes. The String can only contain lower or upper case letters, numbers,
          and the underscore characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="16"/>
      <xsd:pattern value="([a-zA-Z0-9_])*"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringStrictT32">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          32 bytes. The String can only contain lower or upper case letters, numbers,
          and the underscore characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="32"/>
      <xsd:pattern value="([a-zA-Z0-9_])*"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringStrictT64">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          64 bytes. The String can only contain lower or upper case letters, numbers,
          and the underscore characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="64"/>
      <xsd:pattern value="([a-zA-Z0-9_])*"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringStrictT128">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          128 bytes. The String can only contain lower or upper case letters, numbers,
          and the underscore characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="128"/>
      <xsd:pattern value="([a-zA-Z0-9_])*"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="StringStrictT256">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          256 bytes. The String can only contain lower or upper case letters, numbers,
          and the underscore characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="256"/>
      <xsd:pattern value="([a-zA-Z0-9_])*"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="VersionT">                    
    <xsd:annotation>
        <xsd:documentation>
          This section defines a simple type for a String with maximum length of
          20 bytes. The String can only contain numbers and the period characters.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="20"/>
      <xsd:pattern value="([0-9.])*"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>

例C-14 EMEventResponse.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  <xsd:include schemaLocation="../common/connectorCommon.xsd"/>
  <xsd:element name="EMEventResponse">                    
    <xsd:annotation>
        <xsd:documentation>
          The response from external server for an EM event it has received.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="SuccessFlag" type="xsd:boolean">                    
          <xsd:annotation>
              <xsd:documentation>
                The flag to indicate whether or not the event has been successfully
                 inserted or updated at the external system.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        <xsd:choice>
          <xsd:element name="ExternalEventId" type="StringT128">                    
            <xsd:annotation>
                <xsd:documentation>
                  The ID to identify the event created in the external event system.
                  It is returned by the external system when the event is successfully
                  inserted or updated.
                </xsd:documentation>
            </xsd:annotation>                     
          </xsd:element>
          <xsd:element name="ErrorMessage" type="StringT2048">                    
          <xsd:annotation>
              <xsd:documentation>
                The error message returned by the external system when the event
                fails to be inserted or updated.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
        </xsd:choice>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

例C-15 setupResponse.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  
  <xsd:include schemaLocation="../common/connectorCommon.xsd"/>
  <xsd:element name="InitializeResponse" type="ConnectorVariablesType">                    
          <xsd:annotation>
              <xsd:documentation>
                The response for an initialize reqeust. It contains a list of
                connector variables, which are name/value pairs.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
  
</xsd:schema>

例C-16 initializeResponse.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  
  <xsd:include schemaLocation="../common/connectorCommon.xsd"/>
  <xsd:element name="InitializeResponse" type="ConnectorVariablesType">                    
          <xsd:annotation>
              <xsd:documentation>
                The response for an initialize reqeust. It contains a list of
                connector variables, which are name/value pairs.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
  
</xsd:schema>

例C-17 uninitialize_response.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/sysman/connector"
            targetNamespace="http://xmlns.oracle.com/sysman/connector"
            elementFormDefault="qualified">
  
  <xsd:include schemaLocation="../common/connectorCommon.xsd"/>
  <xsd:element name="UninitializeResponse" type="ConnectorVariablesType">                    
          <xsd:annotation>
              <xsd:documentation>
                The response for an uninitialize reqeust. It contains a list of
                connector variables, which are name/value pairs.
              </xsd:documentation>
          </xsd:annotation>                     
        </xsd:element>
  
</xsd:schema>