Hi ,
I am a web developer using php and myadmin.
I am creating a web site to register a company by using compamyhouse xml gatway service.
My problem is that i don’t know how to sumbit user detail to companyhouse so we can get the response back .
I am trying this but did not get any response plz help
This is my code
<?php
$xml = <<<EOF
<GovTalkMessage xsi:schemaLocation=“http://www.govtalk.gov.uk/schemas/govtalk/govtalkheader http://xmlgw.companieshouse.gov.uk/v1-0/schema/Egov_ch.xsd” 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” >
<EnvelopeVersion>1.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Class></Class>
<Qualifier>error</Qualifier>
<TransactionID></TransactionID>
<GatewayTimestamp>2012-01-23T17:52:11-00:00</GatewayTimestamp>
</MessageDetails>
<SenderDetails>
<IDAuthentication>
<SenderID></SenderID>
<Authentication>
<Method>CHMD5</Method>
<Value></Value>
</Authentication>
</IDAuthentication>
</SenderDetails>
</Header>
<GovTalkDetails>
<Keys/>
<GovTalkErrors>
<Error>
<RaisedBy>CH_XML_Gateway</RaisedBy>
<Number>9999</Number>
<Type>fatal</Type>
<Text>No request XML</Text>
<Location></Location>
</Error>
</GovTalkErrors>
</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-5.xsd”>
<FormHeader>
<CompanyName>BETA TEST 1 LLP</CompanyName>
<PackageReference>1828</PackageReference>
<FormIdentifier>CompanyIncorporation</FormIdentifier>
<SubmissionNumber>LLP111</SubmissionNumber>
</FormHeader>
<DateSigned>2010-07-20</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://xmlgw.companieshouse.gov.uk/v2-1/schema/forms/CompanyIncorporation-v2-6.xsd”>
<CompanyType>LLP</CompanyType>
<CountryOfIncorporation>EW</CountryOfIncorporation>
<RegisteredOfficeAddress>
<Premise>1</Premise>
<Street>LEYSHON POOLE STREET</Street>
<PostTown>PONTYPRIDD</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF37 1ND</Postcode>
</RegisteredOfficeAddress>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>HAV</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>FRE</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>BLU</PersonalData>
</Authentication>
<Member>
<DesignatedInd>true</DesignatedInd>
<Corporate>
<Forename>WILLIAM</Forename>
<Surname>DAVIES</Surname>
<CorporateName>TEST NAME</CorporateName>
<Address>
<Premise>6</Premise>
<Street>WOOD VIEW</Street>
<PostTown>CHURCH VILLAGE</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF21 1RW</Postcode>
</Address>
<CompanyIdentification>
<NonEEA>
<LawGoverned>AUSTRIAN</LawGoverned>
<LegalForm>TEST</LegalForm>
</NonEEA>
</CompanyIdentification>
</Corporate>
</Member>
</Appointment>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>HAV</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>FRE</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>BLU</PersonalData>
</Authentication>
<Member>
<DesignatedInd>false</DesignatedInd>
<Person>
<Title>Mr</Title>
<Forename>LEIGH ERIC</Forename>
<Surname>DAVIES</Surname>
<ServiceAddress>
<Address>
<Premise>1</Premise>
<Street>LEYSHON POOLE STREET</Street>
<PostTown>PONTYPRIDD</PostTown>
<Country>GB-WLS</Country>
</Address>
</ServiceAddress>
<DOB>1975-02-01</DOB>
<CountryOfResidence>United Kingdom</CountryOfResidence>
<PreviousNames>
<Surname>HUGHES</Surname>
</PreviousNames>
<ResidentialAddress>
<SameAsServiceAddress>true</SameAsServiceAddress>
</ResidentialAddress>
</Person>
</Member>
</Appointment>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>SWA</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>BIL</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>HAZ</PersonalData>
</Authentication>
<Member>
<DesignatedInd>true</DesignatedInd>
<Corporate>
<Forename>HARRY</Forename>
<Surname>DAVIES</Surname>
<CorporateName>TEST CORPORATE</CorporateName>
<Address>
<Premise>6</Premise>
<Street>TREETOPS VIEW</Street>
<PostTown>CARDIFF</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF58 1RW</Postcode>
</Address>
<CompanyIdentification>
<EEA>
<PlaceRegistered>ukraine</PlaceRegistered>
<RegistrationNumber>568497</RegistrationNumber>
</EEA>
</CompanyIdentification>
</Corporate>
</Member>
</Appointment>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>SWA</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>BIL</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>HAZ</PersonalData>
</Authentication>
<Member>
<DesignatedInd>false</DesignatedInd>
<Person>
<Title>Mr</Title>
<Forename>Peter</Forename>
<OtherForenames>DAVID ELLIS</OtherForenames>
<Surname>Evans</Surname>
<ServiceAddress>
<Address>
<Premise>1</Premise>
<Street>LEYSHON POOLE STREET</Street>
<PostTown>PONTYPRIDD</PostTown>
<Country>GB-WLS</Country>
</Address>
</ServiceAddress>
<DOB>1959-09-29</DOB>
<CountryOfResidence>UNITED KINGDOM</CountryOfResidence>
<ResidentialAddress>
<Address>
<Premise>17</Premise>
<Street>CORDEN DAL</Street>
<PostTown>CARDIFF</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF24 7DH</Postcode>
</Address>
</ResidentialAddress>
</Person>
</Member>
</Appointment>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>SWA</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>BIL</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>HAZ</PersonalData>
</Authentication>
<Member>
<DesignatedInd>true</DesignatedInd>
<Person>
<Title>SIR</Title>
<Forename>james john david</Forename>
<Surname>Evans</Surname>
<ServiceAddress>
<SameAsRegisteredOffice>true</SameAsRegisteredOffice>
</ServiceAddress>
<DOB>1958-09-29</DOB>
<CountryOfResidence>UNITED KINGDOM</CountryOfResidence>
<ResidentialAddress>
<Address>
<Premise>17</Premise>
<Street>CORDEN DAL</Street>
<PostTown>CARDIFF</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF24 7DH</Postcode>
</Address>
</ResidentialAddress>
</Person>
</Member>
</Appointment>
<Appointment>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>SWA</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>BIL</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>HAZ</PersonalData>
</Authentication>
<Member>
<DesignatedInd>true</DesignatedInd>
<Person>
<Title>Mr</Title>
<Forename>JOE</Forename>
<Surname>JONES</Surname>
<ServiceAddress>
<SameAsRegisteredOffice>true</SameAsRegisteredOffice>
</ServiceAddress>
<DOB>1959-09-29</DOB>
<CountryOfResidence>UNITED KINGDOM</CountryOfResidence>
<ResidentialAddress>
<Address>
<Premise>17</Premise>
<Street>CORDEN DAL</Street>
<PostTown>CARDIFF</PostTown>
<Country>GB-WLS</Country>
<Postcode>CF24 7DH</Postcode>
</Address>
</ResidentialAddress>
</Person>
</Member>
</Appointment>
<Authoriser>
<Member>
<Person>
<Forename>JOE</Forename>
<Surname>JONES</Surname>
</Person>
<Authentication>
<PersonalAttribute>BIRTOWN</PersonalAttribute>
<PersonalData>SWA</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>DAD</PersonalAttribute>
<PersonalData>BIL</PersonalData>
</Authentication>
<Authentication>
<PersonalAttribute>EYE</PersonalAttribute>
<PersonalData>HAZ</PersonalData>
</Authentication>
</Member>
</Authoriser>
<SameDay>false</SameDay>
</CompanyIncorporation>
</Form>
</FormSubmission>
</Body>
</GovTalkMessage>
EOF;
$ch = curl_init(); //initiate the curl session
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // tell curl to return data in a variable
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(“Content-Type: text/xml”));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_TIMEOUT, (int)30); // set timeout in seconds
echo $xmlResponse = curl_exec($ch);
curl_close ($ch);
?>