Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old January 9th, 2004, 06:44 PM
JuiceMan JuiceMan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 10 JuiceMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sweeet.

Any help would be appreciated.

Joe

Reply With Quote
  #17  
Old January 9th, 2004, 10:11 PM
oxygenthief oxygenthief is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 35 oxygenthief User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Just noticed in the script you posted to the python list that you had Content Length misspelled. If thats not the problem, heres my best shot ;-)

Ok, I thought I had saved some of the script that I had used, it looks like the only thing I have is an old test script, but IIRC, it should still work. Here's your script modified.

Code:
#!/usr/bin/env python
import httplib
# triple quotes make it a little easier to read
# and also speed it up a wee bit, no concat
soap = """<?xml version="1.0" encoding="utf-8"?>
<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:Body>
<checkPassword
        xmlns="EDIT:PUT YOUR NAMESPACE HERE">
        <employeeID>XXXXXX</employeeID>
        <password>XXXXXX</password>
        <accessCode>XXXXX</accessCode>
</checkPassword>
</soap:Body>
</soap:Envelope>"""

# assuming its on port 80
conn = httplib.HTTPConnection('insidecoair5', 80)
# so we can see our debug messages, and the
# actual packet the script will be sending
conn.set_debuglevel(3)
#n = conn.send(data)
conn.request('POST', 'EDIT: PUT YOUR PAGE ACTION HERE', soap,
        {'Content-Type':'text/xml; charset=utf-8"',
        'Content-Length':str(len(soap)),
        'Accept':'text/xml; charset=utf-8',
        'SOAPAction':'EDIT: REPLACE THIS WITH YOUR ACTION'})
resp = conn.getresponse()
data = resp.read()
# our returned packet
print data


Lemme know if that helps any. If it doesn't work, post the entire debug output (or PM it to me if its sensitive in nature and you don't want it posted in the forums).

EDIT: Removed some of the page stuff because it put quotes around it. Just replace the EDIT stuff with the logical thing that goes there ;-)

Last edited by oxygenthief : January 9th, 2004 at 10:13 PM.

Reply With Quote
  #18  
Old January 16th, 2004, 04:57 PM
JuiceMan JuiceMan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 10 JuiceMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry, i was away on a trip.

Thanks oxygen for all your help. I got it to work using the get method.

Joe

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Python And Soap


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT