Fixing metadata.wsdl
July 05, 2016If you use the Force.com Web Service Connector to call Salesforce's metadata API, you may receive an error like the following when attempting to describe an sObject containing a geolocation field:
unable to find end tag at: START_TAG seen ...</fullName><displayLocationInDecimal>...
This is caused by metadata.wsdl containing an incomplete description of the metadata API. Specifically, it is missing the Location
value for FieldType
, and the displayLocationInDecimal
field on CustomField
. Luckily, this is easy to fix.
1. Add the following line to FieldType:
<xsd:enumeration value="Location"/>
2. Add the following line to CustomField, under displayFormat:
<xsd:element name="displayLocationInDecimal" minOccurs="0" type="xsd:boolean"/>
Then just run the corrected metadata.wsdl back through WSC to generate a new JAR, and you should be good to go!
Cheers,
Jeff
Recent Posts
Implementing Search on a Static Site August 04, 2019
Keeping Water Out of a Boat July 07, 2017
Fixing metadata.wsdl July 05, 2016
Salesforce: Globals and Breaking Changes, Part 2 May 10, 2016
Salesforce: Globals and Breaking Changes, Part 1 April 27, 2016
Tags
Salesforce (3)
JavaScript (1)
Unity3D (1)
Welcome (1)