DELPHI: WSDL Import Error

1.2k Views Asked by At

Using Delphi 2005, I am importing a WSDL from here: https://certtransaction.elementexpress.com/express.asmx?wsdl

When I import this WSDL, one of the types is 'TransactionSetup' and it is not importing correctly. According to the documentation 'TransactionSetup' should have the following:

<s:complexType name="TransactionSetup">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupAccountID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupAcceptorID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationVersion" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="TransactionSetupMethod" type="tns:TransactionSetupMethod"/>
<s:element minOccurs="1" maxOccurs="1" name="Device" type="tns:Device"/>
<s:element minOccurs="1" maxOccurs="1" name="Embedded" type="tns:BooleanType"/>
<s:element minOccurs="1" maxOccurs="1" name="CVVRequired" type="tns:BooleanType"/>
<s:element minOccurs="1" maxOccurs="1" name="AutoReturn" type="tns:BooleanType"/>
<s:element minOccurs="0" maxOccurs="1" name="CompanyName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="LogoURL" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Tagline" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WelcomeMessage" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ReturnURL" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ReturnURLTitle" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="OrderDetails" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ProcessTransactionTitle" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ValidationCode" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="DeviceInputCode" type="tns:DeviceInputCode"/>
</s:sequence>
</s:complexType>

what I get is:

  // ************************************************************************ //
  // Namespace : https://transaction.elementexpress.com
  // ************************************************************************ //
  TransactionSetup = class(TRemotable)
  private
    Fcredentials: Credentials;
    Fapplication: Application;
    Fterminal: Terminal;
    Ftransaction: Transaction;
    FtransactionSetup: TransactionSetup;
    Faddress: Address;
    FpaymentAccount: PaymentAccount;
    FextendedParameters: ArrayOfExtendedParameters;
  public
    destructor Destroy; override;
  published
    property credentials: Credentials read Fcredentials write Fcredentials;
    property application: Application read Fapplication write Fapplication;
    property terminal: Terminal read Fterminal write Fterminal;
    property transaction: Transaction read Ftransaction write Ftransaction;
    property transactionSetup: TransactionSetup read FtransactionSetup write FtransactionSetup;
    property address: Address read Faddress write Faddress;
    property paymentAccount: PaymentAccount read FpaymentAccount write FpaymentAccount;
    property extendedParameters: ArrayOfExtendedParameters read FextendedParameters write FextendedParameters;
  end;

One thing I have found, there is a method AND a type both named 'TransactionSetup' and it appears that the importer is somehow capturing the parameters of the method as the type parameters. Here is the imported method:

  ExpressSoap = interface(IInvokable)
  ['{83D77575-DBDE-3A05-D048-60B2F6BCDFE6}']
    procedure TransactionSetup(const credentials: Credentials; const application: Application; const terminal: Terminal; const transaction: Transaction; const transactionSetup: TransactionSetup; const address: Address; const paymentAccount: PaymentAccount; const extendedParameters: ArrayOfExtendedParameters; out response: Response); stdcall;

Is there someway to make the importer get the correct type parameters for 'TransactionSetup' type?

1

There are 1 best solutions below

0
On

I use Delphi 7. I had a similar problem. I downloaded a update importer WSDL and WebService/SOAP runtime. This update is compatible with D2007, D7, D2005 and D2006:
http://cc.embarcadero.com/Item/24535

If you need more details see my blog. In Spanish, sorry: http://www.3engine.net/wp/2010/02/invocando-un-servicio-web-wcf-desde-delphi-7