2014-10-27 189 views
0

我正在開發Spring Integration項目。我有一個應用了樣式表的xml輸入文件。那麼它會通過基於xml模式的驗證。驗證失敗時沒有告訴我關於它失敗的原因。以下是帶有調試功能的日誌輸出,可以全面調試。任何想法我怎麼能找出它失敗的原因?爲什麼xml驗證失敗?

15:19:27.674 DEBUG [main]  [org.springframework.integration.xml.selector.XmlValidatingMessageSelector] Message was rejected due to XML Validation errors 
    15:19:27.674 DEBUG [main][org.springframework.integration.channel.DirectChannel] preSend on  channel 'sils-errors-validation-exception-channel', message: [Payload String content=<?xml version="1.0" encoding="UTF-8"?><SILSReplyAddUpdateMsg> 
    <hcit:MessageHeader xmlns:hcit="http://www.co.hennepin.mn.us/Common"> 
    <hcit:MessageSender> 
    <hcit:OrganizationName>HJIP</hcit:OrganizationName> 
    <hcit:ApplicationName>SILS</hcit:ApplicationName> 
    <hcit:ContactName>HJIP Support</hcit:ContactName> 
    <hcit:ContactPhoneNumber>612-348-6662</hcit:ContactPhoneNumber> 
    </hcit:MessageSender> 
    <hcit:MessageSentDateTime>2014-10-15T10:27:28</hcit:MessageSentDateTime> 
    <hcit:ApplicationMessageID>9840306</hcit:ApplicationMessageID> 
    <hcit:MessageTypeText>MODARR</hcit:MessageTypeText> 
    <hcit:CommentText/> 
    </hcit:MessageHeader> 
    <SILSReplyAddUpdate> 
    <hcit:MessageStatusText xmlns:hcit="http://www.co.hennepin.mn.us/Common">Error</hcit:MessageStatusText> 
    <hcit:MessageText xmlns:hcit="http://www.co.hennepin.mn.us/Common">Booking Document has MNCIS case but no SILS ID - Booking Document thrown away</hcit:MessageText> 
    <ActionResult> 
    <ActionTypeText>AddSubjectEntity</ActionTypeText> 
    <CaseTrackingID xmlns:hcit="http://www.co.hennepin.mn.us/Common" hcit:referenceID="2014005849-001"/> 
    <SubjectEntityID xmlns:hcit="http://www.co.hennepin.mn.us/Common" hcit:referenceID="201401400"/> 
    </ActionResult> 
    </SILSReplyAddUpdate> 
    </SILSReplyAddUpdateMsg> 
    ][Headers=  {replyChannel=org.springframewor[email protected]94b64e, errorChannel=org.springframewor[email protected]94b64e, origMsgMemento=2192484046341591040, history=sils-errors-xform-gateway,sils-errors-inbound-channel,silsOrigMsgHdrEnricher,sils-errors_orig_stored_channel,SILS-xslt-transform,sils-errors-transformed-channel,sils-errors-validation-filter,sils-errors-validation-exception-channel, id=3da2f46d-786d-f00a-533f-61e12828fe26, timestamp=1414441167674}] 
    15:19:27.674 DEBUG [main][org.springframework.integration.handler.BridgeHandler] org.springframework.integration.handler.BridgeHandler#0 received message: [Payload String content=<?xml version="1.0" encoding="UTF-8"?><SILSReplyAddUpdateMsg> 
    <hcit:MessageHeader xmlns:hcit="http://www.co.hennepin.mn.us/Common"> 
    <hcit:MessageSender> 
    <hcit:OrganizationName>HJIP</hcit:OrganizationName> 
    <hcit:ApplicationName>SILS</hcit:ApplicationName> 
    <hcit:ContactName>HJIP Support</hcit:ContactName> 
    <hcit:ContactPhoneNumber>612-348-6662</hcit:ContactPhoneNumber> 
    </hcit:MessageSender> 
    <hcit:MessageSentDateTime>2014-10-15T10:27:28</hcit:MessageSentDateTime> 
    <hcit:ApplicationMessageID>9840306</hcit:ApplicationMessageID> 
    <hcit:MessageTypeText>MODARR</hcit:MessageTypeText> 
    <hcit:CommentText/> 
    </hcit:MessageHeader> 
    <SILSReplyAddUpdate> 
    <hcit:MessageStatusText 
xmlns:hcit="http://www.co.hennepin.mn.us/Common">Error</hcit:MessageStatusText> 
    <hcit:MessageText xmlns:hcit="http://www.co.hennepin.mn.us/Common">Booking Document has MNCIS case but no SILS ID - Booking Document thrown away</hcit:MessageText> 
    <ActionResult> 
    <ActionTypeText>AddSubjectEntity</ActionTypeText> 
    <CaseTrackingID xmlns:hcit="http://www.co.hennepin.mn.us/Common" hcit:referenceID="2014005849-001"/> 
    <SubjectEntityID xmlns:hcit="http://www.co.hennepin.mn.us/Common" hcit:referenceID="201401400"/> 
    </ActionResult> 
    </SILSReplyAddUpdate> 
    </SILSReplyAddUpdateMsg> 
    ] 

和它正在比較的模式是以下內容。

<?xml version="1.0" encoding="UTF-8"?> 

<xs:schema xmlns:hcit="http://www.co.hennepin.mn.us/Common" 
      xmlns:hcs="http://hennepinsheriff.org/schema/sils" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      targetNamespace="http://hennepinsheriff.org/schema/sils" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.4.0"> 

    <xs:import namespace="http://www.co.hennepin.mn.us/Common" schemaLocation="HCITCommon-v2-2.xsd"> 
     <xs:annotation> 
      <xs:documentation>Schema describing HJIP message header.</xs:documentation> 
     </xs:annotation> 
    </xs:import> 

    <xs:simpleType name="SILSActionType"> 
     <xs:annotation> 
      <xs:documentation>Enumerated list of action names specific to SILS application services.</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:string"> 
      <xs:enumeration value="AddSubjectEntityRecords"/> 
      <xs:enumeration value="AddSubjectEntity"/> 
      <xs:enumeration value="AddCourtCaseNumber"/> 
      <xs:enumeration value="UpdateSubjectType"/> 
      <xs:enumeration value="UpdateSubjectPrimary"/> 
      <xs:enumeration value="UpdateTrackingOffense"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:element name="SubjectEntityID" nillable="true"> 
     <xs:annotation> 
      <xs:documentation>Criminal justice person identifier. Commonly known as SILS identifier.</xs:documentation> 
     </xs:annotation> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element ref="hcit:ID" minOccurs="0"/> 
      </xs:sequence> 
      <xs:attribute ref="hcit:referenceID"/> 
     </xs:complexType> 
    </xs:element> 
    <xs:element name="CaseTrackingID" nillable="true"> 
     <xs:annotation> 
      <xs:documentation>Identifier for SILS case.</xs:documentation> 
     </xs:annotation> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element ref="hcit:ID" minOccurs="0"/> 
      </xs:sequence> 
      <xs:attribute ref="hcit:referenceID"/> 
     </xs:complexType> 
    </xs:element> 
    <xs:element name="SILSReplyAddUpdate"> 
     <xs:annotation> 
      <xs:documentation>Return SILS message indicating status of add request.</xs:documentation> 
     </xs:annotation> 
     <xs:complexType> 
      <xs:complexContent> 
       <xs:extension base="hcit:MessageReplyType"> 
        <xs:sequence> 
         <xs:element name="ActionResult" minOccurs="0" maxOccurs="unbounded"> 
          <xs:complexType> 
           <xs:sequence> 
            <xs:element name="ActionTypeText" type="hcs:SILSActionType"/> 
            <xs:element ref="hcs:CaseTrackingID" minOccurs="0" maxOccurs="unbounded"/> 
            <xs:element ref="hcs:SubjectEntityID" minOccurs="0"/> 
           </xs:sequence> 
          </xs:complexType> 
         </xs:element> 
        </xs:sequence> 
       </xs:extension> 
      </xs:complexContent> 
     </xs:complexType> 
    </xs:element> 
    <xs:element name="SILSReplyAddUpdateMsg"> 
     <xs:annotation> 
      <xs:documentation>Document schema for processing SILS reply messages from Hennepin County.</xs:documentation> 
     </xs:annotation> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element ref="hcit:MessageHeader"/> 
       <xs:element ref="hcs:SILSReplyAddUpdate"/> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 
</xs:schema> 

您可以在日誌輸出中看到它正試圖驗證的XML。

這裏是引用

<?xml version="1.0" encoding="UTF-8"?> 
<!-- edited with XMLSpy v2006 rel. 3 U (http://www.altova.com) by Information Technology (mn hennepin county) --> 
<xs:schema xmlns:hcit="http://www.co.hennepin.mn.us/Common" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.co.hennepin.mn.us/Common" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.2"> 
    <xs:complexType name="AuditInfoType"> 
     <xs:annotation> 
      <xs:documentation>Describes who is responsible for transaction event.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element ref="hcit:UserID" minOccurs="0"/> 
      <xs:element ref="hcit:UserRoleText" minOccurs="0"/> 
      <xs:element ref="hcit:ActionTypeText" minOccurs="0"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="CodedElementType" abstract="true"> 
     <xs:annotation> 
      <xs:documentation>Structure for code value and corresponding description.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element ref="hcit:CodeText"/> 
      <xs:element ref="hcit:CodeDescription" minOccurs="0"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="LogEventType"> 
     <xs:annotation> 
      <xs:documentation>Structure for describing a processing event during course of message exchange. Calling application and application name will be same for top level event.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element name="MessageText" type="xs:string"> 
       <xs:annotation> 
        <xs:documentation>The event message text. May contain CDATA.</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
      <xs:element name="ExceptionText" type="xs:string" minOccurs="0"> 
       <xs:annotation> 
        <xs:documentation>The exception trace if any is available</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
      <xs:element name="EventLocation" type="hcit:LocationType" minOccurs="0"/> 
      <xs:element ref="hcit:EventTimeMilliseconds"/> 
      <xs:element ref="hcit:EventDateTime" minOccurs="0"/> 
      <xs:element ref="hcit:LogLevelText"/> 
      <xs:element ref="hcit:EnvironmentCode"/> 
      <xs:element ref="hcit:ThreadName" minOccurs="0"/> 
      <xs:element ref="hcit:ApplicationName"> 
       <xs:annotation> 
        <xs:documentation>Event source or service application system.</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
      <xs:element ref="hcit:ParentApplicationName"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="LocationType"> 
     <xs:annotation> 
      <xs:documentation>Structure for describing code location where some processing event is specified.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element name="ClassName" type="xs:string"> 
       <xs:annotation> 
        <xs:documentation>Logging event source class or component name</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
      <xs:element name="MethodName" type="xs:string" minOccurs="0"> 
       <xs:annotation> 
        <xs:documentation>Logging event source component method name</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
      <xs:element name="LineNumber" type="xs:int" minOccurs="0"> 
       <xs:annotation> 
        <xs:documentation>Logging event source code line number</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="MessageHeaderType"> 
     <xs:annotation> 
      <xs:documentation>Structure for metadata commonly used to administer message processing and debugging.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element ref="hcit:MessageSender"/> 
      <xs:element ref="hcit:MessageSentDateTime" minOccurs="0"/> 
      <xs:element ref="hcit:ApplicationMessageID" minOccurs="0"/> 
      <xs:element ref="hcit:MessageTypeText" minOccurs="0"/> 
      <xs:element ref="hcit:RequestReply" minOccurs="0"/> 
      <xs:element name="CommentText" type="xs:string" minOccurs="0"> 
       <xs:annotation> 
        <xs:documentation>Generalized text message.</xs:documentation> 
       </xs:annotation> 
      </xs:element> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="MessagePartyType"> 
     <xs:annotation> 
      <xs:documentation>Structure for identifying party participating in message exchange.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element ref="hcit:OrganizationName"/> 
      <xs:element ref="hcit:ApplicationName"/> 
      <xs:element ref="hcit:ContactName"/> 
      <xs:element ref="hcit:ContactPhoneNumber"/> 
      <xs:element ref="hcit:ContactEmailID" minOccurs="0"/> 
      <xs:element ref="hcit:UserID" minOccurs="0"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="MessageReplyType"> 
     <xs:annotation> 
      <xs:documentation>Structure for reply status message.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element name="MessageStatusText" type="hcit:MessageStatusTextType"/> 
      <xs:element name="MessageText" type="xs:string"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="RequestReplyType"> 
     <xs:annotation> 
      <xs:documentation>Structure for technical request reply meta data.</xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element ref="hcit:ReplyToQueueManagerName"/> 
      <xs:element ref="hcit:ReplyToQueueName"/> 
      <xs:element ref="hcit:CorrelationID" minOccurs="0"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="TraceLogType"> 
     <xs:sequence> 
      <xs:element ref="hcit:TraceRequestIndicator"/> 
      <xs:element ref="hcit:LogMessage" minOccurs="0" maxOccurs="unbounded"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:element name="ActionTypeText" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Action being performed; Add, Update, Delete</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ApplicationMessageID" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Application assigned unique message identifier.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ApplicationName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Proper name of user domain and/or service application system.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ParentApplicationName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Calling application name.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="CodeDescription" type="xs:string"/> 
    <xs:element name="CodeText" type="xs:string"/> 
    <xs:element name="ContactEmailID" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Email address to respond with notice about processing status such as system receipt confirmation, or processing error encountered, etc.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ContactName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Person or group name responsible for responding to questions about message processing or debugging.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ContactPhoneNumber" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Telephone number associated with ContactName party.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="CorrelationID" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Queue manager assigned message identiifer.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="MessageHeader" type="hcit:MessageHeaderType"> 
     <xs:annotation> 
      <xs:documentation>Metadata that is commonly used to administer message processing.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="MessageSender" type="hcit:MessagePartyType"> 
     <xs:annotation> 
      <xs:documentation>Structure for describing who initiated a message. </xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="MessageSentDateTime" type="xs:dateTime"> 
     <xs:annotation> 
      <xs:documentation>Application assigned date time when message is sent.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="MessageTypeText" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Determines how message is to be processed either by message broker e.g Pub/Sub, Datagram, or by an application. e.g. CaseGet, etc.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="OrganizationName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Owner name of system application.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ReplyToQueueManagerName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Location where message management software resides, typically a server name.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ReplyToQueueName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Technical name of message queue.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="RequestReply" type="hcit:RequestReplyType"> 
     <xs:annotation> 
      <xs:documentation>Structure for describing request/reply message parameters.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="TraceLog"> 
     <xs:annotation> 
      <xs:documentation>Component for requesting trace event logging details to be returned with message response.</xs:documentation> 
     </xs:annotation> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element ref="hcit:TraceRequestIndicator"/> 
       <xs:element ref="hcit:LogMessage" minOccurs="0" maxOccurs="unbounded"/> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 
    <xs:element name="UserID" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Network or application identifier of individual that initiated message.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="UserRoleText" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>User's role</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:simpleType name="DateOptionalTimeType"> 
     <xs:annotation> 
      <xs:documentation>YYYY-MM-DD HH:MM</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:string"> 
      <xs:pattern value="\d{4}-\d{2}-\d{2}(-\d{2}:\d{2})?"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:simpleType name="DateYearType"> 
     <xs:annotation> 
      <xs:documentation>Four digit calendar year</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:date"> 
      <xs:pattern value="\d{4}"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:simpleType name="IndicatorCodeType"> 
     <xs:annotation> 
      <xs:documentation>Indicates a Yes or No condition.</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:string"> 
      <xs:enumeration value="Y"/> 
      <xs:enumeration value="N"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:simpleType name="MessageStatusTextType"> 
     <xs:annotation> 
      <xs:documentation>Enumerated message status text.</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:string"> 
      <xs:enumeration value="Success"/> 
      <xs:enumeration value="Warning"/> 
      <xs:enumeration value="Error"/> 
      <xs:enumeration value="Failure"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:simpleType name="String40Type"> 
     <xs:annotation> 
      <xs:documentation>Structure for any text string restricted to 40 characters or less.</xs:documentation> 
     </xs:annotation> 
     <xs:restriction base="xs:string"> 
      <xs:maxLength value="40" fixed="false"/> 
     </xs:restriction> 
    </xs:simpleType> 
    <xs:attribute name="actionTypeText" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Specific action being performed; e.g. Add, Update, Delete as defined by business rules.</xs:documentation> 
     </xs:annotation> 
    </xs:attribute> 
    <xs:attribute name="asOfDateTime" type="xs:dateTime"> 
     <xs:annotation> 
      <xs:documentation>Metadata indicating business data is current as of date time</xs:documentation> 
     </xs:annotation> 
    </xs:attribute> 
    <xs:attribute name="codeSource" type="xs:anyURI"> 
     <xs:annotation> 
      <xs:documentation>Resource identifier for encoded data set.</xs:documentation> 
     </xs:annotation> 
    </xs:attribute> 
    <xs:attribute name="lastUpdateDateTime" type="xs:dateTime"> 
     <xs:annotation> 
      <xs:documentation>System date and time of last data modification.</xs:documentation> 
     </xs:annotation> 
    </xs:attribute> 
    <xs:attribute name="referenceID" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>An identifier used to correlate a piece of data with another.</xs:documentation> 
     </xs:annotation> 
    </xs:attribute> 
    <xs:element name="EnvironmentCode" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>Application environment; D = development, T = test, U= user acceptance, P= production</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="LogLevelText" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>The event logging level</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="ThreadName" type="xs:string"> 
     <xs:annotation> 
      <xs:documentation>The event source thread name</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="EventDateTime" type="xs:dateTime"> 
     <xs:annotation> 
      <xs:documentation>The event date time formated.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="EventTimeMilliseconds" type="xs:decimal"> 
     <xs:annotation> 
      <xs:documentation>Event time expressed in number of milliseconds since Jan 1, 1970 12 AM</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="LogEvent" type="hcit:LogEventType"/> 
    <xs:element name="AuditInfo" type="hcit:AuditInfoType"/> 
    <xs:element name="LogMessage" type="hcit:LogMessageType"/> 
    <xs:complexType name="LogMessageType"> 
     <xs:sequence> 
      <xs:element ref="hcit:LogEvent"/> 
      <xs:element ref="hcit:AuditInfo" minOccurs="0"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:element name="TraceRequestIndicator" type="xs:boolean"/> 
    <xs:element name="ID" type="xs:integer"> 
     <xs:annotation> 
      <xs:documentation>Numeric identifier</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
    <xs:element name="RequestResponse" type="hcit:MessageReplyType"> 
     <xs:annotation> 
      <xs:documentation>Base response to request message.</xs:documentation> 
     </xs:annotation> 
    </xs:element> 
</xs:schema> 
+0

確定的驗證可以訪問「HCITCommon-V2-2。 xsd「模式導入您的xsd? – RealSkeptic 2014-10-27 21:28:36

+0

是,該文件存在於同一個目錄中。我已經將其內容添加到原始問題中。 – 2014-10-28 13:28:35

回答

1

<SILSReplyAddUpdateMsg>共同架構未聲明它的命名空間,嘗試添加

<hcs:SILSReplyAddUpdateMsg xmlns:hcs="http://hennepinsheriff.org/schema/sils"> 

順便說一句,這個XML驗證帶使用氧氣

<?xml version="1.0" encoding="UTF-8"?> 
<hcs:SILSReplyAddUpdateMsg xmlns:hcs="http://hennepinsheriff.org/schema/sils" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://hennepinsheriff.org/schema/sils file:///xxx"> 
    <hcit:MessageHeader xmlns:hcit="http://www.co.hennepin.mn.us/Common"> 
     <hcit:MessageSender> 
      <hcit:OrganizationName>HJIP</hcit:OrganizationName> 
      <hcit:ApplicationName>SILS</hcit:ApplicationName> 
      <hcit:ContactName>HJIP Support</hcit:ContactName> 
      <hcit:ContactPhoneNumber>612-348-6662</hcit:ContactPhoneNumber> 
     </hcit:MessageSender> 
     <hcit:MessageSentDateTime>2014-10-15T10:27:28</hcit:MessageSentDateTime> 
     <hcit:ApplicationMessageID>9840306</hcit:ApplicationMessageID> 
     <hcit:MessageTypeText>MODARR</hcit:MessageTypeText> 
     <hcit:CommentText/> 
    </hcit:MessageHeader> 
    <hcs:SILSReplyAddUpdate> 
     <hcit:MessageStatusText xmlns:hcit="http://www.co.hennepin.mn.us/Common" 
      >Error</hcit:MessageStatusText> 
     <hcit:MessageText xmlns:hcit="http://www.co.hennepin.mn.us/Common">Booking Document has 
      MNCIS case but no SILS ID - Booking Document thrown away</hcit:MessageText> 
     <hcs:ActionResult> 
      <hcs:ActionTypeText>AddSubjectEntity</hcs:ActionTypeText> 
      <hcs:CaseTrackingID xmlns:hcit="http://www.co.hennepin.mn.us/Common" 
       hcit:referenceID="2014005849-001"/> 
      <hcs:SubjectEntityID xmlns:hcit="http://www.co.hennepin.mn.us/Common" 
       hcit:referenceID="201401400"/> 
     </hcs:ActionResult> 
    </hcs:SILSReplyAddUpdate> 
</hcs:SILSReplyAddUpdateMsg> 

如果您將其與您所擁有的相比較,則可以看到SILSReplyAddUpdate爲缺少它的前綴,與ActionResult及其子節點相同。

如果你不希望添加前綴,你可以使用默認的命名空間爲您的根元素,就像這樣:

<SILSReplyAddUpdateMsg xmlns="http://hennepinsheriff.org/schema/sils"> 
+0

這是第一個元素。 SILSReplyAddUpdateMsg。滾動到代碼塊的右側。 – 2014-10-27 21:11:42

+0

更新了我的答案,嘗試將命名空間添加到根元素 – mendieta 2014-10-27 21:25:28

+0

我無法直接更改xml。它被拉出隊列,然後有一個樣式表應用到它。由別人寫的。 – 2014-10-28 13:25:03