Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SOAPpy help needed

Reply
Thread Tools

SOAPpy help needed

 
 
rhayader rhayader is offline
Junior Member
Join Date: Mar 2009
Posts: 1
 
      03-18-2009
Hi everyone.

I have a PHP script which works and i need to write the same in Python but SOAPpy generates a slightly different request and i'm not sure how to fix it so the server likes it.

The request generated by php script looks like this (removed http's from links):

Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="marketing.ews.yahooapis.com/V4"
>
<SOAP-ENV:Header>
<ns1:username>*****</ns1:username>
<ns1:password>*****</ns1:password>
<ns1:masterAccountID>*****</ns1:masterAccountID>
<ns1:accountID>6674262970</ns1:accountID>
<ns1:license>*****</ns1:license>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getCampaignsByAccountID>
<ns1:accountID>6674262970</ns1:accountID>
<ns1:includeDeleted>false</ns1:includeDeleted>
</ns1:getCampaignsByAccountID>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When trying to make the same using SOAPPy i get this request:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="w3.org/1999/XMLSchema"
>
<SOAP-ENV:Header>
<username xsi:type="xsd:string">*****</username>
<masterAccountID xsi:type="xsd:string">*****</masterAccountID>
<license xsi:type="xsd:string">*****</license>
<accountID xsi:type="xsd:integer">6674262970</accountID>
<password xsi:type="xsd:string">*****</password>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getCampaignsByAccountID xmlns:ns1="marketing.ews.yahooapis.com/V4">
<includeDeleted xsi:type="xsd:boolean">False</includeDeleted>
<accountID xsi:type="xsd:integer">6674262970</accountID>
</ns1:getCampaignsByAccountID>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
A slightly different request but i guess it should work but i get an error from the server: "Account ID specified in the header does not match the one specified in the parameter."

But they do match!

The only thing i see is some difference in namespaces, but i have no idea what to do right now. Please help.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAPpy help needed somemilk Python 1 03-18-2009 03:38 PM
Need help with SOAPpy -- how to supply user credentials? Roy Smith Python 0 09-04-2006 08:55 PM
need SOAPpy help Sells, Fred Python 1 03-23-2006 04:43 AM
SOAPpy and .NET - Help Richard Kessler Python 1 11-03-2004 09:18 AM
SOAPpy help N Python 0 10-01-2003 12:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57