0

I am consuming a WSDL and when I try to execute one of the methods i am getting the error

.. raised exception class EPropertyConvertError with message 'Invalid property element: System'

Any ideas what causes this?

Here is the code I am running (cEPS_* are constants defined earlier in the code):

procedure TForm1.Button1Click(Sender: TObject);
var
  Headers : ISOAPHeaders;
  aResult: c_ExpressPSAPI.Response;
begin
  try
    FEPS_SoapService := c_ExpressPSAPI.GetExpressSoap();
    FEPS_Headers := (FEPS_SoapService as ISOAPHeaders);

    FEPS_Application := c_ExpressPSAPI.Application.Create();
    FEPS_Application.ApplicationID := cEPS_ApplicationID;
    FEPS_Application.ApplicationName := cEPS_ApplicationName;
    FEPS_Credentials := c_ExpressPSAPI.Credentials.Create();
    FEPS_Credentials.AccountID := cEPS_AccountID;
    FEPS_Credentials.AccountToken := cEPS_AccountToken;
    FEPS_Credentials.AcceptorID := cEPS_AcceptorID;
    FEPS_Credentials.NewAccountToken := '';


    aResult := c_ExpressPSAPI.Response.Create;
    aResult := FEPS_SoapService.HealthCheck(FEPS_Credentials, FEPS_Application);

  except
    on E : ERemotableException do
      ShowMessage(E.ClassName + ' error raised, with message : ' + E.FaultDetail + ' :: '
                    + E.Message);

  end;

end;

And here is the WSDL code:

  ExpressSoap = interface(IInvokable)
  ['{83D77575-DBDE-3A05-D048-60B2F6BCDFE6}']
    function  HealthCheck(const credentials: Credentials; const application: Application): Response; stdcall;
BrianKE
  • 4,035
  • 13
  • 65
  • 115
  • 1
    Do you have any reason to believe that the reason for the exception isn't exactly what it says — namely, a property element named System? Look at the data sent over the wire; is it correct? – Rob Kennedy Apr 15 '13 at 18:32
  • 1
    You showed `function HealthCheck`, but your code uses `FEPS_SoapService.TimeCheck`. Is there supposed to be a correlation between the two somehow? – Ken White Apr 15 '13 at 21:44
  • TimeCheck was a mistype, I have corrected the post. – BrianKE Apr 16 '13 at 13:47
  • Turns out it was the API redefining 'System' which is a reserved word in Delphi. – BrianKE Apr 16 '13 at 17:52

0 Answers0