function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alex DrewAlex Drew 

Lead Creation through API and Java

Hi all
I have been through a program of work with various API integrations to SF with some websites. These sites have all used .Net and while a couple of teething problems, all good so far and works wonders.
Now in the process of working with another site that use Java (Apache Tomcat). They can pass through the OAuth with no probelms at all but when they post the Lead they receive the error "Bad Request". From my limited exposure, that is an issue with the package they are sending (please correct me if wrong here) and even though the same data passed with using cURL works fine.
While I am familiar from a SF set up side, my knowledge of the web server side is very very limited. Any advice or something obvious I might have missed would be great!

Here is what I have on the post packet not working (if if adds anything)?

EU;"P(6P+POST /services/data/v30.0/sobjects/Lead/ HTTP/1.1
Content-Type: application/json; charset=UTF-8
Content-Length: 141
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.7.0_80)
 
Thanks
Alex