Web service client using https

welcomestocontact at gmail.com welcomestocontact at gmail.com
Thu Oct 4 03:40:48 EDT 2007


Hi All,

       I am trying to connect .NET web service using HTTPS. I wrote a
python script using https. For that need to send SOAP message to the
server. But it is giving error 401.3 execution access is denied.(SOAP
message not processing)
               I have a doubt can we access web services using HTTPS
only, or need to have any other.
          I am sending the code::
     [CODE]
import httplib
a=open('/root/Desktop/b.xml','r')

#SOAP message
Message=a.read()
h =httplib.HTTPS('hpc.msftlabs.com')
h.putrequest('PUT','/HPCBasicProfile/HPCBasicProfile.svc')
h.putheader('Accept','text/soap')
h.putheader('Content-type','text/jsl; charset="utf-8"')
h.putheader('Content-length','%s' % str(len(Message)))
h.putheader('SOAPAction','http://schemas.ggf.org/bes/2006/08/
besfactory/BESFactoryPortType/CreateActivity')
.endheaders()

h.send(Message)

errcode,errmsg, headers = h.getreply()
print errcode,errmsg, headers
f = h.getfile() # Get file object for reading data
data = f.read()
print data
f.close()
[/CODE]

Please guid me to access web service.

Thanks
Allavarapu




More information about the Python-list mailing list