cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing Error : enumeration constraint failed

Former Member
0 Kudos

Hi,

Error details:

<b>

Text:Error Location: [line 00000002][Column 000180]: Parsing Error : enumeration constraint failed.

The element: 'Qualifier' has an invalid value according to its data type

</b>

I am getting the above-mentioned error for the following message:

<b>

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

- <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">

<EnvelopeVersion>2.0</EnvelopeVersion>

- <Header>

- <MessageDetails>

<Class>IR-PAYE-EOY</Class>

<Qualifier>request</Qualifier>

<Function>submit</Function>

.......

</b>

The actual mapping is:

<b>

....

<xsd:element name="Qualifier" form="qualified">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:enumeration value="request" />

<xsd:enumeration value="acknowledgement" />

<xsd:enumeration value="response" />

<xsd:enumeration value="poll" />

<xsd:enumeration value="error" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

....

</b>

From the mapping, I can see that the value of element Qualifier can be "request" which is the case in the sent message. Still, it gives an error about constraint failure. Any ideas about what I could be missing here ???

Thanks and regards

Shehryar

Accepted Solutions (1)

Accepted Solutions (1)

prabhu_s2
Active Contributor
0 Kudos

<b>has an invalid value according to its data type</b>

check for the data types that being declared for the fields and the value that populates to the fields....there is a mismatch...if u had some declaration like integer for a field but u have populated a string value then u might encounter this kinda error

Message was edited by:

Prabhu S

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved with the help of Inland Revenue Gateway support team.

paul_digance
Explorer
0 Kudos

Hi Shehryar,

Did you manage to solve this issue? I am getting the exact same problem.

Any help would be greatly appreciated.

Thanks,

Paul Digance.

Former Member
0 Kudos

Hi,

Actually the communication templates delivered by SAP are not pointing to correct destinations. The submitEOYR is pointing to HTTP Destination used for polling, while the other one used for polling is pointing to destination used for submission to inland revenue. Please change these manually in your ID to point to the correct destinations. It should work fine then.

Regards

Message was edited by:

Shehryar Khan

Former Member
0 Kudos

xsd:enumeration is not currently supported in message mapping editor. May be this is the cause for your error.

To get the list of supported XSD types refer to the following document.

service.sap.com/xi -> Media Library->Documentation: SAP XI 3.0 (SP11)

-> Supported XML schema and WSDL

Satish

Former Member
0 Kudos

The data type is xsd:string and XI version is 7.

The problem is coming from receiver side. It passes through XI perfectly fine. When the document is transmitted to the receiver, it responds with a parsing error.

Any other ideas?

Regards

Message was edited by:

Shehryar Khan

Former Member
0 Kudos

Yes you are correct, the base data type is XSD:STRING but you have imposed an restriction on the field "Qualifier" using XSD:enumeration which is not supported.

My suggestion would be to edit the schema to remove XSD:enumeration as it is not supported in XI. And then retest the message.

Satish

Former Member
0 Kudos

This is a standard package delivered by SAP for E-Filing submissions to the government. So changing the schema is not allowed. What I am unable to comprehend is how

<b>

<Qualifier>request</Qualifier>

</b>

goes against the restriction (string) and enumeration? The value is a string and within the list of values specified by the enumeration. So I cant comprehend the cause of the problem.

I am new to this so please bear my basic questions.

Regards

Former Member
0 Kudos

The problem is coming from receiver side. It passes through XI perfectly fine. When the document is transmitted to the receiver, it responds with a parsing error.

>> Where does the error actually occur ?

Message mapping in XI

or

the backend system that is receiving this message?

If its the backend system where you get this error message you need to check the schema validation that happens at the backend.

Satish

Former Member
0 Kudos

The source XML document is passed from SAP ERP through XI to the government gateway as a test message to validate any errors. When the government gateway validates the source XML, it sends back a parsing error to ERP system that there is a problem in the element called Qualifier. But looking at the WSDL file and standard mapping program, I cant understand whats wrong because the value "request" is a string and within the list of values mentioned in enumeration.

Regards

Former Member
0 Kudos

If I understand your scenario correctly you have

SAP ERP --> XI --> Govt gateway

and the error

"Text:Error Location: [line 00000002][Column 000180]: Parsing Error : enumeration constraint failed.

The element: 'Qualifier' has an invalid value according to its data type"

is generated from govt gateway and not XI.

1) Can you please send me the message that is sent from XI to Govt gateway ie after message mapping (not the message SAP ERP sends to XI)

2) XSD that is used by Govt gateway to validate your incoming XML.

If you can provide the above information, I can try to find the cause of the error.

Satish

Former Member
0 Kudos

XML sent by SAP XI:

(trace removed)

Message was edited by:

Shehryar Khan

Former Member
0 Kudos

Relevant part of XSD:

<?xml version="1.0" encoding="ISO-8859-1"?>

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.govtalk.gov.uk/CM/envelope">

<wsdl:types>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.govtalk.gov.uk/CM/envelope" targetNamespace="http://www.govtalk.gov.uk/CM/envelope" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" id="GovTalkEnvelope">

<xsd:annotation>

<xsd:documentation>

This schema is used as the envelope for all GovTalk messages. It is

described in detail in this document on the GovTalk web site.

</xsd:documentation>

<xsd:appinfo />

</xsd:annotation>

<xsd:import namespace="http://www.govtalk.gov.uk/taxation/EOY/06-07/1" />

<xsd:element xmlns:eoy="http://www.govtalk.gov.uk/taxation/EOY/06-07/1" name="GovTalkMessage">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="EnvelopeVersion" type="xsd:string" />

<xsd:element name="Header">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="MessageDetails">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Class">

<xsd:simpleType>

<xsd:restriction base="UnicodeNameString">

<xsd:maxLength value="32" />

<xsd:minLength value="4" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

<xsd:element name="Qualifier">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:enumeration value="request" />

<xsd:enumeration value="acknowledgement" />

<xsd:enumeration value="response" />

<xsd:enumeration value="poll" />

<xsd:enumeration value="error" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

<xsd:element name="Function" minOccurs="0">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:enumeration value="list" />

<xsd:enumeration value="read" />

<xsd:enumeration value="delete" />

<xsd:enumeration value="add" />

<xsd:enumeration value="submit" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

<xsd:element name="TransactionID">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:minLength value="0" />

<xsd:maxLength value="32" />

<xsd:pattern value="[0-9A-F]{0,32}" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

Former Member
0 Kudos

Hi Shehryar

What you have sent is the trace information.

I need the message payload

You can find under

Technical routing -> Payloads-> maindocument

Satish

Former Member
0 Kudos

Sorry. Here it is:

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

- <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">

<EnvelopeVersion>2.0</EnvelopeVersion>

- <Header>

- <MessageDetails>

<Class>IR-PAYE-EOY</Class>

<Qualifier>request</Qualifier>

<Function>submit</Function>

<CorrelationID />

<Transformation>XML</Transformation>

<GatewayTest>1</GatewayTest>

<GatewayTimestamp />

</MessageDetails>

- <SenderDetails>

- <IDAuthentication>

<SenderID>xxxxxxxxxxxxxxxxxxx</SenderID>

- <Authentication>

<Method>MD5</Method>

<Value>xxxxxxxxxxxxxxxxxxxxxxxx</Value>

</Authentication>

</IDAuthentication>

</SenderDetails>

</Header>

- <GovTalkDetails>

- <Keys>

<Key Type="TaxOfficeNumber">xxx</Key>

<Key Type="TaxOfficeReference">xxxx</Key>

</Keys>

- <ChannelRouting>

- <Channel>

<URI>0142</URI>

</Channel>

</ChannelRouting>

</GovTalkDetails>

- <Body>

- <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/EOY/06-07/1">

- <IRheader>

<TestMessage>1</TestMessage>

- <Keys>

<Key Type="TaxOfficeNumber">xxx</Key>

<Key Type="TaxOfficeReference">xxxx</Key>

</Keys>

<PeriodEnd>2007-04-05</PeriodEnd>

<DefaultCurrency>GBP</DefaultCurrency>

<Sender>Company</Sender>

</IRheader>

- <EndOfYearReturn>

<ReturnType>original</ReturnType>

<SubmissionType>complete</SubmissionType>

- <P35>

- <EmployerDetails>

<EmployerName>xxxxxxxxxxxxxxx</EmployerName>

</EmployerDetails>

- <CheckList>

<CompletedEndOfYearSummary>yes</CompletedEndOfYearSummary>

<FreeOfTaxPayments>no</FreeOfTaxPayments>

<ExpensesOrBenefits>no</ExpensesOrBenefits>

<EmployeesOutOfUK IsIncluded="no">yes</EmployeesOutOfUK>

<EmployeesPayToThirdParty>no</EmployeesPayToThirdParty>

<ServicePayments>no</ServicePayments>

</CheckList>

- <Declarations>

<P14Declaration>yes</P14Declaration>

<P38Adeclaration>are not due</P38Adeclaration>

<P11Ddeclaration>are due</P11Ddeclaration>

</Declarations>

- <Summary>

- <NIC>

<TotalNIC>3408.17</TotalNIC>

<SSPSMPSPPandSAPfunding>0.00</SSPSMPSPPandSAPfunding>

<SSP>0.00</SSP>

<SMP>0.00</SMP>

<SMPcompensation>0.00</SMPcompensation>

<SPP>0.00</SPP>

<SPPcompensation>0.00</SPPcompensation>

<SAP>0.00</SAP>

<SAPcompensation>0.00</SAPcompensation>

</NIC>

- <PAYE>

<P14Tax>4851.00</P14Tax>

<TaxAdvance>0.00</TaxAdvance>

<TotalTax>4851.00</TotalTax>

</PAYE>

- <CombinedAmounts>

<TotalTaxAndNIC>8259.17</TotalTaxAndNIC>

<StudentLoan>0.00</StudentLoan>

<TotalNICsTaxAndStudentLoan>8259.17</TotalNICsTaxAndStudentLoan>

<NetStatutoryPaymentsRecovered>0.00</NetStatutoryPaymentsRecovered>

<CombinedLessStatutoryRecovered>8259.17</CombinedLessStatutoryRecovered>

<SubcontractorTax>0.00</SubcontractorTax>

<TotalPayable>8259.17</TotalPayable>

<TotalPaid>8259.17</TotalPaid>

<IncentivePayment>0.00</IncentivePayment>

<TotalRemainingToPay>0.00</TotalRemainingToPay>

<CISdeductions>0.00</CISdeductions>

<TotalAfterCISdeductions>0.00</TotalAfterCISdeductions>

</CombinedAmounts>

</Summary>

</P35>

<CompressedPart Type="gzip">H4sIAAAAAAAAAF2SYWCMBCG/8rid20LKJDcLkFlyRZEEjDGjzU2wajUQLds/37XImokDXmfu7eX twUoRICQy4tCNCtwi9dN8CchPK7xcScjk0HzGpgvXG5nqOIp7MxD8ciBGYZSvWLF3lWZCUFWe xt2Oc9LgyXttAzbU65R8P4B5pCsi6tkvv3UTJCSGXbICQmSzNyxt7EGnsEehmdVihmkSsPDGll 9IYcofCmrjMUSLl5c21q9AMeTWxgR5BerhjzcBL55CJtQy46OklZIHdTrIJydceVxeKOhcXkjqSg kH9Jc6gk3UDRqh83lkjuz4paNdTwTYfVYrw2FUfu9ftYhbeLuR1RBBNxWNKaWRr0OP0fbigReFc hRqZls0QuAdY6INCn4sMmJOwPR7W7bW2Qai2UMk9nRMZv+gfxpO4rZHAgAA</CompressedPart>

<P14Count>1</P14Count>

</EndOfYearReturn>

</IRenvelope>

</Body>

</GovTalkMessage>

Former Member
0 Kudos

and by the way, the government document says this:

The <Qualifier> element denotes the message type. The possible value are:

• request

A value of "request" indicates that this is a message from a client requesting service from the Gateway

or a Government organisation. Submission of data is an example of a request.

• acknowledgement

This indicates that the Gateway has received and accepted the message and that it has been passed on to

the appropriate organisation(s), but that a response has not yet been received.

• response

This indicates that the message is a response from the Gateway or organisation to a previous request.

• poll

This indicates that the message is a poll from the client for a response after an acknowledgement has

previously been sent.

• error

This is a form of "negative acknowledgement" and indicates that either the Gateway or a Government

organisation has detected an error in the message. The <GovTalkErrors> block will give more detail

about the error

This element is local to the element MessageDetails

minOccurs: 1 (default)

maxOccurs: 1 (default)

base: xsd:string

facets:

xsd:enumeration:

request

xsd:enumeration:

acknowledgement

xsd:enumeration:

response

xsd:enumeration:

poll

xsd:enumeration:

error

Former Member
0 Kudos

Hi

If I verify your WSDL and the output message sent from XI to your govt gateway. I could make the following observations

1) There is no issues with <xsd:element name="Qualifier"> and its in accordance with the XML message sent to govt gate way.

2) But if you check the element sequence in XSD and XML

<xsd:element name="Function" minOccurs="0">

and TransactionID should be the next element.

<xsd:element name="TransactionID">

But as per your message you have

<Qualifier>request</Qualifier>

<Function>submit</Function>

<b><CorrelationID /></b> <b>--> This is not correct</b>

So I would assume there is some version mismatch between the XSD used by govt gateway for validation and the XML message you send to govt gateway.

I would suggest you regenerate a new WSDL file from the govt gateway and then validate your message.

Satish

Message was edited by:

Satish Renugopal

Former Member
0 Kudos

what is ur recievere adapter and receiver system.?

Former Member
0 Kudos

Hi,

Thanks for the reply. Since this is a test message, I dont think a transaction ID is required. The XSD says that length of this element can be 0. You still believe this is causing the error.

By the way, the package imported from service marketplace is latest.

Regards

Former Member
0 Kudos

The receiver adapter is HTTP and receiver system is an HTTP destination in XI.

Regards

Former Member
0 Kudos

The government XSD file can be checked at http://www.govtalk.gov.uk/documents/envelope-v2-0.xsd

Regards

Former Member
0 Kudos

then how r u sending WSDL through HTTP adapter?How is reciing system gogin to process it . receivingsystem should be some web apllicatin so that it can understand what u send to it

Former Member
0 Kudos

I am sorry I could not understand what you said. The receiving system is able to handle XML messages, so I guess thats about all I need to know...right? The WSDL is available in XI and message mapping ensures the correct payload format. Is there something else that is required?

Regards

Former Member
0 Kudos

when HTTP adapter is used as receivng adapter then the reciver system should be webapplication which can understand it not some other system whihc does not understand HTML.

Former Member
0 Kudos

Yes thats ok. The government gateway can understand whats coming from XI since it is in the relevant format for E-Filing.

Regards

Former Member
0 Kudos

then check the both structures ur sending and e-gateway is excpeting .it is excepting different strucutre than wht ur sending

Former Member
0 Kudos

HI,

Please see the below links

/thread/125162 [original link is broken]

/people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model

/people/klaus.meffert/blog/2004/06/18/installation-of-ep6-sp4-sneak-preview-guide-for-the-brave

Regards

Chilla

Former Member
0 Kudos

Hi Sekhar,

I am sorry but I am not sure these are relevant to the problem at hand. I am having a data validation error from the receiver although the file being generated is according to the published XSD standards.

Regards

Message was edited by:

Shehryar Khan