Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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: :((

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
Updated 31-Jan-11 5:22am
v2
Comments
Manas Bhardwaj 31-Jan-11 11:22am    
code formatting

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' )
 
Share this answer
 
[email address deleted]....i am new in python hope u will give me help me pls mail me when u got my msg .....now 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 ?
 
Share this answer
 
v3

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900