Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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
v2
Comments
Manas Bhardwaj at 31-Jan-11 11:22am
   
code formatting
Rate this: bad
good
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' )
  Permalink  
Rate this: bad
good
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 .....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 ?
  Permalink  
v3

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

  Print Answers RSS
0 George Jonsson 175
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 27 Dec 2011
Copyright © CodeProject, 1999-2014
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