XE2 FireMonkey - connect to a Web Service in iOS app - xcode

I have created an XE2 FireMonkey application which needs to run on an iPad. I am familiar with exporting to XCode and recompiling on the Mac machine. This all works quite fine.
The problem however is when I want to connect to an existing web service. Using the WSDL Import, I can create the necessary file and the functionality from my web service works as expected. This only works in a Windows environment though as the file created by the WSDL Import uses the "InvokeRegistry" which is Windows specific.
How can I connect to a web service in FireMonkey in a way which will compile on XCode and work in an iOS environment?

The Web Service Toolkit of Free Pascal is one option. According to this forum post, iOS can be used as target platform.
The toolkit includes a WSDL importer wizard, also available as command line tool ("ws_helper").
"Web Service Toolkit” is a web services package for FPC, Lazarus and
Delphi; “Web Service Toolkit” is meant to ease web services
consumption and creation by FPC, Lazarus and Delphi users.

It seems that one cannot have data connectivity in mobile iOS applications without various forms of "hacking" code. There is currently no standard way with the XE2 framework to support this.
See: http://edn.embarcadero.com/article/41729

XE5 has major improvements and data connectivity is now easily handled via DataSnap. One can easily reference existing web services via a DataSnap server, so the issues I originally had are now solved.

Related

How can I create a REST API client for a Windows Runtime project in Visual Studio / by external tools?

In Visual Studio for .net projects I can use built in tools to generate API clients by swagger. It simply and works great.
This option is missing from Windows Runtime projects as well, like Windows 10 IOT ones.
What is the best way to create API clients by swagger for this? If there is no built in tool / extension for VS, any external tools are highly appriciated.
Thanks a lot!
I don't get your question completely; on Windows IOT Core you can run UWP (background) apps; they are compatible with .net framework and .net standard up to version 1.4. This should work with a generated client from swagger.
Also you can use Refit to create a REST client according to best practices based upon an interface with attribute decorations.

Should I use a windows service?

Hi I have a console app which I need to start up when Windows Server 2012 starts and without needing to login. I've done a bit of research and people advise a windows service is the correct approach, however the links are quite old and I wanted to confirm this is still the case, or indeed correct at all. Cheers.
Yes, Windows Service is still the most popular way to write and run servers and or a 'daemon' in Windows OS.
Depending on what your application is doing, you might have other options though, e.g. hosting an application in IIS (Microsoft's Web server application in Windows Server).
More recently, Microsoft has been working with Docker to also allow the use of containerized application deployments, which is available in new versions of Windows Server (Windows Server 2016).
Here are a few resources for more reading:
For .NET developers: Walkthrough: Creating a Windows Service Application in the Component Designer
Not just for .NET developers: Quick Start: Windows Containers on Windows Server

Is the default mail app on Windows 10 done using HTML5, CSS and javascript?

One of my colleague try to convince me that the default mail app on Windows 10 is done using HTML5, CSS and javascript. But I doubted it and I believe it is written using Windows SDK and C#. Do you have any evidence to show how the mail app was built?
Cheers
You win. It's not HTML.
You can check by running the app and then examining it in Task Manager. Look at the details and the process name will be WWAHost.exe for an HTML app.
You can get more detail with Process Explorer. ProcExp will let you see the DLLs loaded in the process where you can see that it loads Windows.UI.Xaml.dll.
.Net (C#) vs. C++ is trickier, especially since it's likely a mix of both. The .Net Framework engines (mscorwks.dll, etc.) in the process would indicate a .Net app, but I don't believe they'll show up in a .Net native app, and Mail (along with all other .Net Universal Windows apps deployed from the store) will be compiled with .Net Native.
You can also figure out similar information by looking at the app's package in \Program Files\WindowsApps

Access an ASMX Service Reference in Universal Windows Apps

Can somebody help me with a little issue about Universal Windows Apps?
I'm trying to develop a small universal app that calls an .asmx web service. I can add the Service Reference successfully to the Windows 8.1 project and reference it from the classes in the shared project. When I compile and run the application, it runs without problem.
But when I switch to Windows Phone 8.1, I'm unable to compile and I get an error telling me that the classes generated by the service reference in the Windows 8.1 Project are not accessible from the Shared Project.
Does anyone know how to solve this?
FInally I solved this unanswered question. It seems in Universal Windows Apps is not possible to use SOAP Web Services as Service References, so I used REST Services instead.

How do you add a windows service to an existing application installer?

We've created a windows service to detect the insertion of a particular usb device.
That service is then supposed to launch an application we have written.
We initially made a setup project for our application and a separate one for the windows service.
Now, we are trying to get the service and the application installed in the same setup project.
We tried putting the output of our service into the setup project but without any luck.
We have the a projectinstaller class in the service, so why can't we simply add the project output of the Windows service (including the installer class) to our application's setup project?
There is MSDN article explains it, Create the installers for your service. Microsoft support also have an article, How to create a setup project for a Windows Service application in Visual C#
My primary language is Delphi. In Delphi, when a program is created as Service Application,
installing the program as a Windows Service can be done by running my_service_app_name.exe /INSTALL. I guess, the execution mechanism should be roughly same with service applications created by other compilers.
Thus, adding a windows service to an existing application installer can be done by just running the service application as mentioned, but you should refer to the documentation in case you are not using Delphi.

Resources