Date   

Re: Setup an API with Magic XPA server

Brenda Bullorini
 

Hi Andreas!

Thank you very much for the information.
A sample would be great if it's not much trouble!
I'm planning to run the application server for windows.

I need this basically because I'm developing an android (native) so I need restful apis to communicate with the server.
Since I can't use another programming language for the server side, I have to find a workaround with Magic.


Re: Setup an API with Magic XPA server

Andreas Sedlmeier
 

Hi Brenda,

Xpi cannot really do it neither actually, resp. does not have much to offer in that respect I fear. Latest version still ships with Systinet (as I have been told two weeks ago) and thats SOAP *only*. Only the next version (asfaik) will ship with Axis2 and then it would be inline with Xpa again. Axis2 is however not really a "REST platform" too. It's very limited in that respect because Axis2 is about SOAP, like Systinet is. If you have simple GET/POST requests only, Axis2 can transform JSON to SOAP requests and vice versa, that's just not sufficient for REST most of the time because you need support for PUT and DELETE too (-> http://axis.apache.org/axis2/java/core/docs/rest-ws.html). Thats not really an option I fear.

2 or three years ago, when MSE was asked by a company I worked for to do a small demo project with Xpi and Webservices (JSON, REST) they came up with an IIS installation and URL rewriting. Thats an option, just not a good one but for simple things you are probably indeed fine with Nginx/Envy or Apache2 and ... well .. IIS.

Currently (if you insist do do that with Magic) I would rather suggest to write a Magic application server connected to Apache/IIS which can deal with JSON data for input (Blob parameters) and output and then install/configure a API Gateway which does the mapping of URL parameters and http header information into your services (Magic programs). Kong is a pretty decent one: https://konghq.com/kong/ . Probably its just some services and routes which you have to add there (either by configuration files, Lua scripts or admin API calls, ..) and If you use Docker you have that up and running in 15 minutes. Kong is based on Openresty and Nginx. The configuration (addind services and routes, security stuff, ... ) you can even do from Magic via the admin API, ...

Maybe I do a sample this weekend.  Do you plan to run your Magic application servers for this on Windows, or on Linux ?

Best regards,

Andreas


Re: Setup an API with Magic XPA server

Brenda Bullorini
 

Hi Craig and Andreas!

Craig, how is XPI overkill for this? 
I need to provide restful apis but I can't find how to on xpi. Maybe I'm missing something.
I can consume apis and it works fine but how can I provide?


Re: Application file cannot be opened

De Netwerkadviseur BV
 

Thank you, Goose.

Because of your option, I look to the rights of the users. They had rights to read/write. Changing this to FullControl disappeared the message and all can work together.
So it seems something to do with lock/rights combination.

Thanks for pointing me to the right direction.

Best regards,
André 


Re: Call REST webservice in XPA 3.3

Andreas Sedlmeier
 

On Thu, Jan 3, 2019 at 12:24 AM, Todd Baremore wrote:
I'm missing something.  How is recreating a 3rd party's web service easier than just working with the web service itself
It's not easier, its just better. Most of the time even for most trivial APIs - and for more complex APIs I would say it's mandatory because only by mocking you then can test units of work and isolate problems resp. work around service dependencies for which you have your integration tests and where tools like the one I named help a lot too. Just google for advantages and benefits of unit testing and mocking to get tons of good documents.

For Magic development this is in my strong opinion even more important and relevant because the possibilities to refactor code in Magic (which often is needed to test units of work) are very limited in a tool where not even copy/paste of source code works reliable ^^.  Actually if you add a testing framework for Magic API clients you could even use that for the production version because Magic is a poor API client anyway where most of the required functionality is simply missing and has to be implemented "by feet" - where you elsewhere just work with annotations and dependency injection, ...

Its of course not a bad idea to suggest to Gabor to start with something easy, as you did, to get used to implement a REST (API) client. That was not the point anyways.

If he/she has however service definition files for the real API, the Mock services (and test clients) are generated automatically anyway and that's pretty easy then, you just have to get familiar with today's tooling and that's of course another issue. It's however mandatory too in my opionion if you do a lot with services, APIS, ...

Andreas


Re: Magic XPA 3.3: Very small icons on menubar

Freddy Dewulf
 

Hi Frederik,

Don't worry, I'm not a fisher, the old Belgians were fishers, the new ones, that's something else

I'll try to work out your solution.
Thanks

Freddy Dewulf


Re: Call REST webservice in XPA 3.3

Todd Baremore
 

Andreas,

I'm missing something.  How is recreating a 3rd party's web service easier than just working with the web service itself?
Frohes neues Jahr!
Todd
On 1/2/2019 2:43 AM, Andreas Sedlmeier wrote:

You should start using tools, Todd ;). One tool which helps a lot with SOAP/REST/APIs anyways, although there's plenty of other good options meanwhile, is SOAP UI, which you can use to create mock services for testing your client applications. That's pretty easy basically (-> https://www.soapui.org/soap-mocking/service-mocking-overview.html) .

Happy new year!

Andreas 


Re: Magic XPA 3.3: Very small icons on menubar

Frederik Soete
 

Hi Freddy,

As promised, I have taken a look at our company's code for increasing the toolbar icon sizes.

We have chosen not to divulge the full working code, and instead limit ourselves to a brief explanation about some of the steps we took for changing the toolbar icon sizes.

(You know: "Teach a man to fish.")

For reference: the latest DotNet code for the statusbar was included in the following message: https://magicu-l.groups.io/g/main/message/188375

That DotNet code contained a loop over the controls inside the Magic form:

            foreach (var ssc in form.Controls) {
                // Find Magic Status Strip
                if (ssc.GetType().ToString().Equals("com.magicsoftware.controls.MgStatusStrip")) {
                    var ss = (F.StatusStrip)ssc;
                    (etc.)

You can adapt this code to find Magic working area items other than the statusbar. To know which ones are available, you can show the control names within a message box (using the statement " System.Windows.Forms.MessageBox.Show(ssc.GetType().ToString() " just after the foreach-statement). Then you just have to step through the different control name popups to find the one you are interested in.

(Pro-tip: what's nice about Windows error messages, is that you can press Ctrl+C to copy the full contents of the windows message box, so you get the message in the clipboard.)

This way I found out the Magic working area not only contains a control with type "com.magicsoftware.controls.MgStatusStrip", but also a control with type "com.magicsoftware.controls.ToolStripEx". If you replace the MgStatusStrip type string, and in the next line replace 'F.StatusStrip' by 'F.ToolStrip', you will have access to the Magic toolbar properties.

Supposing you have "toolstrip = (F.ToolStrip)ssc;", then the following properties are of special interest: toolstrip.Height (the height of the toolstrip before or after manipulation of the toolbar icon sizes), and toolstrip.ImageScalingSize.Width resp. toolstrip.ImageScalingSize.Height (the width and height of the toolbar icons, properties which you can get AND set).

While these instructions relate to the Magic statusbar or Magic toolbar specifically, perhaps these instructions could still be helpful if you plan to do adjust the menubar font or icon sizes.

I will leave that as an exercise to the reader.

Greetings,

Frederik Soete.


Re: Call REST webservice in XPA 3.3

Andreas Sedlmeier
 

You should start using tools, Todd ;). One tool which helps a lot with SOAP/REST/APIs anyways, although there's plenty of other good options meanwhile, is SOAP UI, which you can use to create mock services for testing your client applications. That's pretty easy basically (-> https://www.soapui.org/soap-mocking/service-mocking-overview.html) .

Happy new year!

Andreas 


Re: Application file cannot be opened

Goose Rodriguez
 

There’s a setting on the ini for the lock file. Change that to be on the local drive. Something like c:\mglock.dat or make sure is on a place in the network where all users have read write access

On Jan 1, 2019, at 4:15 PM, De Netwerkadviseur BV <andre@...> wrote:

Hi,

Did anyone experience this problem before:
I have a Windows 2016 server with Btrieve V13 (Actian) workgroup. Magic 9.4SP8 license is 5 user and the workgroup also (trial-license).
Only one user can logon. All works perfect. A second user cannot logon; error "Application file cannot be opened". Logout the first user, the second user can logon. So only one user at the time.

I hope someone can point me in the right direction. Never had this before.

Best regards,
André 


Application file cannot be opened

De Netwerkadviseur BV
 

Hi,

Did anyone experience this problem before:
I have a Windows 2016 server with Btrieve V13 (Actian) workgroup. Magic 9.4SP8 license is 5 user and the workgroup also (trial-license).
Only one user can logon. All works perfect. A second user cannot logon; error "Application file cannot be opened". Logout the first user, the second user can logon. So only one user at the time.

I hope someone can point me in the right direction. Never had this before.

Best regards,
André 


Re: Magic users conference and brown bag details

Heidi Schuppenhauer
 

I remember when they were organized by Dale and Heidi  

Those were some great conferences for sure! Though mostly because we had some superb trainers and attendees.
I'm happy that others have picked up the reins, and are doing such a great job. It is a LOT of work, so any help you can donate I'm sure will be appreciated.

Heidi.Schuppenhauer

 

 


On Mon, Dec 31, 2018 at 12:36 PM Goose Rodriguez <grodriguez1@...> wrote:
I remember when they were organized by Dale and Heidi (No MSE), oh well
Thanks for the info, maybe this year I'll be able to go to the Montreal one
Happy New Year! 🎉🍾

On Mon, Dec 31, 2018 at 3:10 PM Steven Blank <sgblank@...> wrote:

I don't think MSE is doing conferences in the US anymore, not since they sacked Glenn Johnson.

The Magic Brown Bag conference will, I believe, be in Montreal, in November. Last year's cost was $150. Here's the link:

https://trello.com/b/pqP7kIAr/magic-tech-brown-bag-conference


On 12/31/2018 8:55 AM, Goose Rodriguez wrote:
Management finally budget some money for us humble magic programmers at work (2)
Does anyone has details on next years Magic conferences or Brown Bag?
Dates, costs, website
Tried to search here and use good old google but nothing came up
Cheers and happy new year!


Re: Magic users conference and brown bag details

Todd Baremore
 

Goose et al,

MAG Integration is hosting Brown Bag 2019 in Montreal in the middle of September.  We hope to have the venue and dates nailed down by the end of January.  I'll keep the Trello site Steve cited up to date with the latest information and send updates to this group as needed.

Steve was hoping to get a jump on the snow-shoeing and ice fishing season in November.  Breaks my heart to disappoint him, but our friends on the lower Mississippi have great difficulty tolerating temperatures below 60 F.

Happy New Year everyone
 
Todd
On 12/31/2018 3:10 PM, Steven Blank wrote:

I don't think MSE is doing conferences in the US anymore, not since they sacked Glenn Johnson.

The Magic Brown Bag conference will, I believe, be in Montreal, in November. Last year's cost was $150. Here's the link:

https://trello.com/b/pqP7kIAr/magic-tech-brown-bag-conference


On 12/31/2018 8:55 AM, Goose Rodriguez wrote:
Management finally budget some money for us humble magic programmers at work (2)
Does anyone has details on next years Magic conferences or Brown Bag?
Dates, costs, website
Tried to search here and use good old google but nothing came up
Cheers and happy new year!


Re: Magic users conference and brown bag details

Goose Rodriguez
 

I remember when they were organized by Dale and Heidi (No MSE), oh well
Thanks for the info, maybe this year I'll be able to go to the Montreal one
Happy New Year! 🎉🍾

On Mon, Dec 31, 2018 at 3:10 PM Steven Blank <sgblank@...> wrote:

I don't think MSE is doing conferences in the US anymore, not since they sacked Glenn Johnson.

The Magic Brown Bag conference will, I believe, be in Montreal, in November. Last year's cost was $150. Here's the link:

https://trello.com/b/pqP7kIAr/magic-tech-brown-bag-conference


On 12/31/2018 8:55 AM, Goose Rodriguez wrote:
Management finally budget some money for us humble magic programmers at work (2)
Does anyone has details on next years Magic conferences or Brown Bag?
Dates, costs, website
Tried to search here and use good old google but nothing came up
Cheers and happy new year!


Re: Magic users conference and brown bag details

Steven Blank
 

I don't think MSE is doing conferences in the US anymore, not since they sacked Glenn Johnson.

The Magic Brown Bag conference will, I believe, be in Montreal, in November. Last year's cost was $150. Here's the link:

https://trello.com/b/pqP7kIAr/magic-tech-brown-bag-conference


On 12/31/2018 8:55 AM, Goose Rodriguez wrote:
Management finally budget some money for us humble magic programmers at work (2)
Does anyone has details on next years Magic conferences or Brown Bag?
Dates, costs, website
Tried to search here and use good old google but nothing came up
Cheers and happy new year!


Magic users conference and brown bag details

Goose Rodriguez
 

Management finally budget some money for us humble magic programmers at work (2)
Does anyone has details on next years Magic conferences or Brown Bag?
Dates, costs, website
Tried to search here and use good old google but nothing came up
Cheers and happy new year!


Re: Call REST webservice in XPA 3.3

Gábor Bor
 

Thank you for the example Todd, i'll check it!

Best regards,
Gábor


Re: Call REST webservice in XPA 3.3

Todd Baremore
 

Gábor,

It may be easier to use the the service below to create a working example and then hunt down your problem.
http://www.groupkt.com/post/c9b0ccb9/country-and-other-related-rest-webservices.htm
Todd
On 12/29/2018 4:05 AM, Gábor Bor wrote:

Dear Magicians,

Thank you for everyone! As i read the answers it have to be absolutely possible. Im on. :) When i successfully solve it, i'll come back with my solution. 

Gábor


Re: Call REST webservice in XPA 3.3

Gábor Bor
 

Dear Magicians,

Thank you for everyone! As i read the answers it have to be absolutely possible. Im on. :) When i successfully solve it, i'll come back with my solution. 

Gábor


Re: Persistent form state on two monitors

meis.wietze.lammers@...
 

Hello Govert Schipper,

Yes, it is fixed in Magic 3.3.

146817

The multi-display form was always displayed in the Primary display when the Persistent Form State was set to yes.


Regards,

Meis Wietze Lammers

6501 - 6520 of 195859