Wednesday, October 22, 2008

Coldfusion API WSDL case sensitivity issue

ColdFusion automatically generates the WSDL file from the CFC. Now when a change is made to a CFC or the CF service is restarted, the wsdl file has to be re-generated. The wsdl file is generated when the first call to the CFC is made. Now if the first call that is made is made like /abc.cfc?wsdl, then the wsdl has <wsdl:portType name="abc"> ; but if the first call is made like /ABC.cfc?wsdl, then the wsdl has <wsdl:portType name="ABC">

This causes problems with clients that access the API - resulting in errors for them.

To resolve this issue, we developed an application in C#.Net that would basically call the wsdl file, check for the case of the portName. If portNmae is not same case as what is expected, then the app would restart the CF service, and then call the wsdl with the right case so that CF generates the right case portName in the WSDL.

Its a console app. and and it can be scheduled to run every so often.

Thursday, April 10, 2008

Salesforce INVALID_FIELD error in professional edition

The professional edition of SalesForce has some limitations compared to the Enterprise or Unlimited edition. One of the major issues is in calling the SF API.

I was getting the foll. error:
INVALID_FIELD: Field name provided, <> does not match an External ID for <>

And the reason was that I did not have these fields as a part of my page layout for that custom object.

This is what I received from a SF support rep:
"You will only have access to the field if it is on the page layout."

So I tried to add the custom field to the page layout and it did work.