
Sample SOAP Request Message - Create a Custom Field
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="http://soap.sforce.com/2006/04/metadata">
<ns1:sessionId>3e8700Dx00000007S3idfjhteyi!OU9bZp_SLD4NPI4VuaUlMq6ww_e6Ta52FxRp3Beu9tAPeodWKW_bDgWUGl_L8KaM9e451WY4HwutyhfsgetyxF7pqU6iDUQTWGJBoRRjKJogCW</ns1:sessionId>
</ns1:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<create xmlns="http://soap.sforce.com/2006/04/metadata">
<metadata xsi:type="ns2:CustomField" xmlns:ns2="http://soap.sforce.com/2006/04/metadata">
<fullName>sampleco__c.samplecf__c</fullName>
<label>samplecf</label>
<length>100</length>
<type>Text</type>
</metadata>
</create>
</soapenv:Body>
</soapenv:Envelope>
Sample SOAP Response Message
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata">
<soapenv:Body>
<createResponse>
<result>
<done>false</done>
<id>04sx00000000Do4AAE</id>
<secondsToWait>2</secondsToWait>
<state>InProgress</state>
</result>
</createResponse>
</soapenv:Body>
</soapenv:Envelope>