Re: I have a tclsoap server. Can I generate a WSDL file?



Dear Gerald,

Please forget my previous post. I am not interested anymore on why tclsoap does not work. I have tried your package, and works just fine with gsoap. I defined my webservice in Tcl, I used the generated wsdl from your package to build the gsoap client/server, and the gsoap client simply works with the tcl server.

The only problem I got with your package, it was to understand that I have to "name" the return value as "method-name"Result. I was using the name of my custom defined structure, which failed without an error...

Also, I want to ask a question: is Soap 1.2 supported, or only 1.1?
I wish this package was also in ActiveTcl :-)

Best regards,

George

O/H Georgios Petasis έγραψε:
O/H Gerald W. Lester έγραψε:
George Petasis wrote:
Hi all,

I am using tclsoap from ActiveTcl, to implement 2 simple functions as a web service. Is there a way to generate a wsdl file? I know that there is some code at http://www.geocities.com/blackboy9692002/tclsoap/, but is there a way without the need to patch the tclsoap library distributed with ActiveTcl?

George

George,

Using TclSoap you need to do it by hand.

If you use my WebServices package (which only serves up from TclHttpd) then it will generate the WSDL for you.


Thanks, for your suggestion (I didn't know about this package). However, I am on a tight schedule right now, and I have written all my code based on the tclSoap package that comes with ActiveTcl. However, as I have problems with the WSDL generation (I don't know how to write it by hand), I have applied a patch from http://www.geocities.com/blackboy9692002/tclsoap/soap-wsdl.zip. This is a package (soap-wsdl) that adds wsdl generation capabilities to tclSoap.
However, I am facing an interoperability problem with gsoap:

I have my server in tclSoap/TclHttpd, with a wsdl file generated by the soap-wsdl package (attached). I have used the wsdl file, and created a client & an server with gsoap. The gsoap client & server communicate with each other (of course), and the tclsoap client can call methods from the gsoap server. There is a problem however with the gsoap client, calling methods from the tclsoap server. The gsoap client responds with an error:

SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"Validation constraint violation: data type mismatch OET:StatusResult in element <return>"
Detail: [no detail]

Looking the XML responses from the gsoap server, I see this:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns1="OET">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<ns1:aboutResponse>
<return xsi:type="ns1:StatusResult">
<status xsi:type="xsd:int">0</status>
<result_int xsi:type="xsd:int">-1</result_int>
<result_dbl xsi:type="xsd:double">-1</result_dbl>
<result_str xsi:type="xsd:string">hello from about!</result_str>
</return>
</ns1:aboutResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

While the tclsoap server returns:

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/1999/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>
<SOAP-ENV:Body>
<ns:aboutResponse xmlns:ns="OET"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<return xsi:type="OET:StatusResult">
<result_dbl xsi:type="xsd:double">-1.0</result_dbl>
<status xsi:type="xsd:int">0</status>
<result_int xsi:type="xsd:int">-1</result_int>
<result_str xsi:type="xsd:string">idle</result_str>
</return>
</ns:aboutResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

It seems to me like a bug in gsoap. Any ideas?
(I want to return a structure unfortunately...)

George



.



Relevant Pages

  • Re: TclSOAP & eBay
    ... and the eBay API's way more complex than that. ... My current effort with TclSOAP 1.6.7 is obviously broken, ... package require SOAP ... SOAP::create GeteBayOfficialTime \ ...
    (comp.lang.tcl)
  • Re: SOAP request with repeated "sub record"
    ... I'm using the TclSOAP package for an automated test of a service and ... figured TclSOAP would be the way to go. ... So the long and short is if you are using a web service that provides a WSDL file, it may be easier to use the Web Service package. ... createElement tagName ?objVar? ...
    (comp.lang.tcl)
  • Re: SOAP request with repeated "sub record"
    ... I'm using the TclSOAP package for an automated test of a service and ... figured TclSOAP would be the way to go. ... So the long and short is if you are using a web service that provides a WSDL ... createElement tagName ?objVar? ...
    (comp.lang.tcl)
  • Re: SOAP request with repeated "sub record"
    ... I'm using the TclSOAP package for an automated test of a service and ... figured TclSOAP would be the way to go. ... So the long and short is if you are using a web service that provides a WSDL ... createElement tagName ?objVar? ...
    (comp.lang.tcl)
  • Re: I have a tclsoap server. Can I generate a WSDL file?
    ... I defined my webservice in Tcl, I used the generated wsdl from your package to build the gsoap client/server, and the gsoap client simply works with the tcl server. ...
    (comp.lang.tcl)