Thanks Dietz for your earlier replies that helped me avoid some dead
ends.
I'm still trying to get the basics to work with Python server-side web
service.
Since tgwebservices is not compatible with tg 2.0, I need to use either
tg1.0 or a different technique.

It turns out that the approach I thought I could use of parsing the soap
request via a generic mod_python function is not working.  More
accurately it reveals that I don't have sufficient understanding of
what's really happening and really need some help.  While I know python
well, my soap experience is limited to clients and I built the entire
XML request via strings and the %s operator.  Now that I have to do the
server, I cannot seem to get as far as receiving the soap xml and just
parsing it -- perhaps not elegant but adequate.
I know my client side test code is good because I use it with another
vendor's web service.
I've tried this code based on an existing mod_python implementation with
Python 2.4 and Apache 2.2
The HTTP works, just to verify I don't have a really dumb error
http://192.168.204.216/python/hrapi/RetrieveDataByXMLStream?a=3&b=abcd
returns
RetrieveDataByXMLStream  method (())  {'a': '3', 'b': 'abcd'}
As expected
------------server side code -------------------
The mod_python code is installed at
/var/www/python/hrapi/index.py and is shown below (edited for brevity)
def RetrieveDataByXMLStream(req, *args,  **kwargs):
    req.content_type = 'text/plain'
    text = 'RetrieveDataByXMLStream  method (%s)  %s'  % 
                  ( str(args), str(kwargs)  )
    return text
____________________________________________
I get the following error 'COMMERROR status=501, reason=Method Not
Implemented'

-----------------------Client side code------------------
class HTTPConnection(httplib.HTTPConnection):
        def xrequest(self, method, url, body=None, headers={}):
            print '===========================Exedute Request'
            print 'headers', headers
            print 'method', method
            print 'url', url
            print 'body', body
            response = self.request(method, url, body, headers)
            print 'response', response
            return response

-------------------debug output on client side--------------
===========================Exedute Request
headers {'SOAPAction':
'http://www.ResourceSystem.com/EIS/RetrieveDataByXMLStream',
'Content-type': 'text/xml', 'Accept': 'text/xml'}
method POST
url /python/hrapi/test1
body
<soap:Envelope 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <EISAuthHeader xmlns="http://www.ResourceSystem.com/EIS/";>
      <AuthorizationCode>zzzzzz(editied for
security)z</AuthorizationCode>
    </EISAuthHeader>
  </soap:Header>  
    <soap:Body> 
    <RetrieveDataByXMLStream xmlns="http://www.ResourceSystem.com/EIS/";>
       <IncomingXMLStream>
             &lt;Parameter xmlns="urn:inputparameters-schema"&gt;
            &lt;ReportName&gt;Compressed ADL
Interface&lt;/ReportName&gt;
            &lt;FilterList&gt;
                        .... snipped for brevity ....
            &lt;/FilterList&gt;
         &lt;/Parameter&gt;
        </IncomingXMLStream>
    </RetrieveDataByXMLStream>
  </soap:Body>
</soap:Envelope>  

I would appreciate any help you can provide.
Thanks,
Fred.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to