SOAPpy help needed

Discussion in 'Python' started by rhayader, Mar 18, 2009.

  1. rhayader

    rhayader

    Joined:
    Mar 18, 2009
    Messages:
    1
    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.
     
    rhayader, Mar 18, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. N

    SOAPpy help

    N, Oct 1, 2003, in forum: Python
    Replies:
    0
    Views:
    460
  2. Richard Kessler

    SOAPpy and .NET - Help

    Richard Kessler, Nov 1, 2004, in forum: Python
    Replies:
    1
    Views:
    335
    Stefan Behnel
    Nov 3, 2004
  3. Sells, Fred

    need SOAPpy help

    Sells, Fred, Mar 23, 2006, in forum: Python
    Replies:
    1
    Views:
    315
    Ravi Teja
    Mar 23, 2006
  4. Roy Smith
    Replies:
    0
    Views:
    348
    Roy Smith
    Sep 4, 2006
  5. somemilk

    SOAPpy help needed

    somemilk, Mar 18, 2009, in forum: Python
    Replies:
    1
    Views:
    1,185
    Piet van Oostrum
    Mar 18, 2009
Loading...

Share This Page