I guess I ought to explain what I'm having difficulties with.
I have a server, written in python, which uses soaplib
(http://trac.optio.webfactional.com/), and a client to this server
written using gSOAP. All the server does is takes two ints, adds them
together, and returns the results. So I have a .h file that looks like
this:
//gsoap ns1 service name: HelloWorldService
//gsoap ns1 service port: http://localhost:7789
//gsoap ns1 service namespace: urn:HelloWorldService.HelloWorldService
int ns1__add(int lhs, int rhs, int &);
I compile the client ok. When I run it, I get the following:
SOAP 1.1 fault: SOAP-ENV:Client[no subcode]
"Validation constraint violation: tag name or namespace mismatch in
element <addResponse>"
Detail: [no detail]
From RECV.log:
HTTP/1.1 200 OK
Content-type: text/xml
Date: Fri, 11 Jul 2008 18:55:23 GMT
Server: CherryPy/2.3.0
Connection: close
<SOAP-ENV:Envelope xmlns="HelloWorldService.HelloWorldService"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="HelloWorldService.HelloWorldService"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
<SOAP-ENV:Body>
<addResponse>
<retval xmlns="" xsi:type="xs:int">10</retval>
</addResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
So gSOAP is calling the service OK, (with 5+5). This response shows
that my service function got called, and returned 10. But gSOAP chokes
on the response, with the message above. My first assumption is that
the server was screwing up by not prefacing 'addResponse' with the
service name, i.e. 'tns:addResponse' (hence my original post). Is this
the problem? And if so is there a workaround?
Thanks,
Ray
Post by Bruce EdgeI'm using the ZSI python libs. I can't say that I love it, but it does work.
Its shortcoming IMHO is the creation of complex data type request packets.
I often resort to firing off a query that returns one of the deep
structs that I need, then filling it out with my request :-(
-Bruce
?
Thx,
Ray Creager