Re: Calling xpa web service


Jackson, Adam
 

Hi Andreas,

 

The ARGUMENTS portion unlocked the door – all good now. I’ll work on coming up with a meaningful, helpful success message.

 

At this stage this is purely for intranet use so if/when we expose to the internet I will need to use web services but for now “Magic & Internet” gives me exactly what I need.

 

Thanks,

 

Adam

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Andreas Sedlmeier
Sent: 27 October 2018 10:16
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Calling xpa web service

 

Hi Adam,

What you have is a "Magic & Internet" program. Basically the ISAPI requester connects your client (a browser) to your Magic program running on server side. The return value is not relevant in this case. What you need to do is, writig your response to the requester and that you can achieve by using the requester functions or by an I/O entry of type "Requester". You really should look into the tutorials and examples.

Second, your parameters do not make it to the program and default to "empty". Thats because you did not put an ARGUMENTS= string on the URL. Your URL could look like following and you would get the values: http://<my_server>/magicscripts/mgrqispi.dll?APPNAME=JavelinWS2&PRGNAME=ClosePO&ARGUMENTS=-ACN%20203391,-N2

In your specific case I would probably create a static "Thank you, order has been closed" html page and program ClosePO would return a relocation to there so that the browser loads that page. I have a sample for such a program: https://github.com/asedl/XpaDemo/blob/master/XpaDemo/Components/XpaTWeb/Source/Prg_4.xml

Finally you really should be aware of the impact when you open your system to the Internet and add some security because your program can be called by everyone with whatever paramters. Somebody could send you requests to close all your orders, ...

Best regards,

Andreas


The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited | McLaren Technology Centre | Chertsey Road | Woking | Surrey | GU21 4YH | UK | Company Number: 01517478

Join main@magicu-l.groups.io to automatically receive all group messages.