Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: WSDL Importer


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


Permlink Replies: 4 - Last Post: Oct 30, 2014 1:35 PM Last Post By: David Pedrelli
David Pedrelli

Posts: 13
Registered: 6/28/98
WSDL Importer  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 23, 2014 4:08 PM
Hi,

I am trying to import a WSDL that uses five, different XSDs, with the Delphi WSDL Import Wizard. It tried importing it from the URL, but it did not import any of the datatypes. I downloaded all five files and I changed all of the references to the XSDs using URL, to local files. Once again, it imported the WSDL, but with no datatypes. I used the Google Code project WSDLMerge 1.2. The WSDL import fails, because some complextypes depend upon other complextypes and they are not defined in a proper order. The XSDs do not all use the same namespaces. So, simply reordering the datatypes is not that simple. Is there a third-party, WSDL importer that will work with this? Or is there a tool that will flatten the WSDL and XSDs so that the Delphi import wizard will work?

Thanks,

David
David Pedrelli

Posts: 13
Registered: 6/28/98
Re: WSDL Importer  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 23, 2014 5:14 PM   in response to: David Pedrelli in response to: David Pedrelli
I used the URL with Microsoft's wsdl.exe to import the WSDL for C#. It is running on a development server that has an invalid certificate. I used Fiddler to decrypt HTTPS traffic and it appears to have imported for C# fine.

I did not use Fiddler when I tried to import it into Delphi. I did not get any certificate errors and it imported the methods, just without the datatypes. Also, as I previously noted, I tried importing the WSDL with all, local files.

I assume this is all just due to shortcomings in Embarcadero's WSDL import wizard. I am open to whatever solution will work with Delphi.

David Pedrelli wrote:
Hi,

I am trying to import a WSDL that uses five, different XSDs, with the Delphi WSDL Import Wizard. It tried importing it from the URL, but it did not import any of the datatypes. I downloaded all five files and I changed all of the references to the XSDs using URL, to local files. Once again, it imported the WSDL, but with no datatypes. I used the Google Code project WSDLMerge 1.2. The WSDL import fails, because some complextypes depend upon other complextypes and they are not defined in a proper order. The XSDs do not all use the same namespaces. So, simply reordering the datatypes is not that simple. Is there a third-party, WSDL importer that will work with this? Or is there a tool that will flatten the WSDL and XSDs so that the Delphi import wizard will work?

Thanks,

David
David Pedrelli

Posts: 13
Registered: 6/28/98
Re: WSDL Importer  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2014 5:27 PM   in response to: David Pedrelli in response to: David Pedrelli
To anyone else who may need it, I find a fix for this problem.

This WSDL imported fine with Microsoft's WSDL.exe, but would not import with the Embarcadero importer. I tried half a dozen different tools, including XMLSpy, and none of them worked. I found a free tool, called SchemaLightener, which has a WSDL Flattener function, and it worked. It does appear to work with URLs. However, I downloaded the WSDL and XSDs and I edited all of the files so that they pointed to local XSDs, rather than URLs. After flattening, with this tool, I was able to import this WSDL and 11 other WSDLs with the Embarcadero importer. You can download it from [http://www.xmlhelpline.com/]

David Pedrelli wrote:
Hi,

I am trying to import a WSDL that uses five, different XSDs, with the Delphi WSDL Import Wizard. It tried importing it from the URL, but it did not import any of the datatypes. I downloaded all five files and I changed all of the references to the XSDs using URL, to local files. Once again, it imported the WSDL, but with no datatypes. I used the Google Code project WSDLMerge 1.2. The WSDL import fails, because some complextypes depend upon other complextypes and they are not defined in a proper order. The XSDs do not all use the same namespaces. So, simply reordering the datatypes is not that simple. Is there a third-party, WSDL importer that will work with this? Or is there a tool that will flatten the WSDL and XSDs so that the Delphi import wizard will work?

Thanks,

David
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: WSDL Importer  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2014 10:49 AM   in response to: David Pedrelli in response to: David Pedrelli
David Pedrelli wrote:
To anyone else who may need it, I find a fix for this problem.

David, thanks for posting this. I don't currently have this problem (several services I use imported OK), but it could easily happen. I'm concerned that there have been no responses from EMB on this, and an issue or two I've posted.

Web services is a pretty important function. I'd have thought they would respond in some way, if only to let us know they are listening.

I've posted a question regarding failure of an SSL request, with zero response. There isn't even an indication if it has been fixed in a later Delphi (I'm using XE2), if this is a known problem, or if I'm doing something wrong.

https://forums.embarcadero.com/thread.jspa?messageID=668623#668623

Dan
David Pedrelli

Posts: 13
Registered: 6/28/98
Re: WSDL Importer  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2014 12:42 PM   in response to: Dan Barclay in response to: Dan Barclay
Dan,

I don't have the answer to your other post. I have seen other people ask questions about problems consuming Web Services, with Delphi. In fact, I have asked about WS-Security, a couple of times, and never got a response. I will outline everything that I did here, because it addresses a few complications.

I am consuming a Web Service that is part of a third-party's developer program. I don't have access to any of their source code, nor can I change anything on their server. Because it is part of a developer program, it is hosted on a server that uses an invalid, SSL certificate. Connecting to the server requires HTTPS and user credentials. Some third-party tools and importers fail if there is an invalid certificate or do not allow you to specify user credentials.

1) HTTPS. I used Fiddler to decrypt HTTPS traffic. Firstly, this eliminates any errors due to the invalid certificate, but still allows you to connect to the server with HTTPS. Secondly, it captures the traffic, which is useful for diagnosing any problems. In fact, you can save specific transactions, with both the header and body. So, I saved a specific Web Services call, with the header and body. Now, I can E-Mail that to the software vendor.

2) Credentials. I saved the user credentials as stored, Windows credentials. That enables some third-party tools, which do not support specify user credentials, to connect to the Web site.

3) Flatten & Import. In this case, I have a local copy of demo project, from the software vendor. The URLs that point to the individual XSDs all reference http://localhost/... I edited all of the files to reference local files, not URLs. I contacted XML Helpline and they sent me a copy of Schema Lightener. It is completely free. I don't know why you have to E-Mail them to get it, but that is how it works. It works with any XSLT processor. However, if you have Java installed. You can just run his .bat file, without installing anything else. I flattened the WSDLs. When I imported the flattened WSDLs, with the Embarcadero wizard, I had the interface, with the functions, and all of the TRemotable datatypes. I am having some other issues, but that seems to be the software vendor, and not Delphi. I was able to import the WSDL URL with WSDL.exe, but I cannot import it into SoapUI. So, going back to the data captures with Fiddler, I am just going to E-Mail them to the vendor.

Note, if you don't have the local files, you can open the WSDLs and XSDs in the browser, and save them to local files. Also, XSDs may import other XSDs. So, you have to change the referenced files, not only in the WSDL, but in the XSDs as well.

Dan Barclay wrote:
David Pedrelli wrote:
To anyone else who may need it, I find a fix for this problem.

David, thanks for posting this. I don't currently have this problem (several services I use imported OK), but it could easily happen. I'm concerned that there have been no responses from EMB on this, and an issue or two I've posted.

Web services is a pretty important function. I'd have thought they would respond in some way, if only to let us know they are listening.

I've posted a question regarding failure of an SSL request, with zero response. There isn't even an indication if it has been fixed in a later Delphi (I'm using XE2), if this is a known problem, or if I'm doing something wrong.

https://forums.embarcadero.com/thread.jspa?messageID=668623#668623

Dan

Edited by: David Pedrelli on Oct 30, 2014 1:33 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02