Initial Steps for testing over the XML Gateway

Hi,

Hope someone can help. We are just starting to test some interaction with Companies House using the XML gateway. I have received a presenter ID and authentication value from CH and we are now attempting to write some Node/Javascript code to connect with the gateway to eventually incorporate and file documents. Would someone have an example of some working code which we can start with? Also for the usage of the authentication value (10 alphanumeric code) should we use a cryptographic hashing function on this before we send over the XML gateway?

Thanks in advance.
Rick

Both the Presenter ID and Password/Auth code should be a lower case MD5 hash. You should also populate the <GatewayTest> tag with the value that they gave you.

Thanks Steve. We are writing our code in NodeJS/Javascript and are using the ‘crypto’ NPM package for hashing -

var crypto = require(‘crypto’);
var encryptedPassword = crypto.createHash(“md5”).update(clearPassword).digest(“hex”);

I guess I am not doing the lowercase…

It would be great if you had an example of a working sample request by any chance?

Thanks
Rick

Why don’t you just use an online MD5 hashing tool and store the hash instead of the plain text?

You could also use the JavaScript .toLowerCase()

You can find the CH schema’s and example submissions here Companies House XML Gateway Input - Schema Status

Example here Mr

Good morning Rick,

Thank you for your e-mail.

We do not have a workable example for the current incorporation schema unfortunately as it is being retired on 29th June, as a direct result of the new Small Business Act requirements. New schemas will be in place from 30th June, and relevant working examples can be found here:

http://xmlalpha.companieshouse.gov.uk/examples/IncorporationWithPSCAndRegisters.xml
http://xmlalpha.companieshouse.gov.uk/examples/IncorporationWithPSCCompanyStatement.xml

I hope this helps.
SDN

Hi Simon,

Thanks for your reply. I think I am having trouble getting the correct URLs to make the XML requests against… I got a 404 response from the address I was using… here is our test XML request:

 var myXMLText =
    "<GovTalkMessage xmlns='http://www.govtalk.gov.uk/schemas/govtalk/govtalkheader' 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/schemas/govtalk/govtalkheader http://xmlgw.companieshouse.gov.uk/v1-0/schema/Egov_ch.xsd'>" +
      "<EnvelopeVersion>1.0</EnvelopeVersion>" +
        "<Header>" +
          "<MessageDetails>" +
            "<Class>NameSearch</Class>" +
            "<Qualifier>request</Qualifier>" +
            "<TransactionID>1</TransactionID>" +
            "<GatewayTest></GatewayTest>" +
          "</MessageDetails>" +
          "<SenderDetails>" +
            "<IDAuthentication>" +
              "<SenderID>XMLGatewayTestUserID</SenderID>" +
              "<Authentication>" +
                "<Method>CHMD5</Method>" +
                "<Value>" + encryptedPassword + "</Value>" +
              "</Authentication>" +
            "</IDAuthentication>" +
            "<EmailAddress/>" +
          "</SenderDetails>" +
        "</Header>" +
        "<GovTalkDetails>" +
          "<Keys/>" +
        "</GovTalkDetails>" +
        "<Body>" +
          "<NameSearchRequest xmlns='http://xmlalpha.companieshouse.gov.uk/v1-0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://xmlalpha.companieshouse.gov.uk/v1-0/schema/NameSearch.xsd'>" +
            "<CompanyName>millennium stadium plc</CompanyName>" +
            "<DataSet>LIVE</DataSet>" +
            "<SameAs>0</SameAs>" +
            "<SearchRows>20</SearchRows>" +
          "</NameSearchRequest>" +
        "</Body>" +
      "</GovTalkMessage>";

Do we need to change the addresses for testing?

Thanks
Rick

Rick,

You appear to be testing “name search” which is a feature of our XML GATEWAY product (basically a data and image retrieval service).

The information I sent to you via the forum this morning relates to our XML FILING service, which requires completely different testing criteria and credentials.

Can you please confirm what you are actually trying to develop at the moment, and advise what test credentials we have given you to date.?

SDN

Hi Simon,

Thanks for your reply. Actually our requirements are that we need to both be able to incorporate companies on behalf of our clients and then also conduct some filing actions (change of directors, allotment/transfer of shares, etc). Perhaps you could help to elaborate on which gateways should be used for the different types of tasks we need to undertake?

Thanks
Rick

I have now checked and see that you have opened a test account for XML INPUT (software filing) - if I may, I would suggest you concentrate on developing this first before moving onto the name search facility (which is a function of XML OUTPUT).

SDN

Hi Simon,

Thanks for the confirmation. If I understand things correctly then Software Filing (XML Input) should encompass both incorporations and subsequent filings? The only feature that we wanted to put into our platform before the incorporation was for a way for our clients to check the availability of a name for a new company. But I have already managed to connect with the new JSON API for name search so I assume that we can use that for now?

Thanks
Rick

Yes Rick, XML (Input) emcompasses incorporations and the vast majority of statutory forms that are required to be filed once a company is formed.

If you have managed to establish a connection with the JSON API, this will indeed be sufficient for name search purposes.

SDN

Thanks for that Simon… So now my next task is to get a working incorporation tested. Can you provide an example of a simple incorporation that I can start from. Specifically if there are any particular XML gateway URLs/authentication codes/etc that I need then please do let me know.

Thanks again
Rick

Rick,

You were given a relevant presenter ID and authentication value when your test account was set up.

As the current incorporation schema will be retired on 29th June, I would recommend you develop the replacement versions - the current development schema and examples are as follows:-
http://xmlalpha.companieshouse.gov.uk/v1-0/schema/forms/CompanyIncorporation-v3-0-alpha4.xsd
http://xmlalpha.companieshouse.gov.uk/examples/IncorporationWithPSCAndRegisters.xml
http://xmlalpha.companieshouse.gov.uk/examples/IncorporationWithPSCCompanyStatement.xml

SDN

Simon,

I tried to submit a copy of the example incorporation via a POST request from our application but the response I got back seemed to indicate a failed attempt. Also I couldn’t see in example links where the presenter ID and authentication values would be added to the XML Request message? Here is the response I received when posting to the URL “http://xmlalpha.companieshouse.gov.uk/v1-0/schema/forms/FormSubmission-v2-9.xsd

<xs:schema xmlns="http://xmlgw.companieshouse.gov.uk/Header" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bs="http://xmlgw.companieshouse.gov.uk/Header" targetNamespace="http://xmlgw.companieshouse.gov.uk/Header" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.9" id="FormSubmission">
<xs:element name="FormSubmission">
<xs:complexType>
<xs:sequence>
<xs:element name="FormHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyNumber" type="xs:integer" minOccurs="0">
<xs:annotation>
<xs:documentation>The Company number, digits only</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CompanyType" minOccurs="0">
<xs:annotation>
<xs:documentation>
The country of incorporation and company type classification. If the filing is for a Northern Ireland LLP, you must submit 'NC' in the CompanyType element
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="EW"/>
<xs:enumeration value="SC"/>
<xs:enumeration value="NI"/>
<xs:enumeration value="R"/>
<xs:enumeration value="OC"/>
<xs:enumeration value="SO"/>
<xs:enumeration value="NC"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CompanyName">
<xs:annotation>
<xs:documentation>
The content of the CompanyName element will be converted to upper case on receipt at Companies House for Incorporation submissions
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="nonEmptyNameAddressString">
<xs:minLength value="3"/>
<xs:maxLength value="160"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CompanyAuthenticationCode" minOccurs="0">
<xs:annotation>
<xs:documentation>
Authentication Code of the Company for which the submission relates
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="6"/>
<xs:maxLength value="8"/>
<xs:whiteSpace value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PackageReference" type="xs:string">
<xs:annotation>
<xs:documentation>
Software Package reference allocated to Software Vendor by Companies House
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Language" minOccurs="0">
<xs:annotation>
<xs:documentation>
The language used in the submission. Currently only EN (English) and CY (Welsh) are supported
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="EN"/>
<xs:enumeration value="CY"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="FormIdentifier" type="xs:string">
<xs:annotation>
<xs:documentation>
Identifier of the attached form, such as 'OfficerAppointment'
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SubmissionNumber">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="6"/>
<xs:whiteSpace value="collapse"/>
<xs:minLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:sequence minOccurs="0">
<xs:element name="ContactName" type="nameAddressString"/>
<xs:element name="ContactNumber">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="25"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:element name="CustomerReference" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="25"/>
<xs:minLength value="0"/>
<xs:pattern value="[A-Za-z0-9]*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DateSigned" type="xs:date"/>
<xs:element name="Form">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" minOccurs="0">
<xs:annotation>
<xs:documentation>
Contains the XML document of the form to be submitted. E.g. OfficerAppointment or AnnualReturn
</xs:documentation>
</xs:annotation>
</xs:any>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AdditionalInformation" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any">
<xs:annotation>
<xs:documentation>
Contains the XML document of the additional information e.g. Corporate Tax Information for an Incorporation
</xs:documentation>
</xs:annotation>
</xs:any>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Document" minOccurs="0" maxOccurs="3">
<xs:annotation>
<xs:documentation>May contain an optional document attachment</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Data">
<xs:simpleType>
<xs:restriction base="xs:base64Binary">
<xs:maxLength value="15000000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Date" type="xs:date" minOccurs="0"/>
<xs:element name="Filename" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ContentType">
<xs:annotation>
<xs:documentation>Mime content type of supplied data</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="application/vnd.hp-pcl"/>
<xs:enumeration value="application/xml"/>
<xs:enumeration value="application/pdf"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Category">
<xs:annotation>
<xs:documentation>Identify the category of document supplied</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="MEMARTS"/>
<xs:enumeration value="SUPPNAMEAUTH"/>
<xs:enumeration value="ACCOUNTS"/>
<xs:enumeration value="SUPPEXISTNAME"/>
<xs:enumeration value="DEED"/>
<xs:enumeration value="DEEDSUPP"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="nameAddressString">
<xs:restriction base="xs:string">
<xs:pattern value="[-,.:; 0-9A-Z&@$£¥€'"«»‘’“”?!/\\()\[\]{}<>*=#%+ÀÁÂÃÄÅĀĂĄÆǼÇĆĈĊČÞĎÐÈÉÊËĒĔĖĘĚĜĞĠĢĤĦÌÍÎÏĨĪĬĮİĴĶĹĻĽĿŁÑŃŅŇŊÒÓÔÕÖØŌŎŐǾŒŔŖŘŚŜŞŠŢŤŦÙÚÛÜŨŪŬŮŰŲŴẀẂẄỲÝŶŸŹŻŽa-zÀÖØſƒǺǿẀẅỲỳ]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nonEmptyNameAddressString">
<xs:restriction base="nameAddressString">
<xs:minLength value="1"/>
<xs:pattern value="\S+.*"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Can you advise? Hopefully we’re getting somewhere (soon)!

Thanks
Rick

Hmmm… after reading a few other threads I changed the URL we are sending the request to : “http://xmlalpha.companieshouse.gov.uk/v1-0/xmlgw/Gateway

Now I get a ‘Failed to parse XML’ result… not sure if that is any better or not?

Hope you can help!

Rick

Rick, This is an example CompanyIncorporation submission.

<?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/v2-1/schema/Egov_ch-v2-0.xsd">
	<EnvelopeVersion>1.0</EnvelopeVersion>
	<Header>
		<MessageDetails>
			<Class>CompanyIncorporation</Class>
			<Qualifier>request</Qualifier>
			<TransactionID>Your Transaction ID</TransactionID>
			<GatewayTest>Your GatewayTest</GatewayTest>
		</MessageDetails>
		<SenderDetails>
			<IDAuthentication>
				<SenderID>PresenterID as MD5 hash</SenderID>
				<Authentication>
					<Method>clear</Method>
					<Value>Password as MD5 hash</Value>
				</Authentication>
			</IDAuthentication>
		</SenderDetails>
	</Header>
	<GovTalkDetails>
		<Keys/>
	</GovTalkDetails>
	<Body>
		<FormSubmission xmlns="http://xmlgw.companieshouse.gov.uk/Header" xmlns:bs="http://xmlgw.companieshouse.gov.uk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlgw.companieshouse.gov.uk/Header http://xmlgw.companieshouse.gov.uk/v2-1/schema/forms/FormSubmission-v2-9.xsd">
			<FormHeader>
				<CompanyNumber>00000000</CompanyNumber>
				<CompanyName></CompanyName>
				<PackageReference></PackageReference>
				<FormIdentifier></FormIdentifier>
				<SubmissionNumber></SubmissionNumber>
				<ContactName></ContactName>
				<ContactNumber></ContactNumber>
			</FormHeader>
			<DateSigned>2016-05-23</DateSigned>
			<Form>
				<CompanyIncorporation xmlns="http://xmlgw.companieshouse.gov.uk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlgw.companieshouse.gov.uk http://xmlalpha.companieshouse.gov.uk/v1-0/schema/forms/CompanyIncorporation-v3-0-alpha4.xsd">
					<CompanyType></CompanyType>
					<CountryOfIncorporation></CountryOfIncorporation>
					<RegisteredOfficeAddress>
						<Premise></Premise>
						<PostTown></PostTown>
						<Country></Country>
						<Postcode></Postcode>
					</RegisteredOfficeAddress>
					<Articles></Articles>
					<RestrictedArticles>false</RestrictedArticles>
					<Appointment>
						<ConsentToAct>true</ConsentToAct>
						<Director>
							<Person>
								<Forename></Forename>
								<Surname></Surname>
								<ServiceAddress>
									<SameAsRegisteredOffice></SameAsRegisteredOffice>
								</ServiceAddress>
								<DOB></DOB>
								<Nationality></Nationality>
								<Occupation></Occupation>
								<CountryOfResidence></CountryOfResidence>
								<ResidentialAddress>
									<Address>
										<Premise></Premise>
										<PostTown></PostTown>
										<Country></Country>
										<Postcode></Postcode>
									</Address>
								</ResidentialAddress>
							</Person>
						</Director>
					</Appointment>
					<Appointment>
						<ConsentToAct>true</ConsentToAct>
						<Director>
							<Person>
								<Forename></Forename>
								<Surname></Surname>
								<ServiceAddress>
									<SameAsRegisteredOffice></SameAsRegisteredOffice>
								</ServiceAddress>
								<DOB></DOB>
								<Nationality></Nationality>
								<Occupation></Occupation>
								<CountryOfResidence></CountryOfResidence>
								<ResidentialAddress>
									<Address>
										<Premise></Premise>
										<PostTown></PostTown>
										<Country></Country>
										<Postcode></Postcode>
									</Address>
								</ResidentialAddress>
							</Person>
						</Director>
					</Appointment>
					<PSCs>
						<PSC>
							<PSCNotification>
								<Individual>
									<Forename></Forename>
									<Surname></Surname>
									<ServiceAddress>
										<Address>
											<Premise></Premise>
											<Street></Street>
											<PostTown></PostTown>
											<Country></Country>
											<Postcode></Postcode>
										</Address>
									</ServiceAddress>
									<DOB></DOB>
									<Nationality></Nationality>
									<CountryOfResidence></CountryOfResidence>
									<ResidentialAddress>
										<Address>
											<Premise></Premise>
											<Street></Street>
											<PostTown></PostTown>
											<Country></Country>
											<Postcode></Postcode>
										</Address>
									</ResidentialAddress>
									<ConsentStatement>true</ConsentStatement>
								</Individual>
								<NatureOfControls>
									<NatureOfControl>OWNERSHIPOFSHARES_25TO50PERCENT</NatureOfControl>
									<NatureOfControl>VOTINGRIGHTS_25TO50PERCENT</NatureOfControl>
									<NatureOfControl>RIGHTTOAPPOINTANDREMOVEDIRECTORS</NatureOfControl>
									<NatureOfControl>SIGINFLUENCECONTROL</NatureOfControl>
								</NatureOfControls>
							</PSCNotification>
						</PSC>
						<PSC>
							<PSCNotification>
								<Corporate>
									<CorporateName></CorporateName>
									<Address>
										<Premise></Premise>
										<Street></Street>
										<PostTown></PostTown>
										<Country></Country>
										<Postcode></Postcode>
									</Address>
									<PSCCompanyIdentification>
										<PSCPlaceRegistered></PSCPlaceRegistered>
										<PSCRegistrationNumber></PSCRegistrationNumber>
										<LawGoverned></LawGoverned>
										<LegalForm></LegalForm>
										<CountryOrState></CountryOrState>
									</PSCCompanyIdentification>
								</Corporate>
								<NatureOfControls>
									<NatureOfControl>OWNERSHIPOFSHARES_25TO50PERCENT_AS_FIRM</NatureOfControl>
									<NatureOfControl>VOTINGRIGHTS_25TO50PERCENT_AS_FIRM</NatureOfControl>
									<NatureOfControl>RIGHTTOAPPOINTANDREMOVEDIRECTORS_AS_FIRM</NatureOfControl>
									<NatureOfControl>SIGINFLUENCECONTROL_AS_FIRM</NatureOfControl>
								</NatureOfControls>
							</PSCNotification>
						</PSC>
						<PSC>
							<PSCNotification>
								<LegalPerson>
									<LegalPersonName></LegalPersonName>
									<Address>
										<Premise></Premise>
										<Street></Street>
										<PostTown></PostTown>
										<OtherForeignCountry></OtherForeignCountry>
										<Postcode></Postcode>
									</Address>
									<LegalPersonIdentification>
										<LawGoverned></LawGoverned>
										<LegalForm></LegalForm>
									</LegalPersonIdentification>
								</LegalPerson>
								<NatureOfControls>
									<NatureOfControl>OWNERSHIPOFSHARES_25TO50PERCENT_AS_TRUST</NatureOfControl>
									<NatureOfControl>VOTINGRIGHTS_25TO50PERCENT_AS_TRUST</NatureOfControl>
									<NatureOfControl>RIGHTTOAPPOINTANDREMOVEDIRECTORS_AS_TRUST</NatureOfControl>
									<NatureOfControl>SIGINFLUENCECONTROL_AS_TRUST</NatureOfControl>
								</NatureOfControls>
							</PSCNotification>
						</PSC>
					</PSCs>
					<Guarantors>
						<Person>
							<Forename></Forename>
							<Surname></Surname>
						</Person>
						<Address>
							<Premise></Premise>
							<PostTown></PostTown>
							<Country></Country>
							<Postcode></Postcode>
						</Address>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<AmountGuaranteed></AmountGuaranteed>
					</Guarantors>
					<Guarantors>
						<Person>
							<Forename></Forename>
							<Surname></Surname>
						</Person>
						<Address>
							<Premise></Premise>
							<PostTown></PostTown>
							<Country></Country>
							<Postcode></Postcode>
						</Address>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<Authentication>
							<PersonalAttribute></PersonalAttribute>
							<PersonalData></PersonalData>
						</Authentication>
						<AmountGuaranteed></AmountGuaranteed>
					</Guarantors>
					<Authoriser>
						<Agent>
							<Corporate>
								<Forename></Forename>
								<Surname></Surname>
								<CorporateName></CorporateName>
							</Corporate>
							<Authentication>
								<PersonalAttribute></PersonalAttribute>
								<PersonalData></PersonalData>
							</Authentication>
							<Authentication>
								<PersonalAttribute></PersonalAttribute>
								<PersonalData></PersonalData>
							</Authentication>
							<Authentication>
								<PersonalAttribute></PersonalAttribute>
								<PersonalData></PersonalData>
							</Authentication>
							<Address>
								<Premise></Premise>
								<Street></Street>
								<PostTown></PostTown>
								<Country></Country>
								<Postcode></Postcode>
							</Address>
						</Agent>
					</Authoriser>
					<SameDay>false</SameDay>
					<SameName>false</SameName>
					<NameAuthorisation>false</NameAuthorisation>
					<RejectReference>00000000</RejectReference>
					<SICCodes>
						<SICCode>12345</SICCode>
						<SICCode>23456</SICCode>
						<SICCode>34567</SICCode>
						<SICCode>45678</SICCode>
					</SICCodes>
				</CompanyIncorporation>
			</Form>
			<Document>
				<Data>Document PDF Base64 encoded</Data>
				<Date>2016-05-23</Date>
				<Filename>filename.mem</Filename>
				<ContentType>application/vnd.hp-pcl</ContentType>
				<Category>MEMARTS</Category>
			</Document>
		</FormSubmission>
	</Body>
</GovTalkMessage>

Thanks @steveb, I think you helped! Looks like I wasn’t creating the header part correctly. Now that I have fixed that I think I am getting much further and currently my error is

XML failed schema validation: Invalid XML: Datatype error: Type:InvalidDatatypeValueException, Message:Value ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’ is not encoded in Base64 . line 1 column 6758

I was just faking my data file for testing with the following XML:

"<Document>" +
    "<Data>" +
      "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
    "</Data>" +
    "<Filename>1.mem</Filename>" +
    "<ContentType>application/vnd.hp-pcl</ContentType>" +
    "<Category>MEMARTS</Category>" +
  "</Document>" 

But I think I actually need to send a ‘Base64’ encoded file somehow… now over to Stack Overflow again :wink:

Any help appreciated again!

Cheers
Rick

Rick.

I assume you posted this before i went back to you privately confirming your exact presenter ID / authentication MD5# values?

The Base 64 coding is only required for the various attachments (i.e. Memorandum of Association / Articles of Association / evidence to support “sensitive” and “same as” name applications).

SDN

Yes, thanks Simon! I got the Base64 file working just with an online converter on a small text test file for now…

Thanks for your private message and I’ll get cracking on the submission polling now :smile:

Cheers
Rick