I am importing a WSDL provided by third party.
but I am not successful with delphi WSDL importer.
When I import the WSDL then delphi WSDL importer is hiding the implementation of the classes from the WSDL file.The WSDL file contains some functions which accept objects as parameter.
After importing the WSDL delphi gives error as some variables are undeclared which are actually objects of class,whose definition is hidden by WSDL importer.
I have no personal experience with it, but the Free Pascal Web Service Toolkit seems to be in active development. It is compatible with Delphi,and can be used to create web service clients and servers.
It includes a WSDL importer, both as a command-line utility and a "Wizard". It also has a WSDL based type library editor.
The toolkit uses FPCUnit for test cases. For Delphi, DUnit is used.
Related
I need to do a http get in RAD Studio XE5 C++. The tutorials on the RAD Studio site discuss a RESTCLient that is not included with the version I have. I found the Casablanca project, which is specifically for Visual Studio, and I made a small program in VS that does the simple http get and handles response in the way I need.
What do I need to do to successfully use Casablanca from within RAD Studio?
There are the steps I have taken so far.
Compiled Casablanca in Visual Studio 2013
Copied the .lib and .dll over to a folder in the RAD Studio project
added that folder to the link path in the RAD Studio project
added the .lib to the project
added dll imports to classes that should be in the .lib to the .cpp I want to use the function in.
class __declspec(dllimport) http_client;
class __declspec(dllimport) filestream;
class __declspec(dllimport) producerconsumerstream;
class __declspec(dllimport) rawptrstream;
There was a OMF error, and I used a tool that came with RAD Studio to convert the .lib, that got past the error.
I don't know how to declare the dll prototype's of the functions, because the returns types are from a namespace in the library itself so they aren't recognized. http_client is an unrecognized structure.
I tried this as well without the class keyword.
DLLs that export classes are not portable across compilers. So you will not be able to use a Visual Studio compiled DLL in C++Builder if it exports classes. Either flatten the DLL interface to export plain C-style functions instead (and then use C++Builder's command-line IMPLIB tool to create an import .lib file for the DLL, do not use the .lib file created by Visual Studio), or else find another solution.
For instance, C++Builder (and Delphi) ships with Indy 10, which has a TIdHTTP component. You can use its TIdHTTP::Get() method to perform an HTTP GET request. But if you need to actually use REST, you might be better off simply upgrading your XE5 to a version that has TRESTClient available (BTW, Embarcadero's REST classes use Indy internally).
After i have used wsdl to generate web service client classes, do i still need to use the wsdl at runtime?
It seems like i dont have to, but in the generated classes , I see a url link to the wsdl file. So is the wsdl needed at runtime for the client to consume the web services?
It depends on the language. You didn't specify what you're using, but - for example...
In c#, if you generate a proxy via Visual Studio, the WSDL is not
used at runtime; it generates a class for you that is used instead.
I have seen other clients that require a local copy of the WSDL;
older versions of the MS Soap Toolkit required one. We ran into this
when using that toolkit with VB6.
According to this question, java requires a wsdl at runtime
because some dependencies are generated at runtime.
I am trying to create a F# Library to use with Windows Store apps. I need access to the Windows namespace (especially Windows.Storage). What type of project should I choose for the library?
When I select F# Portable Library, there is no way to add reference to Windows.Storage, neither when I create a project of type F# Library. I am looking for something like Class Library (Windows Store Apps)
I've found Windows.Storage in here: C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd. This means that F# cannot directly reference it.
I suggest that you model your back-end around it (you do have to combine C# with your F# code, because F# doesn't work on its own with Windows 8).
I have a C# application, which uses Microsoft UI Automation functionality, e. g. a call like AutomationElement.RootElement.FindFirst(...).
Now I need to do the same thing (use MS UI Automation) in Delphi 2009.
How can I
a) declare that my Delphi code uses MS UI Automation library and
b) make calls like AutomationElement.RootElement.FindFirst(...)
?
There are several tutorials (tutorial 1, tutorial 2) explaining how to package one's own .NET code so that it can be used with Delphi, but in my case I need to use "pre-packaged" (already installed) assembly in Delphi.
Update 1
Now I can get access to AutomationElement.RootElemeent on one machine, but it doesn't work on another.
How can I find out the reason, why the attempt to execute uiAutomation := CoCUIAutomation.Create; fails on the second machine?
As stated in the comments you have to import the UI Automation type library (COM Object) into your project, this can be done with the "Import Component" wizard (Component -> Import Component) in Delphi 2010.
Microsoft kept the COM Object's interface really close to it's .NET counterpart so you shouldn't have much trouble to use it if you are already familiar with the .NET automation library.
I'd like to start using Microsoft Open XML API with Delphi 2009 to create MS Excel documents. I downloaded and installed Microsoft Open XML but how to proceed further? I thought I can import type library after the installation but I can't find the library on the list. Which one should I import?
I was try to use it but it is for .net only (there is no exported COM info/com implementation)