Auth Object

Reply

Join Date: Nov 2008
Posts: 58
Reputation: adam291086 is an unknown quantity at this point 
Solved Threads: 0
adam291086 adam291086 is offline Offline
Junior Poster in Training

Auth Object

 
0
  #1
Nov 25th, 2008
Some languages like C# create an Auth object to authenticate themselves on a soap server.

for example
  1. cpLatestBrief.authValue = new auth();
  2. cpLatestBrief.authValue.username = "username"; // your aql username
  3. cpLatestBrief.authValue.password = "password"; // your aql password

how can you do this with python?
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,018
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 248
Sponsor
jlm699's Avatar
jlm699 jlm699 is offline Offline
Knows where his Towel is

Re: Auth Object

 
0
  #2
Nov 25th, 2008
Look into SOAPpy.
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 58
Reputation: adam291086 is an unknown quantity at this point 
Solved Threads: 0
adam291086 adam291086 is offline Offline
Junior Poster in Training

Re: Auth Object

 
0
  #3
Nov 25th, 2008
i am using SOAPpy but have no idea how to do the auth object. I have tried doing

  1. from SOAPpy import WSDL
  2. print "Content-type: text/html\n"
  3. wsdlFile = 'http://gw1.aql.com/soap/sendservice.php?WSDL'
  4. HTTPTransport.setAuthentication('username','password')
  5. server = WSDL.Proxy(wsdlFile, transport=HTTPTransport)
  6. print server.ApiVersion()

and i get nothing. From the company i am trying to connect to they are saying there is authentication errors
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,018
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 248
Sponsor
jlm699's Avatar
jlm699 jlm699 is offline Offline
Knows where his Towel is

Re: Auth Object

 
0
  #4
Nov 25th, 2008
I've never used SOAPpy myself, but there's a chapter about it in my favorite Python learning book: Dive Into Python Chapter 11
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 58
Reputation: adam291086 is an unknown quantity at this point 
Solved Threads: 0
adam291086 adam291086 is offline Offline
Junior Poster in Training

Re: Auth Object

 
0
  #5
Nov 26th, 2008
i have been using that tutorial, but it's aimed at using google. The authentication happens by using an API key. I need to use and Auth object.

If i do something like
  1. from SOAPpy import WSDL
  2. wsdlFile = 'http://gw1.aql.com/soap/sendservice.php?WSDL'
  3. server = WSDL.Proxy(wsdlFile)
  4. print server.methods.keys()
all the method keys are printed out but as soon as i put in some http authentication nothing is displayed

  1. wsdlFile = 'http://gw1.aql.com/soap/sendservice.php?WSDL'
  2. HTTPTransport.setAuthentication('adamplowman','AdAMicMAN')
  3. server = WSDL.Proxy(wsdlFile, transport=HTTPTransport)
  4. print server.methods.keys()
Anymore ideas?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC