• FernandoK
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Greetings team,

 

Has anyone developed any integration using D2010 with HTTPRIO ?

 

I'm stuck on retrieving data, I'm getting kindda uninitialized random data such as #$E#0#0#1... in an Opportunity.Id, for instance.

 

The login/logout stuff is fine. I guess my WSDL Importer is broken somewhere. Anyone with a working sample or at least a working enterprise.pas wsdl-generated-unit ???

 

Thank you,

 

Fernando

This is an FYI.  After 2 days of much pounding and gnashing of teeth I finally managed to get the Enterprise WSDL to work with D7.  There are two problems.  The first problem, and by far easiest to figure out, occurred during the initial WSDL import.  Make sure you UNCHECK "Do not emit unused types" in the Other Options section.  If you don't do this then you won't get the object declarations for Accounts, Contacts, etc.

The second, and by far most ludicrous, issue is the declaration for the QueryResult object.  It is just flat wrong.  Below is the correct declaration.  Note that the additional constructor, two functions, two properties, and change of datatype for the Frecords field.  Copy the code for them straight from the retrieveResponse object declaration.

  QueryResult = class(TRemotable)
  private
    Fdone: Boolean;
    FqueryLocator: QueryLocator;
    Frecords: sObjects;
    Fsize: Integer;
  public
    constructor Create; override;
    destructor Destroy; override;
    function   GetsObjectArray(Index: Integer): sObject;
    function   GetsObjectArrayLength: Integer;
    property   sObjectArray[Index: Integer]: sObject read GetsObjectArray; default;
    property   Len: Integer read GetsObjectArrayLength;
  published
    property done: Boolean read Fdone write Fdone;
    property queryLocator: QueryLocator read FqueryLocator write FqueryLocator;
    property records: sObjects read Frecords write Frecords;
    property size: Integer read Fsize write Fsize;
  end;

If you need any help let me know,

Chris Lively
http://www.livelyconsulting.com