Companies House XML Gateway – “XML failed schema validation line 16 column 155” on IN01 v3.8 submission (GovTalkMessage Body issue)

Hello everyone,

I’m integrating with the Companies House XML Gateway for submitting IN01 company incorporations using the new CompanyIncorporation-v3-8 schema. I have a test Presenter ID and Authentication Value directly from Companies House staff (Simon), and I’m posting to the correct endpoint:

https://xmlgw.companieshouse.gov.uk/v1-0/xmlgw/Gateway

:check_mark: What is working:

  • The request hits the gateway.
  • The <SenderID> and <Authentication><Value> are correctly formatted as md5#<hash>.
  • <Method> is set to clear as required.

:red_exclamation_mark: The issue:

No matter what I try, I ALWAYS get the same error:

Error 100:
XML failed schema validation: XML error: 
Fatal error encountered during schema scan line 16 column 155

This happens even though:

  • The GovTalkMessage root includes only one schemaLocation (Egov_ch.xsd)
  • <Body> contains only <FormSubmission>
  • <FormSubmission> uses exactly:
    xmlns="http://xmlgw.companieshouse.gov.uk/Header"
  • No prefix is used (no ch-header).
  • CompanyIncorporation no longer contains any schemaLocation.

:check_mark: Here is the exact XML I am sending (redacted):

<?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage
    xmlns="http://www.govtalk.gov.uk/schemas/govtalk/govtalkheader"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.govtalk.gov.uk/schemas/govtalk/govtalkheader
        http://xmlgw.companieshouse.gov.uk/v1-0/schema/Egov_ch.xsd">

    <EnvelopeVersion>1.0</EnvelopeVersion>

    <Header>
        <MessageDetails>
            <Class>CompanyIncorporation</Class>
            <Qualifier>request</Qualifier>
            <TransactionID>ED847AA1E8A047738BF019D2527968F3</TransactionID>
        </MessageDetails>

        <SenderDetails>
            <IDAuthentication>
                <SenderID>md5#d75d15c712c7f01739eafb9c0b5a1e18</SenderID>
                <Authentication>
                    <Method>clear</Method>
                    <Value>md5#e04dc725dc513f0979fef06afa2dddb1</Value>
                </Authentication>
            </IDAuthentication>
        </SenderDetails>
    </Header>

    <GovTalkDetails><Keys/></GovTalkDetails>

    <Body>
        <FormSubmission xmlns="http://xmlgw.companieshouse.gov.uk/Header">
            <FormHeader>
                <CompanyName>Test Ltd</CompanyName>
                <PackageReference>0012</PackageReference>
                <FormIdentifier>CompanyIncorporation</FormIdentifier>
                <SubmissionNumber>000004</SubmissionNumber>
            </FormHeader>
            <DateSigned>2025-11-28</DateSigned>
            <Form>

                <CompanyIncorporation xmlns="http://xmlgw.companieshouse.gov.uk">
                    <CompanyType>BYSHR</CompanyType>
                    <CountryOfIncorporation>EW</CountryOfIncorporation>
                    ...
                </CompanyIncorporation>

            </Form>
        </FormSubmission>
    </Body>

</GovTalkMessage>

:red_exclamation_mark: Expected behavior:

I expected the gateway to accept the XML or at least show a schema path of the validation failure.

:red_exclamation_mark: Actual behavior:

The gateway responds with:

<SenderID></SenderID>
<Method>CHMD5</Method>
<Value></Value>

Error 100
Fatal error encountered during schema scan line 16 column 155

:check_mark: What Simon from CH already confirmed:

  • Endpoint is correct
  • Must use md5#<hash> format
  • <Method> must be clear
  • Do NOT combine hashes (no PresenterID + AuthValue + SubmissionNumber)
  • IN01 must use v3.8
  • FormSubmission must use only
    xmlns="http://xmlgw.companieshouse.gov.uk/Header"

:red_question_mark: What I need help with:

Can anyone confirm the exact required XML structure for:

  • <Body>
  • <FormSubmission>
  • <Form>
  • <CompanyIncorporation> nesting
  • Namespace expectations between Header and Body
  • Any common hidden mistakes that cause a failure at “line 16 column 155”?
    (that line corresponds to <Body>)

If someone has a working example (even simplified), that would be extremely helpful.

Thanks!

Redacted header we send, including additional HMRC info (which I believe is optional). Have cut it off once it starts getting into the company details. Haven’t given yours a once over or compaed it yet, but will have a snoop now.

<?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope" 
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" 
xmlns:gt="http://www.govtalk.gov.uk/schemas/govtalk/core" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.govtalk.gov.uk/CM/envelope http://xmlgw.companieshouse.gov.uk/v1-1/schema/Egov_ch-v2-0.xsd "> 
  <EnvelopeVersion>1.0</EnvelopeVersion>
  <Header>
    <MessageDetails>
      <Class>CompanyIncorporation</Class>
      <Qualifier>request</Qualifier>
    <TransactionID>12345</TransactionID>
     
    </MessageDetails>
    <SenderDetails>
      <IDAuthentication>
        <SenderID>XXX</SenderID>
        <Authentication>
          <Method>clear</Method>
          <Value>YYY</Value>
        </Authentication>
      </IDAuthentication>
      <EmailAddress>inc@ourdomain.com</EmailAddress>
    </SenderDetails>
  </Header>
  <GovTalkDetails>
    <Keys/>
  </GovTalkDetails>
  <Body>
   <FormSubmission xsi:schemaLocation="http://xmlgw.companieshouse.gov.uk/Header http://xmlgw.companieshouse.gov.uk/v2-1/schema/forms/FormSubmission-v2-11.xsd">
  <FormHeader>
    <CompanyName>REDACTED IMITED</CompanyName>
    <PackageReference>1234</PackageReference>
    <FormIdentifier>CompanyIncorporation</FormIdentifier>
    <SubmissionNumber>aaa000</SubmissionNumber>
  </FormHeader>
  <DateSigned>2025-12-12</DateSigned>
  <AdditionalInformation><CorporationTaxInformation  xsi:schemaLocation="http://xmlgw.companieshouse.gov.uk/HMRC http://xmlgw.companieshouse.gov.uk/v1-0/schema/forms/additionalInformation/HMRC-v1-0.xsd">       <FirstAccountingPeriodStartDate>2025-12-12</FirstAccountingPeriodStartDate>
      <AccountsMadeUpDate>2026-12-12</AccountsMadeUpDate>
      <CT61MayApply>false</CT61MayApply>
          <PrincipalPlaceOfBusiness>ADDRESS BLOCK</PrincipalPlaceOfBusiness>
  </CorporationTaxInformation>  </AdditionalInformation><Form><CompanyIncorporation xsi:schemaLocation="http://xmlgw.companieshouse.gov.uk http://xmlgw.companieshouse.gov.uk/v1-0/schema/forms/CompanyIncorporation-v3-8.xsd">  <CompanyType>BYSHR</CompanyType>
      <CountryOfIncorporation>EW</CountryOfIncorporation>
      <RegisteredOfficeAddress> etc etc

Feel I should add that while I know a fair bit about incorporation specific XML I am not an expert on XML in general and don’t really know how all the schema statments in headers work in general so some of these were trial and error back in the day or may be completely redundant.

Also in your example above you’re missing the document block between and but I don’t know if that’s an artifact of refacting (redaction?)

</CompanyIncorporation></Form>  <Document>
    <Data>xxx</Data>
    <Date>2025-12-03</Date>
    <ContentType>application/pdf</ContentType>
    <Category>ARTS</Category>
  </Document>
</FormSubmission> 
 </Body>
</GovTalkMessage>

Hi,

Is there any reason why you have md5# typed in these elements please?

md5#d75d15c712c7f01739eafb9c0b5a1e18

clear
md5#e04dc725dc513f0979fef06afa2dddb1

You just the need the md5# values, not the term itself.

SDN