cvc-complex-type.2.4.a: Invalid content was found starting with element 'CFTSScope'. One of {} is expected

This should cover W3C XML Schema, Relax NG and DTD related problems.
Poorna
Posts: 1

cvc-complex-type.2.4.a: Invalid content was found starting with element 'CFTSScope'. One of {} is expected

Fri Jan 04, 2019 9:04 pm

This is my xsd file:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://w3.ibm.com/xmlns/srv/fulfillment"
xmlns:GBI="http://w3.ibm.com/xmlns/srv/fulfillment"
elementFormDefault="qualified">

<element name="CFTSBillingRecordList" type="GBI:CFTSBillingRecordListType">
</element>

<complexType name="CFTSWorkNumberType">
<complexContent>
<extension base="GBI:CFTSBillingRecordItem">
<sequence>
<element name="CFTSScope" type="GBI:CFTSScopeType" minOccurs="0" maxOccurs="unbounded" form="qualified" />
<element name="CFTSIncidentCharge" type="GBI:CFTSIncidentChargeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSDistributedIncidentCharge" type="GBI:CFTSDistributedIncidentChargeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSTravelCharge" type="GBI:CFTSTravelChargeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSScheduledCharge" type="GBI:CFTSScheduledChargeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSLaborCharge" type="GBI:CFTSLaborChargeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSBillingRate" type="GBI:CFTSBillingRateType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSChargeCode" type="GBI:CFTSChargeCodeType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSRevenueAmount" type="GBI:CFTSRevenueAmountType" minOccurs="0" maxOccurs="unbounded" />
<element name="CFTSExternalKeyReferenceProfile" type="GBI:CFTSExternalKeyReferenceProfileType" minOccurs="0" maxOccurs="unbounded" />
<element name="CPIProfile" type="GBI:CPIProfileType" minOccurs="0" maxOccurs="1" />
<choice>
<element name="BlueHarmonyData" type="GBI:BlueHarmonyDataType" minOccurs="0" maxOccurs="1"/>
<element name="AdditionalData" type="GBI:BlueHarmonyDataType" minOccurs="0" maxOccurs="1"/>
</choice>
<element name="CFTSOfferingFeature" type="GBI:CFTSOfferingFeatureType" minOccurs="0" maxOccurs="unbounded" />
</sequence>

I am trying to include CFTSScope to it, as I have added as the first element.

My XML is:

<?xml version="1.0" encoding="UTF-8"?><gbi:CFTSBillingRecordList usingRealtimeValidation="true" xmlns:gbi="http://w3.ibm.com/xmlns/srv/fulfillment" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" country="ALL" company="ALL" senderId="POORNA.K" installationId="CFTS-US" cycleNumber="-1" timeSent="2016-03-11T17:15:56.343-05:00" recordCount="1" ns3:schemaLocation="http://w3.ibm.com/xmlns/srv/fulfillment http://w3.ibm.com/services/cft-s/schema ... erface.xsd">
<CFTSContract company="NEWSYSX" country="897" contractNumber = "TAAAXCA" >
<CFTSWorkNumber userId="POORNA.K" workNumber="LEAA6A" >
<CFTSScope scopeIndicator="I" actionCode="I" >
</CFTSScope>
</CFTSWorkNumber>
</CFTSContract>
</gbi:CFTSBillingRecordList>

I am having problem while validating: I have this error:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'CFTSScope'. One of '{MessageList, CFTSIncidentCharge, CFTSDistributedIncidentCharge, CFTSTravelCharge, CFTSScheduledCharge, CFTSLaborCharge, CFTSBillingRate, CFTSChargeCode, CFTSRevenueAmount, CFTSExternalKeyReferenceProfile, CPIProfile, BlueHarmonyData, AdditionalData, CFTSOfferingFeature}' is expected.]

What is the problem with adding CFTSScope, when all the rest of the elements are working fine.
adrian
Posts: 2471

Re: cvc-complex-type.2.4.a: Invalid content was found starting with element 'CFTSScope'. One of {} is expected

Wed Jan 09, 2019 7:18 pm

Hi,

Are you sure you are validating with your modified schema?
Do you have a working XML catalog file that resolves "http://w3.ibm.com/services/cft-s/schema/CFTSBillingInterface.xsd" to your schema?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests