Forum OpenACS Development: Re: Tclsoap - stuck on error

Collapse
Posted by Andrew T on
Ok i fixed it .. i had to manually call http::configure from my tcl script... now i have another problem. I can do the soap call but i get a Request Error:

Server response is not well-formed XML.
response was <?xml version='1.0' encoding='UTF-8'?>
<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">
<SOAP-ENV:Body>
<ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="ns1:GoogleSearchResult">
<documentFiltering xsi:type="xsd:boolean">false</documentFiltering>
<estimatedTotalResultsCount xsi:type="xsd:int">4430000</estimatedTotalResultsCount>
<directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[2]">
<item xsi:type="ns1:DirectoryCategory">
<specialEncoding xsi:type="xsd:string"></specialEncoding>
<fullViewableName xsi:type="xsd:string">Top/Regional/Middle_East/Cyprus/Recreation_and_Sports</fullViewableName>
</item>

............ ie the whole google response was outputted ...

  while executing
"$parseProc $procVarName $reply"
    (procedure "invoke2" line 17)
    invoked from within
"invoke2 $procVarName $reply"
    (procedure "::SOAP::invoke" line 25)
    invoked from within
"::SOAP::invoke ::SOAP::_doGoogleSearch

Collapse
Posted by Claudio Pasolini on
Hi Andrew,

I'm trying tclsoap with aolserver 4 and fortunately I have not had any problem with "package require SOAP". I simply put this command in one sourced tcl file:

ns_eval package require SOAP
but I'm getting the same problem invoking a web service that works just fine with tclsh, i.e. "Server response is not well-formed XML."

I tracked down the problem to the parse_soap_response proc, but before hacking it I wonder if you have already foun a solution.

Collapse
Posted by Nick Carroll on
Hi Claudio,

Did you manage to get tclsoap working in aolserver?

Nick.

Collapse
Posted by Claudio Pasolini on
Hi Nick,

I didn't have the time to experiment tclsoap, but I'm succesfully using the excellent William Byrne's soap-gateway in a couple of sites.