I'm trying to use the trusted app capability to take a set of contacts and add them to a bunch of accounts in our system. I have the trusted app logging in and seeing all address books of all of the accounts that I want to work with. My problem is that I can't seem to figure out how to access the contacts of the address book. With the object api, this was simple to figure out. I know I have to use a getitemsrequest but I can't see how it works to know to get an address book item as opposed to a message.

Any way I could get someone to post some sample code to get a contact or all contacts? I'm working with VB.net although I could translate C# if you do not know VB.

Here's what I have in my sub that gets the addressbooks after login. I'm using 1.03 of the schema and GW802HP1 on my servers.

I'm trying to move forward with the soap api but am having a bit of trouble working with the documentation to find how to access data.

Thanks in advance,


Dim objGWBinding As New gwws.GroupWiseBinding
Dim req As New gwws.loginRequest()
Dim gwUserloginResp As New gwws.loginResponse
Dim gwUserlogoutResp As New gwws.logoutResponse
Dim pText As gwws.PlainText = New gwws.PlainText()

objGWBinding = New gwws.GroupWiseBinding()
objGWBinding.Url = "https://" & txtPOAAddress.Text & ":" & txtPOAPort.Text & "/soap"
pText.username = txtUsername.Text
pText.password = txtPassword.Text
req.auth = pText
req.version = 1.03

gwUserloginResp = objGWBinding.loginRequest(req)

'Instantiate GWTracing but set it to false
objGWBinding.gwTrace = New gwws.boolean
objGWBinding.gwTrace.Text = New String() {Boolean.FalseString}

If 0 = gwUserloginResp.status.code Then
objGWBinding.session = New gwws.string() 'initialize session object
objGWBinding.session.Text = New String() {gwUserloginResp.session} 'load session obj

If TracingCheckBox.Checked Then
objGWBinding.gwTrace.Text(0) = Boolean.TrueString
End If

bLoggedIn = True
ListBox1.Items.Add("Logged In...")
ListBox1.Items.Add("Cannot Login. Please check Login credentials.")
End If
Dim objAddrBooksReq As New gwws.getAddressBookListRequest
Dim objAddrBooksResp As New gwws.getAddressBookListResponse
Dim objAddrBook As New gwws.AddressBook
Dim AddressFoundInPersonalAddressBook As Boolean = False

objAddrBooksResp = objGWBinding.getAddressBookListRequest(objAddrBook sReq)
For Each objAddrBook In objAddrBooksResp.books