Forum OpenACS Q&A: Re: Tcl Web Service

Collapse
2: Re: Tcl Web Service (response to 1)
Posted by Michal Hanckowiak on
I must add that I want to use tclws as a server (WebService implementation),
and that it should use the same port number as that used by oacs,
(so it can not be in external process or "helper thread")

MH

Collapse
3: Re: Tcl Web Service (response to 2)
Posted by Gustaf Neumann on
Hi Michal,

If the package works for AOLserver that it should no big problem to get it working under OpenACS. There might be differences with rights management or request processor, bit these should be solvable. Does it work for you with plain AOLserver?

You might check out xotcl-soap
http://alice.wu-wien.ac.at:8000/xorb-doc/
https://openacs.org/forums/message-view?message_id=1392605
which provides client and server side. I've not done anything, but as far as i know, it was used in an EU project at UNED.

best regards
-gn

Collapse
4: Re: Tcl Web Service (response to 2)
Posted by Brian Fenton on
Hi Michal

I don't envy you - the world of SOAP is a world of pain! I've heard that xotcl-soap is a good solution, but I haven't tried it. I have used the TCL SOAP package from within OpenACS http://tclsoap.sourceforge.net/, but as a client not a server. I found it a well written and useful package, but as I said, I found the SOAP world very painful, especially when dealing with Microsoft services. I believe that REST is far more popular these days. See for example https://stackoverflow.com/questions/76595/soap-or-rest-for-web-services?rq=1

Once you have everything compiled properly, you just need to add these lines in /web/server/tcl/0-acs-init.tcl

package require SOAP
package require SOAP::https
#package require SOAP::WSDL
package require tls
package require tdom

good luck!
Brian

Collapse
5: Re: Tcl Web Service (response to 4)
Posted by Michal Hanckowiak on
Thanks Gustaf and Brian for your answers ;);

tclws toolkit is working perfectly for me as a standalne serwer, I didtn tested it under AOLserver, but I will try to do it...

I know about tclsoap package...
unfortunately, it is a very old package and it is using only old "rpc/encoded" style of WebService,
this is the reason why it does not work with
contemporary webservices using "document/literal" style;

tclws is much more modern, is using document/literal style,
and it automatically generates WSDL files...
I tested it with a good result, with WS toolkits:
java/Axis 1, gSOAP, http://www.webservicex.net/globalweather.asmx, ...

I know that WS/REST is simpler than WS/SOAP/WSDL but
the second also has some advantages,
for example under java/axis it is very easy to use a webservice by its wsdl file (authomatically generated java stub)

....................

best regards,
Michal Hanckowiak