Let CURL handle cookie list

A client asked about how to handle best a SOAP webservice, which handles authorization and session handling via cookie. You can query and set cookies in CURL sessions easily with the cookie functions. But the best here may be to just call MBS("CURL.SetOptionCookieFile"; $curl; "" ) and let CURL handle them. So each CURL session can include an internal cookie storeage activated by CURL.SetOptionCookieFile function. When a cookie is set on the server, CURL parses the response and adds the cookie to the cookie storage in memory. For the next query, matching cookies are automatically added to headers and send with the request. 

 

Let's take the following script to query a SOAP servcice with first a login query and than an information query. As authorization is handled via cookie, we reuse the same $curl session and benefit from automatic cookie handling:

 

# The URL of the service

Set Variable [ $url ; Value: "http://somedomain.com/PartnerService17.asmx" ] 

# Build XML for SOAP Login request, e.g. with MBS XML functions or simply subsitute()

Set Variable [ $xml ; Value: "<?xml version=\"1.0\" encoding=\"utf-8\"?> <soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\>..." ] 

Set Field [ Curl_Test::XML ; $xml ] 

# The SOAP action to use

Set Variable [ $action ; Value: "http://somedomain.com/partner/loginWithLicenceUnlockInfo" ] 

# Setup transfer

Set Variable [ $curl ; Value: MBS("CURL.New") ] 

Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; $url) ] 

# Put SOAP action and XML data type in the headers

Set Variable [ $result ; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml; charset=utf-8"; "Expect:"; "SOAPAction: \""& $action & "\"") ] 

# Ask CURL to manage cookies

Set Variable [ $result ; Value: MBS("CURL.SetOptionCookieFile"; $curl; "" ) ] 

# Set the payload for the login transfer

Set Variable [ $result ; Value: MBS("CURL.SetOptionPostFields"; $curl; $xml) ] 

# Run transfer

Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ] 

# Let's take a look on the cookie list

Set Variable [ $$cookie ; Value: MBS("CURL.GetCookieList"; $curl ) ] 

Set Field [ Curl_Test::Cookie ; $$cookie ] 

# Check result

Set Field [ Curl_Test::Debug ; MBS("CURL.GetDebugAsText"; $curl) ] 

Set Variable [ $result ; Value: MBS("CURL.GetResultAsText"; $curl) ] 

Set Field [ Curl_Test::Resultat ; $result ] 

# Reuse same $curl for second request reusing existing cookies

# Make new XML for second request

Set Variable [ $npk ; Value: "103" ] 

# Build XML for SOAP Login request, e.g. with MBS XML functions or simply subsitute()

Set Variable [ $xml ; Value: "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">..." ] 

Set Field [ Curl_Test::XML ; $xml ] 

Set Variable [ $action ; Value: "http://somedomain.com/partner/queryInfo" ] 

# Setup transfer

Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; $url) ] 

# Put SOAP action and XML data type in the headers

Set Variable [ $result ; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml; charset=utf-8"; "Expect:"; "SOAPAction: \""& $action & "\"") ] 

# Set the payload for the second transfer

Set Variable [ $result ; Value: MBS("CURL.SetOptionPostFields"; $curl; $xml) ] 

# Run transfer

Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ] 

# Check result

Set Field [ Curl_Test::Debug ; MBS("CURL.GetDebugAsText"; $curl) ] 

Set Variable [ $result ; Value: MBS("CURL.GetResultAsText"; $curl) ] 

Set Field [ Curl_Test::Resultat ; $result ] 

# Finally end curl session

Set Variable [ $r ; Value: MBS("CURL.Cleanup"; $curl) ] 

 
If you have questions about our plugin, please do not hesitate to contact us.

MBS Workshop in Hamburg bei der FileMaker Konferenz

In Zusammenarbeit mit dem Verein FM Konferenz bieten wir eine Schulung zum MBS Plugin an. Am 16. Oktober 2019 können Sie in Hamburg, Deutschland an einer eintägigen Schulung teilnehmen. Lernen Sie die über 5000 Funktionen einmal näher kennen und wie Sie sie effektiv einsetzen. Sammeln Sie Ideen und verbessern Sie ihre FileMaker Lösungen durch den Einsatz unseres Plugins.

Das Monkeybread Software Plugin für FileMaker stellt eine vielseitige Erweiterung der eigenen Datenbank dar. Der Kurs bietet nicht nur einen tiefgreifenden Überblick in die Benutzung und Entwicklung, sondern bietet auch die Chance das Plugin günstiger zu erstehen.
  • Einführung in das MBS Plugin
  • Überblick über die Funktionsbereiche
  • Neues im MBS Plugin dieses Jahr und in der dann aktuellen Version
  • Rundgang durch ausgewählte Beispiele
  • Gemeinsames Implementieren von Plugin Funktionen in eine Datenbank.
    • Upload/Download mit CURL auf einen HTTP/FTP Server
    • Ausfüllen eines Formulars auf einer Webseite
    • Bilder bearbeiten
    • PDF Verarbeitung
    • Druckerfunktionen
    • Barcodes und Zahlungsscheine
    • Einbinden von Webservices with JSON/XML für REST/SOAP.
    • Senden und Empfangen von Emails.
  • Fragen und Antworten
Die Teilnahme kostet 119 Euro (Frühbucher bis 16. Juli 2019) bzw. 149 Euro inkl. Verpflegung und MWSt.. Trainer ist der Plugin Entwickler und Monkeybread Software Geschäftsführer Christian Schmitz persönlich. Beginn gegen 9 Uhr und Ende gegen 17 Uhr.

Anmeldung bei Monkeybread Software. Schulung findet statt. Mindestteilnehmerzahl erreicht!

Am Abend vorher treffen wir uns zum gemütlichen Beisammensein im Restaurant vom Konferenzhotel. Im Anschluss an die Schulung können Sie gleich rüber zum Apero gehen und die anderen Teilnehmer kennen lernen.

Bei Fragen und Themenwünschen melden Sie sich bitte direkt bei uns.
Weiter Schulungstermine: 7. Nov 2019 bei der Denkform in Wiesbaden, 19. November in Meilen.

MBS FileMaker Plugin, version 9.1pr4

New in this prerelease of version 9.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

New DirectShow dialogs

For next plugin we have some new standard dialogs for DirectShow. You can control properties for compression, camera control, audio mixer and stream configuration via built-in Windows dialogs.



Screenshots are in German, but you can get localized versions of course for your language.
You can show them with our Xojo and FileMaker plugins.

What a week

This week was great. We had so many things going on here.
  • First I visited a company and gave a full training day for Xojo development. Desktop and Web apps, controls and database access. Just a bit to learn Xojo and what is different to other tools.
  • Another client came to our office for a Xojo training and co-development day here. Some clients really enjoy having a helping hand on how to implement something.
  • Stefanie joined the FileMaker training day at MKV for beginners. I think that really helps her learning FileMaker.
  • I worked on two custom Xojo plugins for two companies to wrap some private C++ libraries.
  • Stefanie wrote an article for FileMaker Magazin, which will be published in the next months.
  • She also wrote an article for Xojo Developer Magazine. I hope she can be a regular writer for both magazines and regularly write something for the blog.
  • And the usual remote help for various clients. Like getting load balancer script running for a client with several Xojo web apps. Helping a client with using MBS Plugin in iOS SDK.
  • For the plugins we fix bugs and add new functions as we are contacted by customers.
Now lets enjoy the weekend a bit and maybe do a little trip with family to enjoy some time in nature, maybe walk to a castle.

Text to Webviewer Script for FileMaker

Today we got a handy script to convert text to html for the webviewer with clickable links:



The script looks like this:

Set Variable [ $text ; Value: Text To WebViewer::Text ]
Set Variable [ $html ; Value: MBS( "Text.EncodeToHTML"; $text ) ]
Set Variable [ $html ; Value: MBS( "RegEx.ReplaceAll"; $html; "(http|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?"; "<a href=\"\0\" target=\"_blank\">\0</a>"; "Caseless¶greedy") ]
Set Variable [ $html ; Value: MBS( "Text.ReplaceNewline"; $html; 4 ) ]
Set Variable [ $html ; Value: "<html><body><p>" & $html & "</p></body></html>" ]
Set Field [ Text To WebViewer::HTML ; $html ]
Set Web Viewer [ Object Name: "web" ; URL: "data:text/html;charset=utf-8;base64," & Base64Encode ( $html ) ]

As you see, we use Text.EncodeToHTML to encode any special characters as html entities. Than we use a regular expression to find all links and make them clickable. Next we replace the line endings and load the html into the web viewer with a data URL.

This works fine for MacOS and Windows. You can even put it on the FileMaker Server and use it for Web Direct.
For iOS, you may need to have plugin in your own iOS app or do the processing via PSoS. Finally you can load html to web viewer on iOS.

Fixing a broken time machine backup

If you see a dialog like this, your backup may be broken or just have a little problem with the disk image. So usually we try to repair it instead of starting over. This are the steps necessary:

First turn of backups and mount the Time Machine disk and check what the name of the disk and the sparse bundle inside is, so you can adjust the names. hdiutil will return the disk number, which must be used for the next two calls:

sudo su -
hdiutil attach -nomount -noverify -noautofsck /Volumes/DiskName/BackupName.sparsebundle
fsck_hfs -dfy /dev/diskXs2
hdiutil detach /dev/diskXs2

After fsck_hfs repaired the disk image on your time machine, you may need to remove the nouchg flag for the sparse bundle:

chflags -R nouchg /Volumes/DiskName/BackupName.sparsebundle

In the plist file inside the bundle, you may need to remove the decline date where the backup was marked broken:

<key>RecoveryBackupDeclinedDate</key>
<date>some-data</date>

And set the VerificationState back to zero:

<key>VerificationState</key>
<integer>0</integer>

If you did all the steps, you can enable backups again and let it continue with the same time machine sparse bundle.
We did those fixes a few time already and usually fsck reported just a minor problem.

MBS FileMaker Plugin, version 9.1pr3

New in this prerelease of version 9.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Scroll through records with mouse wheel on MacOS

As you may know we already made functions to catch scroll wheel events for FileMaker on Windows and trigger a script to move between records.

FileMaker Pro Advanced 17 misses the feature for mouse wheel navigation for the navigation view in the toolbar.

For MBS FileMaker Plugin 9.1, we added MacOS support for FM.MouseWheelScriptTrigger function, so you can use it with the toolbar. If needed, you can enable/disable the feature at any time with FM.EnableMouseWheel and FM.DisableMouseWheel functions.

The Mac version of that function is a bit more clever than on Windows as we only capture the scroll wheel events while the mouse is over the right window area. Even works, if the window is background and you scroll with mouse over the window.

Coming soon for next plugin version. If you like to try today, you can email us.

FileMaker Stammtische diese Woche

Wer nach anderen FileMaker Entwickler sucht, kann sich FileMaker auf der Events Webseite oder auf der FileMaker Magazin Webseite nach Stammtischen suchen.

Diese Woche finden drei FileMaker Stammtische statt:

Am 13. Februar 2019 gegen 19 Uhr in den Räumen der "Studiowerk - Musikmanufaktur" in Braunschweig.
Am 14. Februar 2019 gegen 19 Uhr im Ristorante Pizzeria Capri in Neu-Ulm.
Am 14. Februar 2019 gegen 19 Uhr im Restaurant Beaulieu in Bern.

Herzliche Einladung mal vorbei zu schauen, falls ihr in der Nähe seit.

Am Besten für den jeweiligen Stammtisch beim Organisator anmelden, damit die Bescheid wissen, wer kommt. Und die Organisatoren schicken gerne regelmäßig Emails rund um an den nächsten Termin zu erinnern, die Themen bzw. Termin- oder Ortswechsel bekannt zu geben.

MBS FileMaker Plugin, version 9.1pr2

New in this prerelease of version 9.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

FileMaker Developer Conference 2019

The website for the FileMaker DevCon 2019 is now online: FileMaker DevCon 2019



Please join us 5th to 8th August 2019 in Orlando, Florida, USA.
Monkeybread Software has a booth as usual and we'll be there for a whole week.

You can book the conference for 2 days ($999 USD) or 3 days ($1299), but I would suggest to add training day for ($399) and make it a 4 day conference. And if you come from far away, please make sure you have a day before/after to enjoy some extra activity with other attendees, like a visit to a Disney Park.

Hotel room is $189 including resort fee, but plus tax.

MBS FileMaker Plugin, version 9.1pr1

New in this prerelease of version 9.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Workshop zum MBS FileMaker Plugin @ Denkform

For our German speaking clients we have a workshop day:

In Zusammenarbeit mit der DenkForm GmbH bieten wir eine Schulung zum MBS Plugin an. Am 7. März 2019 können Sie in Wiesbaden an einer eintägigen Schulung teilnehmen. Lernen Sie die über 5700 Funktionen einmal näher kennen und wie Sie sie effektiv einsetzen. Sammeln Sie Ideen und verbessern Sie ihre FileMaker Lösungen durch den Einsatz unseres Plugins.

Das Monkeybread Software Plugin für FileMaker stellt eine vielseitige Erweiterung der eigenen Datenbank dar. Der Kurs bietet nicht nur einen tiefgreifenden Überblick in die Benutzung und Entwicklung, sondern bietet auch die Chance das Plugin günstiger zu erstehen.
  • Einführung in das MBS Plugin
  • Überblick über die Funktionsbereiche
  • Neues im MBS Plugin dieses Jahr
  • Rundgang durch ausgewählte Beispiele
  • Gemeinsames Implementieren von Plugin Funktionen in eine Datenbank:
    • Upload/Download mit CURL auf einen HTTP/FTP Server
    • Ausfüllen eines Formulares auf einer Webseite
    • Bilder bearbeiten
    • PDF Verarbeitung
    • Druckerfunktionen
    • Adressbuch und Kontakte abfragen bei Mac OS X.
    • Senden und Empfangen von Emails.
  • Fragen und Antworten
Die Teilnahme kostet 119 Euro inkl. MWSt. und Verpflegung.
Details und Anmeldung bei der Denkform.

Im Anschluss geht es noch zur Pizzeria zum FileMaker Stammtisch Rhein-Main.
An jedem ersten Donnerstag im Monat findet ab 19 Uhr der FileMaker Stammtisch Rhein-Main statt, zu dem jeder herzlichst eingeladen ist.

FileMaker Conference dotfmp.berlin 2019

Did you sign up for FileMaker Conference dotfmp.berlin 2019?

Only 20 tickets are left for sale and this may sell out soon.

This conference is organized by Egbert Friedrich and takes place from 6th to 8th June 2019 in Berlin, Germany.

As the conference is in english, this is your chance to meet people from around the world at a conference in Europe. And for a lot of people it's easier to get to Berlin than to cross the atlantic and deal with US immigration officers.

Who
dotfmp is an effort of various leading European FileMaker Developers. It is meant to bring all kinds of higher level developers together to share knowledge, educate and challenge each other.
When
dotfmp starts at the 5th June 2019 in the later afternoon with a relaxed "Beer and Sausages" in one of the most famous Berlin Beergarden. The session days itself last from 6th until 8th June with various socializing events in the evenings. Additionally we offer support on 10th June to see more from Berlin and its surroundings.
What
dotfmp is a 3 Day-Unconference, Meetup, Hangout or Barcamp. It is an informal and self-organized effort to meet on a personal base.
Where
dotfmp takes place in one of the most famous spots in Berlin. The GLS Campus is located in a vibrant area with a very short walking distance to all the famous restaurants.
Why
We feel there are far too few possibilities to talk to, learn from, and hangout with fellow developers in a relaxed and informal environment. And we'd like to share work and get feedback from people chewing on similar challenges.


If you like to join the conference and present something, please register soon.

FileMaker Stammtisch in Hamburg am 7. Februar

Am 7. Februar treffen sich interessierte FileMaker Entwickler in Hamburg zum Austausch von Neuigkeiten, Erfahrungen und Tipps & Tricks.

Diesmal zeigt Holger Darjus, warum Wiederholfelder oft unterschätzt werden.

Wo: K&K Verlag, Große Brunnenstraße 43, 22763 Hamburg
Wann: Donnerstag, 7. Februar 2019, ab 19 Uhr

Soweit ich sehe, sind wir dann auch in Hamburg und stehen gerne für Fragen zum MBS Plugin zur Verfügung.

siehe Einladung zum Hamburger FileMaker Stammtisch und Stammtisch Hamburg Webseite

Würde mich freuen Euch dort zu sehen.

Wenn noch Bedarf ist an Beratung/Schulung/Entwicklungshilfe vor Ort, dann bitte melden wegen Terminvereinbarung.

UserNotifications framework for Mac

The UserNotifications framework has been in iOS since version 10. With MacOS 10.14 Apple added this framework for the Mac, so we have the same classes in iOS and MacOS. With MacOS 10.14 Apple also deprecated NSUserNotification API.

To MBS Plugins, we now add UserNotifications API for MacOS in both our FileMaker and Xojo plugins.

For Xojo the new plugin part UNNotification contains all the classes to wrap the framework. As usually, we make this thread safe for Xojo, manage memory automatically and convert data types for you.

For FileMaker we compile the same code as for iOS for MacOS. Our existing UNNotification functions simply work for MacOS, too. There are a few little differences like location based notifications are not supported and there are no launch images for MacOS. If needed we could add new functions for actions beside just bringing FileMaker to front.

If you like, you can try soon those new functions with the next betas.

Archives

Mar 2024
Feb 2024
Jan 2024
Dec 2023
Nov 2023
Oct 2023
Sep 2023
Aug 2023
Jul 2023
Jun 2023
May 2023
Apr 2023
Mar 2023
Feb 2023
Jan 2023
Dec 2022
Nov 2022
Oct 2022
Sep 2022
Aug 2022
Jul 2022
Jun 2022
May 2022
Apr 2022
Mar 2022
Feb 2022
Jan 2022
Dec 2021
Nov 2021
Oct 2021
Sep 2021
Aug 2021
Jul 2021
Jun 2021
May 2021
Apr 2021
Mar 2021
Feb 2021
Jan 2021
Dec 2020
Nov 2020
Oct 2020
Sep 2020
Aug 2020
Jul 2020
Jun 2020
May 2020
Apr 2020
Mar 2020
Feb 2020
Jan 2020
Dec 2019
Nov 2019
Oct 2019
Sep 2019
Aug 2019
Jul 2019
Jun 2019
May 2019
Apr 2019
Mar 2019
Feb 2019
Jan 2019
Dec 2018
Nov 2018
Oct 2018
Sep 2018
Aug 2018
Jul 2018
Jun 2018
May 2018
Apr 2018
Mar 2018
Feb 2018
Jan 2018
Dec 2017
Nov 2017
Oct 2017
Sep 2017
Aug 2017
Jul 2017
Jun 2017
May 2017
Apr 2017
Mar 2017
Feb 2017
Jan 2017
Dec 2016
Nov 2016
Oct 2016
Sep 2016
Aug 2016
Jul 2016
Jun 2016
May 2016
Apr 2016
Mar 2016
Feb 2016
Jan 2016
Dec 2015
Nov 2015
Oct 2015
Sep 2015
Aug 2015
Jul 2015
Jun 2015
May 2015
Apr 2015
Mar 2015
Feb 2015
Jan 2015
Dec 2014
Nov 2014
Oct 2014
Sep 2014
Aug 2014
Jul 2014
Jun 2014
May 2014
Apr 2014
Mar 2014
Feb 2014
Jan 2014
Dec 2013
Nov 2013
Oct 2013
Sep 2013
Aug 2013
Jul 2013
Jun 2013
May 2013
Apr 2013
Mar 2013
Feb 2013
Jan 2013
Dec 2012
Nov 2012
Oct 2012
Sep 2012
Aug 2012
Jul 2012
Jun 2012
May 2012
Apr 2012
Mar 2012
Feb 2012
Jan 2012
Dec 2011
Nov 2011
Oct 2011
Sep 2011
Aug 2011
Jul 2011
Jun 2011
May 2011
Apr 2011
Mar 2011
Feb 2011
Jan 2011
Dec 2010
Nov 2010
Oct 2010
Sep 2010
Aug 2010
Jul 2010
Jun 2010
May 2010
Apr 2010
Mar 2010
Feb 2010
Jan 2010
Dec 2009
Nov 2009
Oct 2009
Sep 2009
Aug 2009
Jul 2009
Apr 2009
Mar 2009
Feb 2009
Dec 2008
Nov 2008
Oct 2008
Aug 2008
May 2008
Apr 2008
Mar 2008
Feb 2008