Hi Claudio!

I can confirm what Gustaf wrote below. We are using our own initialization routine, which is similar to the one provided by the tclws package. We have our own logging facilities, wo we don't need the log package:

namespace eval ::WS::AOLserver {
  if {![info exists wsVersion]} {
    variable wsVersion [package require WS::Server]
  }
  #if {![info exists logVersion]} {
  # variable logVersion [package require log]
  #}
}

For returning values, we use exactly the line from Gustaf:

set data(query) [ns_getcontent -as_file false -binary false]

This is handy for REST interfaces as well.

regards,

Wolfgang



Am 2016-12-31 um 17:51 schrieb Gustaf Neumann:
Am 30.12.16 um 19:00 schrieb Claudio Pasolini:
Hi all,

I'm in the process of upgrading several OpenACS instances and migrating them from AolServer 4.5 to the latest NaviServer.

One of the instances makes use of TCLWS for bulding a couple of SOAP web services and I'm having trouble to make it work.

Here are the first problems encountered:

  * ns_ictl doesn't support the 'package' argument. I replaced the
    command
    ns_ictl package require log
    with
    ns_ictl trace allocate {package require log}

probably, using "package require log" will be sufficient as well.

  * but I'm not sure about eventual side effects.
  * In a proc called by ns_register_filter preauth I replaced
    ns_rewrite with ns_internalredirect but I observed a strange
    behaviour. ns_register_filter invokes the proc passing one
    argument, but actually the proc receives two, prehauth being added.

you are probably referring to the old module "nsredirect". Calling ns_internalredirect should be fine.

Yes, there is a difference between the calling conventions in AOLserver and NaviServer: NaviServer tells the developer the stage, at which the proc was invoked (the same proc might be registered for multiple states (such as "preauth", "postauth" or "trace"). This
difference is as well handled in e.g. OpenACS since 10+ years.

  * I stumbled in the same problem posted by Wolfgang Winkler
    Error: can't set "xsltSchemaDom": var is read-only
    and solved it thanks to Gustaf tip.

should not happen in recent versions of NaviServer

  * Calling the sample EchoWebService I get a strange error
    Error: invalid length: 779
    executing the command
    ns_conn copy 0 $length $fp

this comes probably from this section:
https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82

I would think that you can replace the section "Get POSTed data"
by something like:

        set data(query) [ns_getcontent -as_file false -binary false]

This has at least the following advantages
- less hacky
- works for http and https
- works also when spooling post data

all the best
-gn


I wonder if someone (Wolfgang?) having already a production site running TCLWS with NaviServer could suggest me how to proceed.

Happy New Year!

Claudio


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org!http://sdm.link/slashdot


_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


--
Univ.Prof. Dr. Gustaf Neumann
WU Vienna
Institute of Information Systems and New Media
Welthandelsplatz 1, A-1020 Vienna, Austria


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

--

*Wolfgang Winkler*
Geschäftsführung
wolfgang.wink...@digital-concepts.com
mobil +43.699.19971172

dc:*büro*
digital concepts Novak Winkler OG
Software & Design
Landstraße 68, 5. Stock, 4020 Linz
www.digital-concepts.com <http://www.digital-concepts.com>
tel +43.732.997117.72
tel +43.699.1997117.2

Firmenbuchnummer: 192003h
Firmenbuchgericht: Landesgericht Linz


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to