1

I started to learn how to invoke JAX-WS webservice via TCL client with use of tclws api. I have a simple calculate webservice deployed on glassfish server (written using java/jaxws/netbeans) which is successfully invoked by my tcl webservice client. The soap messages exchange look just fine. However, on client side after calling glassfish webservice, I receive extra header which I'm not sure how it is returned and what to do with this and why it is displayed on my screen

set xns [dict get [::WS::Utils::GetServiceTypeDef Client CalculatorWS tns1:add] xns] definition {param1 {type xs:int comment {}} param2 {type xs:int comment {}}} xns tns1
result is :7

here is my sample tcl ws client code:

package require WS::Client
::WS::Client::GetAndParseWsdl http://xxxx.xx.xx.com:8099/CalculatorWS/CalculatorWS?wsdl
set param1 5
set param2 2
set inputs [list param1 $param1 param2 $param2]
set result [ ::WS::Client::DoCall CalculatorWS add $inputs]
set res [dict get $result return]
puts "result is :$res"

Can anyone please help me how to prevent this header to be printed/displayed? Am I missing something?

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
user981116
  • 55
  • 4
  • 10

1 Answers1

2

What Johannes13 said in the comment.

This doesn't happen on my ancient version of tclws, but downloading the latest, there are just a bunch of puts statements left in there for debugging. Which is weird, because tclws uses the log package and also has plenty of ::log::log debug statements in the code which would make it easier to turn on/off.

To solve your problem, you could just grep the tclws package and remove those lines, or replace those puts statements with ::log::log debug. It isn't a simple search and replace, because tclws does use puts to write to the socket in the server code. But if you are only using the client, there are few enough instances in the ClientSide.tcl and Utilities.tcl files to handle manually.

ramanman
  • 863
  • 4
  • 7
  • Thanks, disabling puts in ClientSide.tcl did the job. – user981116 Feb 03 '13 at 10:11
  • You might want to [report](https://core.tcl.tk/tclws/reportlist) the presence of debugging messages that aren't going via the log as a bug. If you've not got a “real” login, just log in as `anonymous`. – Donal Fellows Feb 03 '13 at 16:27