473,462 Members | 1,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

soap - sessions ?

H!

When I use php code nusoap everything works but with python I get
everytime "Your session key does not exist or has expired"

I use this code below:

test = SOAPpy.SOAPProxy("http://secure.easynic.com/com/iomart/
easynicWSv2.cfc?wsdl")
data = test.login(_id='test',_pass='pass')
for item in data:
for item2 in item:
if item2['key']=='KEY':
EASYKEY = item2['value']

# now I have the EASYKEY

# create a customer with the key,
# print output = "Your session key does not exist or has
expired"
print test.createOrUpdateContact(key=EASYKEY,
title=row[0],
firstname=row[2],
initials=row[3],
lastname=row[4],
company=row[5],
phone=row[9],
fax='',
email=row[13],
address1=straat,
address2='',
address3='',
area=row[12],
city=row[8],
country=row[12],
postcode=row[7],
acc_username='',
acc_password='',
domaincontactid='')

# logout , and this works ! (using the same key)
test.logout(key=EASYKEY)

With php this works:

// get the key $_SESSION[CODElogin]
$result = $soapClient->call('login',$params,$_SESSION[serverip],
$_SESSION[serverip])

// make a customer
$params = array(
'key' =$_SESSION[CODElogin],
'title' =$_POST[title],
'firstname' =$_POST[firstname],
'initials' =$_POST[initials],
'lastname' =$_POST[lastname],
'company' =$_POST[company],
'phone' =$_POST[phone],
'fax' =$_POST[fax],
'email' =$_POST[email],
'address1' =$_POST[address1],
'address2' =$_POST[address2],
'address3' =$_POST[address3],
'area' =$_POST[area],
'city' =$_POST[city],
'country' =$_POST[area],
'postcode' =$_POST[postcode],
'acc_username' =$_POST[acc_username],
'acc_password' =$_POST[acc_password],
'domaincontactid'=$_POST[domaincontactid]
);

// send
$result = $soapClient->call('createOrUpdateContact',$params,'http://
secure.easynic.com/com/iomart/easynicWSv2.cfc?wsdl','http://
secure.easynic.com/com/iomart/easynicWSv2.cfc?wsdl');

and everything works, what can I do to make this with python ?
or must I use exec("phpprogram.php") ? (I hope not)

Thanks

Jun 8 '07 #1
1 2242
When I use
SOAPpy.Config.dumpSOAPOut = 1
SOAPpy.Config.dumpSOAPIn = 1

will display:

*** Outgoing SOAP
************************************************** ****
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<createOrUpdateContact SOAP-ENC:root="1">
<domaincontactid href="#i1"/>
<city href="#i2"/>
<fax href="#i1"/>
<firstname href="#i3"/>
<area href="#i4"/>
<country href="#i4"/>
<address2 href="#i1"/>
<address3 href="#i1"/>
<phone href="#i5"/>
<title href="#i6"/>
<postcode href="#i7"/>
<key href="#i8"/>
<lastname href="#i9"/>
<acc_password href="#i1"/>
<address1 href="#i10"/>
<company href="#i11"/>
<email href="#i12"/>
<acc_username href="#i1"/>
<initials href="#i13"/>
</createOrUpdateContact>
<domaincontactid xsi:type="xsd:string" id="i1" SOAP-ENC:root="0"></
domaincontactid>
<city xsi:type="xsd:string" id="i2" SOAP-ENC:root="0">fsdfsd</city>
<firstname xsi:type="xsd:string" id="i3" SOAP-ENC:root="0">sdfsad</
firstname>
<area xsi:type="xsd:string" id="i4" SOAP-ENC:root="0">NL</area>
<phone xsi:type="xsd:string" id="i5" SOAP-ENC:root="0">+31.243770011</
phone>
<title xsi:type="xsd:string" id="i6" SOAP-ENC:root="0">M</title>
<postcode xsi:type="xsd:string" id="i7" SOAP-ENC:root="0">3432VD</
postcode>
<key xsi:type="xsd:string" id="i8" SOAP-
ENC:root="0">EASYNICAPI2_3057578_53854283</key>
<lastname xsi:type="xsd:string" id="i9" SOAP-ENC:root="0">dfasdf</
lastname>
<address1 xsi:type="xsd:string" id="i10" SOAP-ENC:root="0">dfasdf 3</
address1>
<company xsi:type="xsd:string" id="i11" SOAP-ENC:root="0">safasdf</
company>
<email xsi:type="xsd:string" id="i12" SOAP-
ENC:root="0">in**@emasdfil.com</email>
<initials xsi:type="xsd:string" id="i13" SOAP-ENC:root="0">fsdfas</
initials>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************** **********************
*** Incoming SOAP
************************************************** ****
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
<soapenv:Body>
<createOrUpdateContactResponse soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/">
<createOrUpdateContactReturn href="#id0"/>
</createOrUpdateContactResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:Map"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://xml.apache.org/xml-soap">
<item>
<key xsi:type="ns2:string" xmlns:ns2="http://www.w3.org/2001/
XMLSchema">RESPONSECODE</key>
<value xsi:type="ns3:string" xmlns:ns3="http://www.w3.org/2001/
XMLSchema">999</value>
</item>
<item>
<key xsi:type="ns4:string" xmlns:ns4="http://www.w3.org/2001/
XMLSchema">RESPONSETEXT</key>
<value xsi:type="ns5:string" xmlns:ns5="http://www.w3.org/2001/
XMLSchema">Your session key does not exist or has expired</value>
</item>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
************************************************** **********************

Jun 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ivan Voras | last post by:
Is anybody using SOAP with Python "seriously"? It seems there's a number of implementations out there, but most aren't developed any more. Specifically, I hadn't found a library that supports...
2
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when...
5
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I...
1
by: The Doctor | last post by:
Dear all, I am currently trying to re-implement an existing connection-oriented locking mechanism that was originally written in C. The company that supplied us the original system has recently...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
1
by: Sebastian Araya | last post by:
Hello, I'm facing a little problem with php 5.1 and SOAP sessions. I've built a class which uses a few internal objects to solve a query, named CWebService, and I've issued a: $objServer...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.