Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Imported WSDL file creates classes with no properties


This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Feb 5, 2018 9:05 PM Last Post By: Adam Hair
Adam Hair

Posts: 18
Registered: 7/26/17
Imported WSDL file creates classes with no properties  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 4, 2018 9:16 PM
Hi,

I am having a problem trying to import a WSDL file using Delphi 10.1 Berlin.

When the file is imported, the majority of the unit appears to be created successfully, but there are a handful of classes that import with no properties. An example of this is:

  ProductLineType = class(TRemotable)
  private
  published
  end;


When I import the same WSDL file into SOAPUI - it comes through as I would expect, with a number of nested properties within. An image of a screenshot of this is available at [http://www.wsdsites.net/tmp/nexdocnoproperties.jpg] . Unfortunately I don't have the same properties available to me in the created Delphi unit.

I am importing the WSDL files locally (not via a URL as they have not made the files available via their website yet - however the WSDL files I am working on are available in a zip at [http://www.wsdsites.net/tmp/nexdocwsdl.zip] .

Can anyone please advise why Delphi would import the classes like this with no properties, or more importantly - what I can do in order to get them to import correctly?

Thanks & Regards

Adam.
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Imported WSDL file creates classes with no properties
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2018 3:19 PM   in response to: Adam Hair in response to: Adam Hair
Adam Hair wrote:
Hi,

I am having a problem trying to import a WSDL file using Delphi 10.1 Berlin.

When the file is imported, the majority of the unit appears to be created successfully, but there are a handful of classes that import with no properties. An example of this is:

  ProductLineType = class(TRemotable)
  private
  published
  end;


When I import the same WSDL file into SOAPUI - it comes through as I would expect, with a number of nested properties within. An image of a screenshot of this is available at [http://www.wsdsites.net/tmp/nexdocnoproperties.jpg] . Unfortunately I don't have the same properties available to me in the created Delphi unit.

I am importing the WSDL files locally (not via a URL as they have not made the files available via their website yet - however the WSDL files I am working on are available in a zip at [http://www.wsdsites.net/tmp/nexdocwsdl.zip] .

Can anyone please advise why Delphi would import the classes like this with no properties, or more importantly - what I can do in order to get them to import correctly?

When I run the wsdl from your zip through the importer, using default settings, for the ProductLineType you refereced above I get (found in RexSubmissionService.wsdl):
Using XE2

ProductLineType = class(TRemotable)
  private
    FlineNumber: Number2Digits;
    FremoveEntry: Boolean;
    FremoveEntry_Specified: boolean;
    FproductDetails: ProductDetails;
    Fcontainers: containers;
    Fcontainers_Specified: boolean;
    Ftreatments: treatments;
    Ftreatments_Specified: boolean;
    FproductionProcesses: productionProcesses;
    FproductionProcesses_Specified: boolean;
    FdurabilityStartDate: TXSDate;
    FdurabilityStartDate_Specified: boolean;
    FdurabilityEndDate: TXSDate;
    FdurabilityEndDate_Specified: boolean;
    FaheccCode: AheccCodeType;
    FaheccCode_Specified: boolean;
    FbatchCode: string;
    FbatchCode_Specified: boolean;
    FadditionalTexts: AdditionalTextsType;
    FadditionalTexts_Specified: boolean;
    FproductSourceCountries: productSourceCountries;
    FproductSourceCountries_Specified: boolean;
    procedure SetremoveEntry(Index: Integer; const ABoolean: Boolean);
    function  removeEntry_Specified(Index: Integer): boolean;
    procedure Setcontainers(Index: Integer; const Acontainers: containers);
    function  containers_Specified(Index: Integer): boolean;
    procedure Settreatments(Index: Integer; const Atreatments: treatments);
    function  treatments_Specified(Index: Integer): boolean;
    procedure SetproductionProcesses(Index: Integer; const AproductionProcesses: productionProcesses);
    function  productionProcesses_Specified(Index: Integer): boolean;
    procedure SetdurabilityStartDate(Index: Integer; const ATXSDate: TXSDate);
    function  durabilityStartDate_Specified(Index: Integer): boolean;
    procedure SetdurabilityEndDate(Index: Integer; const ATXSDate: TXSDate);
    function  durabilityEndDate_Specified(Index: Integer): boolean;
    procedure SetaheccCode(Index: Integer; const AAheccCodeType: AheccCodeType);
    function  aheccCode_Specified(Index: Integer): boolean;
    procedure SetbatchCode(Index: Integer; const Astring: string);
    function  batchCode_Specified(Index: Integer): boolean;
    procedure SetadditionalTexts(Index: Integer; const AAdditionalTextsType: AdditionalTextsType);
    function  additionalTexts_Specified(Index: Integer): boolean;
    procedure SetproductSourceCountries(Index: Integer; const AproductSourceCountries: productSourceCountries);
    function  productSourceCountries_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property lineNumber:             Number2Digits           read FlineNumber write FlineNumber;
    property removeEntry:            Boolean                 Index (IS_OPTN) read FremoveEntry write SetremoveEntry stored removeEntry_Specified;
    property productDetails:         ProductDetails          read FproductDetails write FproductDetails;
    property containers:             containers              Index (IS_OPTN) read Fcontainers write Setcontainers stored containers_Specified;
    property treatments:             treatments              Index (IS_OPTN) read Ftreatments write Settreatments stored treatments_Specified;
    property productionProcesses:    productionProcesses     Index (IS_OPTN) read FproductionProcesses write SetproductionProcesses stored productionProcesses_Specified;
    property durabilityStartDate:    TXSDate                 Index (IS_OPTN) read FdurabilityStartDate write SetdurabilityStartDate stored durabilityStartDate_Specified;
    property durabilityEndDate:      TXSDate                 Index (IS_OPTN) read FdurabilityEndDate write SetdurabilityEndDate stored durabilityEndDate_Specified;
    property aheccCode:              AheccCodeType           Index (IS_OPTN) read FaheccCode write SetaheccCode stored aheccCode_Specified;
    property batchCode:              string                  Index (IS_OPTN) read FbatchCode write SetbatchCode stored batchCode_Specified;
    property additionalTexts:        AdditionalTextsType     Index (IS_OPTN) read FadditionalTexts write SetadditionalTexts stored additionalTexts_Specified;
    property productSourceCountries: productSourceCountries  Index (IS_OPTN) read FproductSourceCountries write SetproductSourceCountries stored productSourceCountries_Specified;
  end;
 
Adam Hair

Posts: 18
Registered: 7/26/17
Re: Imported WSDL file creates classes with no properties  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2018 7:53 PM   in response to: Dan Barclay in response to: Dan Barclay
Hi Dan,

Interesting. I can confirm what you've found - it imports OK in XE2's IDE.

It looks like I'll need to drop back to an earlier version of Delphi to do the work in. Not sure if this is a Bug with more recent IDE's or otherwise...

Best Regards

Adam
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Imported WSDL file creates classes with no properties
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2018 8:03 PM   in response to: Adam Hair in response to: Adam Hair
Adam Hair wrote:
Hi Dan,

Interesting. I can confirm what you've found - it imports OK in XE2's IDE.

It looks like I'll need to drop back to an earlier version of Delphi to do the work in. Not sure if this is a Bug with more recent IDE's or otherwise...

You can probably use the generated units in a later version.

It's pretty disappointing that later versions don't convert the wsdl. Those kinds of compatibility glitches are way up on the list (with price) that keeps me from upgrading regularly like I used to.

Dan

Edited by: Dan Barclay on Feb 5, 2018 10:04 PM
Adam Hair

Posts: 18
Registered: 7/26/17
Re: Imported WSDL file creates classes with no properties  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2018 9:05 PM   in response to: Dan Barclay in response to: Dan Barclay
Hi Dan,

Dan Barclay wrote:

You can probably use the generated units in a later version.

It's pretty disappointing that later versions don't convert the wsdl. Those kinds of compatibility glitches are way up on the list (with price) that keeps me from upgrading regularly like I used to.

Dan

Thanks. yes - I'll have to use the earlier version of Delphi to convert the WSDL files.

Unfortunately like you - I'm hesitant to update these days. I don't like updating often anymore either because I seem to find more bugs in newer releases. (And then in order to get those bugs fixed I need to upgrade again, which fixes that bug, but introduces another - a never ending cycle). I was under the impression that Embarcadero were going to actually look at fixing up bugs in existing versions of Delphi (part of the reason they justified subscriptions IIRC) but that doesn't seem to be the case.

At least this time I have a workaround to the issue. Thanks for your help once again!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02