Web service client using https

  • Thread starter welcomestocontact
  • Start date
W

welcomestocontact

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()

Please guid me to access web service.

Thanks
Allavarapu
 
L

Lawrence D'Oliveiro

In message <[email protected]>,
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)

Does it work over non-secure HTTP, just for comparison? (I know, don't do it
for production use, only for testing.)

Are you able to compare your code with some other working code? You could
try concatenating the complete request into a text file and sending that
with wget, to see if it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top