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

  • SEARCH
  • Home
  • 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 663687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:31:01+00:00 2026-05-13T23:31:01+00:00

So I’m trying to access this api https://www.clarityaccounting.com/api-docs/ using SUDS. Here is the code

  • 0

So I’m trying to access this api https://www.clarityaccounting.com/api-docs/ using SUDS. Here is the code that should work:

from suds.client import Client
client = Client('https://www.clarityaccounting.com/api/v1?wsdl')
token = client.service.doLogin('demo', 'demo', 'www.kashoo.com', 'en_US', 300000)

But I get this error:

WebFault: Server raised fault: 'No such operation:  (HTTP GET PATH_INFO: /api/v1)'

Their support guy says that the request should look like this:

<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:api="http://api.service.books/">
  <SOAP-ENV:Body>
     <api:doLogin>
        <username>demo</username>
        <password>demo</password>
        <siteName>www.kashoo.com</siteName>
        <locale>en_US</locale>
        <duration>300000</duration>
     </api:doLogin>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

But SUDS’ looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:ns0="http://api.service.books/" 
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <ns1:Body>
      <ns0:doLogin>
         <username>demo</username>
         <password>demo</password>
         <siteName>www.kashoo.com</siteName>
         <locale>en_US</locale>
         <duration>300000</duration>
      </ns0:doLogin>
   </ns1:Body>
</SOAP-ENV:Envelope>

I’m a real SOAP and SUDS newbie but I heard that SUDS is the best SOAP library to use from here: What SOAP client libraries exist for Python, and where is the documentation for them?

So my question is simply what are the crucial parts that are different and that are making the request fail and how can I configure SUDS to send the properly formatted request?

  • 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-05-13T23:31:02+00:00Added an answer on May 13, 2026 at 11:31 pm

    At first glance looks like the problem you’re having is with SSL. You are accessing an https URL, and the Transport handler for suds.client talks http by default.

    The problem
    If you look at the bottom of the WSDL it is specifying the default location as http://www.clarityaccounting.com/api/v1, which is an http URL, but the WSDL is SSL.

     <wsdl:service name="v1">
        <wsdl:port binding="tns:v1SoapBinding" name="BooksApiV1Port">
          <soap:address location="http://www.clarityaccounting.com/api/v1"/>
        </wsdl:port>
     </wsdl:service>
    

    If you do an http GET on that URL, you get the error message you received:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
            <soap:Fault>
                <faultcode>soap:Server</faultcode>
                <faultstring>No such operation:  (HTTP GET PATH_INFO: /api/v1)</faultstring>
            </soap:Fault>
        </soap:Body>
    </soap:Envelope>
    

    The Solution
    To fix this you need to override the default location when you call the Client constructor to make it stick with https:

    >>> url
    'https://www.clarityaccounting.com/api/v1?wsdl'
    >>> client = Client(url, location='https://www.clarityaccounting.com/api/v1')
    >>> token = client.service.doLogin('demo', 'demo', 'www.kashoo.com', 'en_US', 300000)
    >>> token
    (authToken){
       authenticationCode = "ObaicdMJZY6UM8xZ2wzGjicT0jQ="
       expiryDate = 2010-03-05 12:31:41.000698
       locale = "en_US"
       myUserId = 4163
       site = "www.kashoo.com"
     }
    

    Victory!

    Pro tip for future debugging purposes: Turn on full logging debugging. SUDS uses the standard logging library, so it gives you a lot of control. So I cranked it all up to DEBUG:

    import logging
    logging.basicConfig(level=logging.INFO)
    logging.getLogger('suds.client').setLevel(logging.DEBUG)
    logging.getLogger('suds.transport').setLevel(logging.DEBUG)
    logging.getLogger('suds.xsd.schema').setLevel(logging.DEBUG)
    logging.getLogger('suds.wsdl').setLevel(logging.DEBUG)
    

    This is what helped me narrow it down, because it was clearly saying it was sending over http:

    DEBUG:suds.transport.http:sending:
    URL:http://www.clarityaccounting.com/api/v1
    (xml output omitted)
    

    And then the response said so as well:

    DEBUG:suds.client:http failed:
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 442k
  • Answers 442k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer scheduledTimerWithTimeInterval returns an instance of NSTimer. Just use properties and… May 15, 2026 at 6:02 pm
  • Editorial Team
    Editorial Team added an answer You need to "persist" that counter -- simplest is to… May 15, 2026 at 6:02 pm
  • Editorial Team
    Editorial Team added an answer The CSS z-index property only works on positioned elements. So… May 15, 2026 at 6:02 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.