>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




General

Author Thread: Problems with RunAtServer
Christian.Baeumer
Problems with RunAtServer
Posted: Thursday, May 13, 2004 9:43 AM (EST)

I'm having some with the RunAtServer technologie.

 

First I've created a form with two input fields for numeric input, one lable field for output and one button. By clicking the button, the content of the two edit fields will be read, added and the result is put into the label field. In APL no problem. Next I load the JsaveSDK, import the workspace, publish the functions and get a html file.  The html-file runs faultless in the Browser. All works very well, because there is a function called plus in the file apl_lang.js. Next I tried to put the calculation with RunAtServer on the APLWS-Server. I've created a virtual path /jsaveservice/service1.asmx as described for the sample SAMPLE_UPDOWN. But it doesn't work.

Another question is what to put in wsid for /jsaveservice/service1.asmx.

I hope anyone give me some help.

 

Regards

Christian Bäumer

 

 

 


Comments:

Author Thread:
Jairo.Lopez
Problems with RunAtServer
Posted: Thursday, May 13, 2004 10:21 AM (EST)

Here is a little step by step sample that may help you out:
First, let's create a workspace with 4 simple functions fm1_Make, fm1_Hnd, ADD, and RunAtServer.

 

    ’ fm1_Make;x;Œwself
[1]   'fm1' Œwi 'Delete'
[2]   Œwself„'fm1' Œwi 'New' 'Form'
[3]   Œwi 'caption' 'fm1'
[4]   Œwi 'extent' 14.1875 34.75
[5]   Œwi 'where' 15 32
[6]   Œwself„'fm1.ed1' Œwi 'New' 'Edit'
[7]   Œwi 'where' 2.5 12 1.5 15
[8]   Œwself„'fm1.ed2' Œwi 'New' 'Edit'
[9]   Œwi 'where' 5 12 1.5 15
[10]  Œwself„'fm1.l1' Œwi 'New' 'Label'
[11]  Œwi 'caption' '(no res)'
[12]  Œwi 'where' 7.5 12 1.5 15
[13]  Œwself„'fm1.bn1' Œwi 'New' 'Button'
[14]  Œwi 'caption' 'Calculate'
[15]  Œwi 'where' 10.5 18 1.5 9
[16]  Œwi 'onClick' 'fm1_Hnd "CLICK"'
[17]  Œwself„'fm1.l2' Œwi 'New' 'Label'
[18]  Œwi 'caption' 'Number 1:'
[19]  Œwi 'where' 2.5 1 1.5 10
[20]  Œwself„'fm1.l3' Œwi 'New' 'Label'
[21]  Œwi 'caption' 'Number 2:'
[22]  Œwi 'where' 5 1 1.5 10
[23]  Œwself„'fm1.l4' Œwi 'New' 'Label'
[24]  Œwi 'caption' 'Result:'
[25]  Œwi 'where' 7.5 1 1.5 10
[26]  'fm1' Œwi 'Show'
    ’

 

    ’ fm1_Hnd INP;res;n2;n1
[1]   :select INP
[2]       :case "CLICK"
[3]           n1„Œfi 'fm1.ed1' Œwi 'text'
[4]           n2„Œfi 'fm1.ed2' Œwi 'text'
[5]           res„RunAtServer ADD n1 n2
[6]           'fm1.ed1' Œwi 'text' (•n1)
[7]           'fm1.ed2' Œwi 'text' (•n2)
[8]           'fm1.l1' Œwi 'caption' (•res)
[9]   :endselect
    ’

 

    ’ r„ADD INP;a;b
[1]   (a b)„2†INP
[2]   r„+/a b
    ’
 

 

’ R„RunAtServer R
    ’

 

Then, copy the ADD function into the APLWS.w3 workspace. This workspace is available from: http://apldn.apl2000.com/downloads/APLWC+Downloads/APLWCRC/default.aspx

 

Create (or modified) a web server in the APL+WebServices to reflect the following configuration:
- A virtual path to handle the RunAtServer:

<virtualpath name="/jsaveservice/service1.asmx">
  <access />
  <wsid>aplws</wsid>
  <function>HTTP_SoapProcess</function>
  <rarg type="header">hdr</rarg>
  <larg type="entity-body">data</larg>
  <result type="content-type">r1</result>
  <result type="soap-envelop-start">r2</result>

  <result type="soap-body">r3</result>

  <result type="soap-envelop-end">r4</result> 
</virtualpath>

- The workspace for the wsid aplws:

<workspace id="sample_updown">
  <minpool>1</minpool>
  <maxpool>1</maxpool>
  <timeout>15000</timeout>
  <debug>0</debug>
  <visible>1</visible>
  <wslocation>[path]\APLWS.w3</wslocation>
  <wssize>16m</wssize>
  <evlevel>2</evlevel>
  <busyid /> 
 </workspace>

Then open the JsaveSDK and export the functions fm1_Make and fm1_Hnd only. When publishing the htm select fm1_Make to be the Œlx function.

 

When you load the htm file from a web browser the ADD function will be executed in the APLWS workspace in the server.

 

Give it a try and let me know how it goes!

 

     

Christian.Baeumer
Problems with RunAtServer
Posted: Thursday, May 13, 2004 11:08 AM (EST)

Hello Jairo,

 

thank you for your quick answer. But it still won't work on my computer. Why did you call the wsid "aplws" in the virtual path and the workspace id="sample_updown" ??

 

There also seems to be a bug in the function HTTP_SoapProcess line [27]. The function JS_ANSI2AV isn't in the workspace, but  the function JS_AV2ANSI is!

 

Best regards

Christian

     

Christian.Baeumer
Problems with RunAtServer
Posted: Thursday, May 13, 2004 11:22 AM (EST)

Hello Jairo,

 

now it works. I set wsid to "aplws" in the virtual path and workspace id to "aplws". I also had to format the added values in the function ADD, because it seems to be that the function HTTP_SoapProcess doesn't work with numbers.

 

But there still believes the mistake in the function HTTP_SoapProcess line [27].

 

Best regards

Christian

     

Jairo.Lopez
Problems with RunAtServer
Posted: Thursday, May 13, 2004 12:03 PM (EST)
A new version of the aplws.w3 workspace is available in the Release Candidate section. That version has the missing function.

     

Michael.Shumate
Problems with RunAtServer
Posted: Monday, February 14, 2005 5:01 PM (EST)

The "step-by-step" says:

 

Download aplws.w3
Create a copy of your workspace to be published, and copy aplws into that workspace. 

Should it be the other way around? Copy my workspace into APLWS?

 

/mas

     

Support
Problems with RunAtServer
Posted: Monday, February 14, 2005 5:12 PM (EST)
Either method is acceptable.  But if you do what you're suggesting, you must make sure to save the workspace under a different name so as not to destroy the original APLWS workspace.

APL2000 Support

     



APL2000 Official Web Site

Make others happy and joyful. Your happiness will multiply a thousand fold.
--- Swami Sivananda

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |