I'm having no luck even logging in ... via soap with VB.net with Visual Studio 2005.
I have added a web reference (no problem).
I've written the code (SugarCRM is my web reference):
Dim soap As New SugarCRM.sugarsoap()
Dim auth As New SugarCRM.user_auth()
auth.user_name = "user"
auth.password = md5Encode("pwd")
auth.version = "1.0"
Dim session As SugarCRM.set_entry_result = soap.login(auth, "SugarCRM")
If session.error.number <> 0 then
Console.Writeline(String.Format("{0} : {1}", session.error.name, session.error.description))
end if
Private Function md5Encode(ByVal value As String) As String
Dim hash() As Byte = New System.Security.Cryptography.MD5CryptoServiceProvi der().ComputeHash(Encoding.Default.GetBytes(value) )
Dim output As New StringBuilder(hash.length)
for each b As Byte in hash
output.append(b.toString("X2"))
next
return output.toString.tolower
End Function
Each time I run ... I get this:
Invalid Login: Login attempt failed please check the username and password
So I've tried multiple accounts ... I've tried even passing in the md5 hash code directly. Nada!
So I've seen references to the CandyWrapper ... so I've tried that.
With that I'm able to login .. and do some things .. so progress.
However, I cannot seem to get it to create document revisions (our team does not want to use Notes ... they want to use documents with revisions).
However, we have some custom modules ... and with them I seem unable to access them (i.e. CETeams). I've tried to use CandyWrapper's doGetEntryList:
Dim field_names() As String = {"name"}
Dim results(,) As String = _candyWrapper.doGetEntryList(_sessionId, "CETeams", "ceteams.name='NA'", "", 0, field_names, 1, 0)
I'm always getting results(0,0) to be 0. This similar code works for other modules (Accounts, Opportunities, Projects).
So I'm fine with using the CandyWrapper ... but I've hit some stumbling blocks ... any help out there?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks