Python Siteminder Username / Password
I am using a python script to connect to a Siteminder protected wsdl for a SOAP query.  I set up urllib2 to not redirect, and instead handle the redirects manually through my code.  The redirects follow the steps [here](http://www.codeproject.com/KB/IP/SiteminderHttpWebRequest/smfig1.jpg) properly.  I cannot seem to get the right cookies from the Agent/Server though.  I end up with an "ASPSESSIONIDQSAACATC" cookie but no sm-session as I need.  The curious thing about the ASPsession cookie is that it appears whether I submit login info or not.

I am passing my username and password like this:

    # code redirecting around to the point of passing credentials
    postData = ''
    postData += "postpreservationdata=&"
    postData += "USER=" + user  + "&"
    postData += "PASSWORD=" + pw
    
    # redirect from previous response, where we will send
    AgentUrl=response.info()['Location']
    response.close()
    request = Request(AgentUrl, postData)
    response = opener.open(request)

I am assuming that my encoding is incorrect, but none of the onlnie documentation I have read says anything.  I have also tried it with urlencode, base64 encode, and combinations of them, but all with the same (no) results.

Does anyone with more background in siteminder/python know what I am missing or doing wrong?

Thanks in advance!
Python Siteminder Username / Password
===

I am using a python script to connect to a Siteminder protected wsdl for a SOAP query.  I set up urllib2 to not redirect, and instead handle the redirects manually through my code.  The redirects follow the steps [here](http://www.codeproject.com/KB/IP/SiteminderHttpWebRequest/smfig1.jpg) properly.  I cannot seem to get the right cookies from the Agent/Server though.  I end up with an "ASPSESSIONIDQSAACATC" cookie but no sm-session as I need.  The curious thing about the ASPsession cookie is that it appears whether I submit login info or not.

I am passing my username and password like this:

    # code redirecting around to the point of passing credentials
    postData = ''
    postData += "postpreservationdata=&"
    postData += "USER=" + user  + "&"
    postData += "PASSWORD=" + pw
    
    # redirect from previous response, where we will send
    AgentUrl=response.info()['Location']
    response.close()
    request = Request(AgentUrl, postData)
    response = opener.open(request)

I am assuming that my encoding is incorrect, but none of the onlnie documentation I have read says anything.  I have also tried it with urlencode, base64 encode, and combinations of them, but all with the same (no) results.

Does anyone with more background in siteminder/python know what I am missing or doing wrong?

Thanks in advance!