Click here to Skip to main content
11,923,676 members (65,183 online)
Rate this:
Please Sign up or sign in to vote.
See more: Python Python2.4
Hi All,

I have a Username, Password and a ID ( A test account created with these details for webservice test in a website)
I need a example Python code how i can call the billder ID. with provided username password and ID number.

I tryed the below:bUT GIVING AUTHENTICATION ERROR.. but the provided username password is correct.. there is some error in code.. which not pulling the webservices. Can someone please correct it.. Tryed lot of googling to alter code.. went into vein.Confused | :confused: Cry | :((

from ZSI import client
from ZSI import wstools
from ZSI.auth import AUTH
from DownloadInvoice_client import *
import sys

#from UploadInvoice_client import *
from pprint import pprint
authCred = (AUTH.zsibasic, 'username', 'password' )

locator = DownloadInvoiceLocator()
binding = locator.getDownloadInvoiceSoap(auth=authCred)

request = GetInvoiceListWithIDsSoapIn()
request._ArchiveData = True
request._eBillAccountID = 4875218457455365411
result = binding.GetInvoiceListWithIDs(request)

request = GetInvoiceByIDSoapIn()
request._eBillAccountID = 4875218457455365411
request._ArchiveData = False
result = binding.GetInvoiceByID(request)
for p in result._GetInvoiceByIDResult._InvoiceReportWithID:
print p._BillerID
Posted 31-Jan-11 6:18am
Edited 31-Jan-11 6:22am
Manas Bhardwaj 31-Jan-11 11:22am
code formatting
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It's a complete guess as I don't really know Python, but if you're getting an authentication error that means the underlying connection is actually working, you're just supplying the wrong credentials to the webservice.

I would try the username in combination with the domain like this:

authCred = (AUTH.zsibasic, 'domain\username', 'password' )

failing that, experiment with the different types of authentication your AUTH library offers, eg:

authCred = (AUTH.zsintlm, 'domain\username', 'password' )
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

[email address deleted]....i am new in python hope u will give me help me pls mail me when u got my msg i have just completed my B.E computer

so what i have to do ? good future in .net c3 or Python ?
i dont know python is tought then .net c#? hepl me pls

which language it tough ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151125.3 | Last Updated 27 Dec 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100