Topic
5 replies Latest Post - ‏2010-02-01T08:05:53Z by ihasaherb
ihasaherb
ihasaherb
11 Posts
ACCEPTED ANSWER

Pinned topic Web Service Development: key not known in dictionary

‏2010-01-28T09:34:02Z |
Hi

I'm using IBM Rational TAU 4.3 for developing addin that uses Tcl Web Services package and I'm facing the following trouble: executing ::WS::Client::GetAndParseWsdl http://someuri?WSDL i get the the following responce:

Error during tcl evaluation:
key "service" not known in dictionary
while executing
"dict set serviceInfo service name $serviceName"
(procedure "parseService" line 24)
invoked from within
"parseService $wsdlNode $serviceNode $serviceAlias"
(procedure "buildServiceInfo" line 20)
invoked from within
"buildServiceInfo $wsdlNode $serviceInfo $serviceAlias"
(procedure "ParseWsdl" line 27)
invoked from within
"ParseWsdl ::http::data $token -headers $headers -serviceAlias $serviceAlias"
("http" arm line 8)
invoked from within
"switch [dict get ::uri::split $url] scheme {
file {
upvar #0 ::uri::geturl $url token
set wsdlInfo [ParseWsdl $tok..."
(procedure "::WS::Client::GetAndParseWsdl" line 5)
invoked from within
"::WS::Client::GetAndParseWsdl http://someuri?WSDL

Executing dict set serviceInfo service name "name" in the script editor in TAU I get the same error: key "service" not known in dictionary etc

Though executing this command in tclsh provided in ActiveTcl 8.5.8 release works fine.

Can anyone please help resolve this problem? Is it an embeded TAU Tcl interpreter issue or something like that?

Thanks in advance.
Best regards.
Updated on 2010-02-01T08:05:53Z at 2010-02-01T08:05:53Z by ihasaherb
  • _brandon
    _brandon
    13 Posts
    ACCEPTED ANSWER

    Re: Web Service Development: key not known in dictionary

    ‏2010-01-28T10:10:33Z  in response to ihasaherb
    I think what you are running into may be do to the fact that Tau does not necessarily deliver all the TCL utility packages that exist. What you probably need to do is to source the Web Services package so that it is available when interpreting TCL in your Tau session.

    _brandon
    • ihasaherb
      ihasaherb
      11 Posts
      ACCEPTED ANSWER

      Re: Web Service Development: key not known in dictionary

      ‏2010-01-28T10:30:55Z  in response to _brandon
      _brandon, thank you for fast reply.

      The fact is that I source all the necessary packages including Web Services and load dict851.dll(demanded by several "packaeg require dict" instructions in Web Services package) in the script explicitly. All the "package require" instructions appear to run correctly without "package unknown" crashes. I can only assume that TAU Tcl inerpreter uses its own Tcl libraries, including its own dict. Am I right? Anyway, what approach would you recommend to resolve this issue? Or may be there's a way to make TAU use particular Tcl libraries and versions?

      Dmitry.
      • SystemAdmin
        SystemAdmin
        147 Posts
        ACCEPTED ANSWER

        Re: Web Service Development: key not known in dictionary

        ‏2010-01-29T14:49:36Z  in response to ihasaherb
        Dmitry

        I've had success loading some other packages/dlls explicitly (sorry I can't remember their names). At least I succeeded with an activeX client (to integrate to Word and Outlook), so it may be possible to get your web services package to work. OTOH I failed to get Tk to load - I think this is something to do with the Tau tcl interpreter having a modified kernel/innards and as a result it (possibly unintentionally) no longer works with Tk.

        So if the package requires Tk in any form then it is unlikely to work because Tk isn't included in Tau and can't be loaded.

        Have you tried loading the dll in a script window to see if there is an error?

        Also you should verify that the tcl version of your dll matches tau's tcl version - I think Tau 4.3 offers tcl 8.4, so the dll should be for the same version of tcl. I see that dict was introduced in tcl 8.5 so this may well be your problem.

        HTH
        Ian
        • SystemAdmin
          SystemAdmin
          147 Posts
          ACCEPTED ANSWER

          Re: Web Service Development: key not known in dictionary

          ‏2010-01-29T15:02:36Z  in response to SystemAdmin
          This page might have some help for you to get dict working in Tau's tcl 8.4, but all the usual disclaimers apply, such as: I haven't tried these, don't garantee the will work, you try them at your own risk, etc.

          HTH
          Ian
          • ihasaherb
            ihasaherb
            11 Posts
            ACCEPTED ANSWER

            Re: Web Service Development: key not known in dictionary

            ‏2010-02-01T08:05:53Z  in response to SystemAdmin
            Thank you, Ian.

            It was really a version compatibility issue. I've just obtained dict package for Tcl 8.4 from the link you provided and all the thing seems to work correctly. Now I'm facing all the spectre of problems using Web Services package requiring Tcl 8.5 in TAU working on Tcl 8.4. But now I know what to do and what is the main cause of these and further problems. Getting forward to obtain all the needed packages compatible with Tcl 8.4.

            Thank you very much.

            Dmitry.