1

Re: Anyone managed to use the web services from Delphi?

Using Delphi 2005, when I import the WSDL into the project, it ignores the types declared in the XSD file so I can't compile.  Has anyone been able to use Delphi against the web services?

John van Breda
Biodiverse IT

2

Re: Anyone managed to use the web services from Delphi?

I have had similar problems using Delphi 2006.

I couldn't get it to work at all supplying the URL of the WSDL file to the importer.

If I download the zip file and unzip the .wsdl and .xsd files locally, then it works on the .wdsl file, but does not seem to honour the "include" or "import" directives to bring in the .xsd files (at least, however I tried to give it the path to these files, they were never included).

So I made a version of the .wsdl file with the contents of the .xsd pasted in (i.e. replace the include or import lines in the wsdl with everything between the <schema> .. </schema> tags in the appropriate xsd file). To achieve this: gateway_metadata.xsd needs importing into gateway_data.xsd and then the modified  gateway_data.xsd and gateway_query.xsd need importing into gateway_soap.wsdl.

The resulting gateway_soap.wsdl imported, and set up most of the classes, but gave errors that:
BoundingBox
Buffer
GridSquare
KnownSite
Point
MultiPartolygon

were not defined, (although BoundingBox, GridSquare and KnownSite are!)

Further investigation shows that other definitions like Distance are also missing.

After about a day and a half mucking around trying to work round these problems or fix it manually, I gave up.


If you look on QualityCentral, there is lots of stuff about this. It seems a common experience that .wsdl files that work fine with other tools, such as Visual Studio, fail to work with Delphi. Basically the Delphi WSDL importer doesn't seem to work reliably on anything beyond trivial cases! Common problems seem to be:

- elements like "name" get renamed to "name_", but "name_" is not subsequently used (happens with "point" in the NBN WSDL)
- "unbounded" elements are not properly treated as arrays
- enumerations don't get properly imported (missing values)
etc., etc.

There are long threads about the eBay and Amazon WSDLs not importing properly. The comment at the end of one of these just about sums it up. "The amount of time spent trying to work round these problems is not worth it. Use another tool!"