Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:28:55+00:00 2026-06-11T06:28:55+00:00

updated below Does anybody have an example of proper XML for the Magento SOAP

  • 0

updated below

Does anybody have an example of proper XML for the Magento SOAP v1 API to do something along the lines of the following?

client.call(session_token,'sales_order.list', {'filters':{'order_id':{'eq':12}}})

This is an example of the python suds call that is not working for me. Really, any example XML that filters sales_order.list, catalog_product.list, or customer.list would do. I have it working for the XMLRPC version already, but with python’s SUDS and the SOAP v1 API, no matter what the filter, I get the entire list unfiltered as response. Here’s what the XML currently looks like:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="urn:Magento" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns4:call>
<sessionId xsi:type="ns2:string">6634e1bd1004557677222fd81e809884</sessionId>
<resourcePath xsi:type="ns2:string">sales_order.list</resourcePath>
<args xsi:type="ns0:args">
<filters xsi:type="ns2:filters">
<order_id xsi:type="ns2:order_id">
<eq xsi:type="ns2:string">7</eq>
</order_id>
</filters>
</args>
</ns4:call>
</ns1:Body>

Of course I’ve already tried a million other variations on the above. I’m just wondering if my calls are correct and I’ve got a bad schema, or if the soap server’s wonky, or what. Thus, if anyone has some proven correct XML to try to emulate, it’d help a lot.

Thanks!

update:

as per the first answer I’ve received so far, I’ve actually tried that format for filters already. The documentation for the Magento API is, as we know, varied, conflicting, and incomplete. here’s the XML:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="urn:Magento" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns4:call>
<sessionId xsi:type="ns2:string">93c7aaab38adaab5db732b211e5b</sessionId>
<resourcePath xsi:type="ns2:string">sales_order.list</resourcePath>
<args xsi:type="ns0:args">
<filter xsi:type="ns2:filter">
<value xsi:type="ns2:string">123</value>
<key xsi:type="ns2:string">order_id</key>
</filter>
</args>
</ns4:call>
</ns1:Body>
</SOAP-ENV:Envelope>

or possibly:

<ns1:Body>
<ns4:call>
<sessionId xsi:type="ns2:string">93c74cb7ef0baaaaab5db732b211e5b</sessionId>
<resourcePath xsi:type="ns2:string">sales_order.list</resourcePath>
<args xsi:type="ns0:args">
<filter xsi:type="ns2:filter">
<value xsi:type="ns2:value">
<value xsi:type="ns2:string">123</value>
<key xsi:type="ns2:string">eq</key>
</value>
<key xsi:type="ns2:string">order_id</key>
</filter>
</args>
</ns4:call>
</ns1:Body>
</SOAP-ENV:Envelope>

which looks like this:

{'filter':[{'key':'order_id','value':{'key':'eq','value':'123'}}]}

in python.

And those still return all orders (eventually…). So, as I mentioned, if anybody can actually give me some XML to emulate, it might be more useful. I’m likely going to root through the Magento source tomorrow and solve my own problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:28:56+00:00Added an answer on June 11, 2026 at 6:28 am

    Well, I had to brush off (and learn) my PHP, but I have the answer here if any other poor saps come along and want to use SUDS (or python in general) with Magento.

    this xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body><ns1:call><sessionId xsi:type="xsd:string">bc11488aaae84c841ac237ea7f24ef</sessionId>
    <resourcePath xsi:type="xsd:string">sales_order.list</resourcePath>
    <args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
    <item xsi:type="ns2:Map">
    <item>
    <key xsi:type="xsd:string">order_id</key>
    <value xsi:type="ns2:Map">
    <item>
    <key xsi:type="xsd:string">from</key>
    <value xsi:type="xsd:string">11</value>
    </item>
    <item>
    <key xsi:type="xsd:string">to</key>
    <value xsi:type="xsd:string">12</value>
    </item>
    </value>
    </item>
    </item>
    </args>
    </ns1:call>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

    is created by this php:

    #! /usr/bin/php5
    <?php
    $client = new SoapClient('http://ip.ip.ip.ip/magento/index.php/api/?wsdl', array('trace'=>TRUE));
    $session = $client->login('username', 'password');
    $params = array(array(
            'order_id' =>
              array(
                'from' => '10',
                'to' => '12')));
    
    
    
    $result = $client->call($session, 'sales_order.list', $params);
    $resultXML = $client->__getLastRequest();
    print($resultXML);
    ?>
    

    Of course, it turns out that there are also sorts of SOAP-related encoding issues around Magento’s particular implementation of the protocol – it seems as tho it’s designed to work with the PHP Soap client, but not really with anything else. But this XML dump did allow me to hack around and get the SUDS connection off the ground – send me a message if you’re curious. Oh, and a hat tip to @alanstorm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query below that I use to retrieve the records not updated
I have a web application that does the following: You click a button to
I have a stored proc that does inserts of people. I have an xml
ORIGINAL (see UPDATED QUESTION below) I am designing a new laboratory database that tests
UPDATED See post #3 below. There is a need to upload a file to
Updated question, see below I'm starting a new project and I would like to
EDIT: Updated with suggestions from Bill Karwin below. Still very slow. I'm trying to
Below is my understanding about the log file group. Whenever innodb tables were inserted/updated
I have a problem when trying to execute this update statement (below) using C#
In a vanilla install of Magento 1.5.1.0 I have created simple products COLOR-RED, COLOR-BLUE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.