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 8355477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:52:29+00:00 2026-06-09T09:52:29+00:00

I am trying to access the SOAP api using SUDS in python from suds.client

  • 0

I am trying to access the SOAP api using SUDS in python

from suds.client import Client
def initialize():
    url = 'http://uuuuuuuuuuuuuuu.com/wewewe/WsNBI?wsdl'
    username = 'xxxxx'
    password = 'ppppppp'
    client = Client(url)
    print client
    result = client.service.Login(nbiLogin NBILogin(username,password),)
    print result

i am unable to invoke the Login method, any idea how i can do this?

these are the methods returned by the query…

Suds ( https://fedorahosted.org/suds/ )  version: 0.4 GA  build: R699-20100913

Service ( WsNBIService ) tns="www.test.com"
   Prefixes (1)
      ns0 = "www.test.com"
   Ports (1):
      (WsNBIPort)
         Methods (5):
            GetClientAssociationInfo(nbiSession NBISession, clientAssociationReqData ClientAssociationReqData, )
            GetEvent(nbiSession NBISession, eventReqData EventReqData, )
            GetZDClientAssociationInfo(nbiSession NBISession, clientAssociationReqData ClientAssociationReqData, )
            Login(nbiLogin NBILogin, )
            Logout(nbiSession NBISession, )
         Types (22):
            GetClientAssociationInfo
            GetClientAssociationInfoResponse
            GetEvent
            GetEventResponse
            GetZDClientAssociationInfo
            GetZDClientAssociationInfoResponse
            Login
            LoginResponse
            Logout
            LogoutResponse
            authenticateResult
            clientAssociationDetail
            clientAssociationReqData
            clientAssociationResult
            eventDetail
            eventReqData
            eventResult
            eventType
            nbiLogin
            nbiResult
            nbiSession
            requestType

UPDATE:

#!/usr/bin/env python

from suds.client import Client

def initialize():
    url = 'http://xxxxxxx/xxxx/WsNBI?wsdl'
    username = 'xxxxx'
    password = 'pppppp'
    client = Client(url)
    login = client.factory.create("ns0:NBILogin")
    print login
    ws = login.nbiLogin(userName=username, password = password)
    result = client.service.Login(ws)
    print result
def main():
    initialize()

if __name__ == "__main__":
    main()


[root@server scripts]# ./flex_soap.py
(nbiLogin){
   UserName = None
   Password = None
 }
Traceback (most recent call last):
  File "./flex_soap.py", line 19, in ?
    main()
  File "./flex_soap.py", line 16, in main
    flexMaster()
  File "./flex_soap.py", line 12, in flexMaster
    ws = login.nbiLogin(userName=username, password = password)
AttributeError: nbiLogin instance has no attribute 'nbiLogin'

UPDATE:

#!/usr/bin/env python

from suds.client import Client

def initialize():
    url = 'http://xxxxx/intune/WsNBI?wsdl'
    username = 'uuuuu'
    password = 'pppp'
    client = Client(url)
    print client
    login = client.factory.create("ns0:NBILogin")
    print login
    login.UserName = username
    login.Password = password
    result = client.service.Login(login)
    print result
    event = client.factory.create("ns0:EventReqData")
    print event
def main():
    initialize()

if __name__ == "__main__":
    main()

[root@server scripts]# ./flex_soap.py

(nbiLogin){
   UserName = None
   Password = None
 }
(authenticateResult){
   Success = True
   Session =
      (nbiSession){
         Id = "0eda1622-473c-4dd6-b68e-4ff3c1ee27f6"
      }
 }
(eventReqData){
   EventType =
      (eventType){
         value = None
      }
   SerialNumbers =
      (SerialNumbers){
         SerialNumber[] = <empty>
      }
 }

any idea how i can get this method

GetEvent(nbiSession NBISession, eventReqData EventReqData, )
  • 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-09T09:52:30+00:00Added an answer on June 9, 2026 at 9:52 am

    Your code is not a valid Python. Login(nbiLogin NBILogin, ) means that there is a method Login that accepts a single argument of type NBILogin. It is not a literal syntax that you should use. Try something like this:

     login = client.factory.create("ns0:NBILogin")
     login.UserName = username 
     login.Password = password 
     result = client.service.Login(login)
    

    This output:

    (authenticateResult){
       Success = True
       Session =
          (nbiSession){
             Id = "0eda1622-473c-4dd6-b68e-4ff3c1ee27f6"
          }
     }
    

    means that result.Success == True and result.Session.Id == "0eda1622-473c-4dd6-b68e-4ff3c1ee27f6".

    GetEvent(nbiSession NBISession, eventReqData EventReqData, ) means that you need 2 arguments of types NBISession and EventReqData.

    The session you could get from result. To build EventReqData:

    (eventReqData){
       EventType =
          (eventType){
             value = None
          }
       SerialNumbers =
          (SerialNumbers){
             SerialNumber[] = <empty>
          }
     }
    

    you need to create EventType and SerialNumbers:

    event_req_data = client.factory.create("ns0:EventReqData")
    event_req_data.EventType = "put some appropriate event type here"
    event_req_data.SerialNumbers = [10, 51, 1] # some serial numbers 
    

    The above assumes that serial numbers are integers otherwise create each SerialNumber the same way as all other objects via client.factory.create():

    sns = event_req_data.SerialNumbers = client.factory.create('ns0:SerialNumbers')
    for item in [10, 51, 1]:
        ns = client.factory.create('ns0:SerialNumber')
        ns.value = item
        sns.SerialNumber.append(ns)
    

    I don’t see SerialNumbers, SerialNumber types in the listing so it might fail.

    If suds doesn’t convert from string to EventType by itself then you could create EventType using client.factory.create() explicitly:

    event_type = client.factory.create("ns0:EventType")
    event_type.value = "put some appropriate event type here"
    event_req_data.EventType = event_type
    

    Make the call:

    event = client.service.GetEvent(login.Session, event_req_data)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access a SOAP API using Suds. The SOAP API documentation states
I'm trying to develop a soap client that will access data over the OPC
I'm trying to access a soap webservice from a jsp page. I need something
I am trying to create a client library to access Mantis from java. The
I am using ColdFusion 8. I am trying to access my SOAP response nodes.
I am trying to access a webservice from my server using this tutorial consume
I am trying to access https://tfspreview.com SOAP interface from my command line Java app.
I'm trying to access a SOAP service I don't control. One of the actions
Trying to access a Servlet from a button on HTML page //Html Page FORM
I am trying to access all the data from database listOfFolder table folder and

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.