• MattReynolds
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
***** I'm not sure how to adjust the formatting so this post isn't garbled, please comment with help? *****

I've been trying to create a lead, and figured starting with the sample code was a good idea. As such, I copied the lead creation and login code from the Samples object and strung them together. When I got the above error, I figured I was doing something wrong, so I modified the samples slightly to force creation of a sample user to be used when converting a lead. Here's the code.

Samples::getUnconvertedLead:
QueryResult qr = null;

//if ( qr.getSize() == 0 ) { // No leads where found that have not been

// converted, so....
// we will create a lead and then run the query again
System.out.println( "No unconverted leads found, will create one for you..." );
createLeadSample();
qr = binding.query( "Select Id, FirstName, LastName from Lead where ConvertedDate = Null" );
// }

I then use the samples, entry 19 (convert lead), and I get the following error :
6315 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Enter: HTTPSender::invoke
6388 [main] DEBUG org.apache.axis.transport.http.HTTPSender - XML sent:
6388 [main] DEBUG org.apache.axis.transport.http.HTTPSender - ---------------------------------------------------
6392 [main] DEBUG org.apache.axis.transport.http.HTTPSender - POST /services/Soap/c/6.0 HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: na1-api.salesforce.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 668

9TmIvTqotGCN_c.GekBT1DE0RYoHessVxfIQUK.vzwUz2lK0tHP_nOJgFrqHAnK.l2E6Thcgy0imJXvtVPjFMhhD2wYHcrlK4SNdGN37zi4=
6446 [main] DEBUG org.apache.axis.transport.http.HTTPSender - HTTP/1.0 500 Internal Server Error
6449 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Server sfdc
6450 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Cache-Control private
6451 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Content-Type text/xml; charset=utf-8
6452 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Date Fri, 28 Oct 2005 01:57:06 GMT
6454 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
no Content-Length
6455 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
XML received:
6455 [main] DEBUG org.apache.axis.transport.http.HTTPSender - -----------------------------------------------
6657 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
soapenv:Server
common.exception.ApiException: Must send a concrete entity type.


INVALID_TYPE
Must send a concrete entity type.
-1
-1



6658 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Exit: HTTPDispatchHandler::invoke

Failed to create lead succesfully, error message was:
null

***

This doesn't seem to be the desired behavior, so I figured I'd ask what's wrong with the samples that's causing this.
***** I'm not sure how to adjust the formatting so this post isn't garbled, please comment with help? *****

I've been trying to create a lead, and figured starting with the sample code was a good idea. As such, I copied the lead creation and login code from the Samples object and strung them together. When I got the above error, I figured I was doing something wrong, so I modified the samples slightly to force creation of a sample user to be used when converting a lead. Here's the code.

Samples::getUnconvertedLead:
QueryResult qr = null;

//if ( qr.getSize() == 0 ) { // No leads where found that have not been

// converted, so....
// we will create a lead and then run the query again
System.out.println( "No unconverted leads found, will create one for you..." );
createLeadSample();
qr = binding.query( "Select Id, FirstName, LastName from Lead where ConvertedDate = Null" );
// }

I then use the samples, entry 19 (convert lead), and I get the following error :
6315 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Enter: HTTPSender::invoke
6388 [main] DEBUG org.apache.axis.transport.http.HTTPSender - XML sent:
6388 [main] DEBUG org.apache.axis.transport.http.HTTPSender - ---------------------------------------------------
6392 [main] DEBUG org.apache.axis.transport.http.HTTPSender - POST /services/Soap/c/6.0 HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: na1-api.salesforce.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 668

9TmIvTqotGCN_c.GekBT1DE0RYoHessVxfIQUK.vzwUz2lK0tHP_nOJgFrqHAnK.l2E6Thcgy0imJXvtVPjFMhhD2wYHcrlK4SNdGN37zi4=
6446 [main] DEBUG org.apache.axis.transport.http.HTTPSender - HTTP/1.0 500 Internal Server Error
6449 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Server sfdc
6450 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Cache-Control private
6451 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Content-Type text/xml; charset=utf-8
6452 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Date Fri, 28 Oct 2005 01:57:06 GMT
6454 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
no Content-Length
6455 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
XML received:
6455 [main] DEBUG org.apache.axis.transport.http.HTTPSender - -----------------------------------------------
6657 [main] DEBUG org.apache.axis.transport.http.HTTPSender -
soapenv:Server
common.exception.ApiException: Must send a concrete entity type.


INVALID_TYPE
Must send a concrete entity type.
-1
-1



6658 [main] DEBUG org.apache.axis.transport.http.HTTPSender - Exit: HTTPDispatchHandler::invoke

Failed to create lead succesfully, error message was:
null

***

This doesn't seem to be the desired behavior, so I figured I'd ask what's wrong with the samples that's causing this.