igstrachan Absent Member.
Absent Member.
2957 views

Addition to Distribution List

It appears that a distribution list is a group under address list and the AddMember method requires a GroupMemberList.

Group, GroupMember, and GroupMemberList are all in the types.xsl under gwws. However, options for gwws. when trying to Dim a GroupMemberList are only Group and GroupMember.

This appears to be a problem or maybe I missed something in the concept.

A sample of adding members might be helpful.
Labels (1)
0 Likes
14 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List


something along these lines...

gwNewMailRecipient.distType = Distribution.TO
gwNewMailRecipient.reciptype = RecipientType.User
gwNewMailRecipient.email = "somone@here.com"
gwNewMailDistribution.recipients = New Recipients() {gwNewMailRecipient}

Mail.distribution = gwNewMailDistribution

above is quickly wrote in vb.net, Hope this helps...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List

At least in Java, the GroupMemberList is
constructed with a GroupMember array, or
you set a GroupMember array in a
GroupMemberList object.

I won't be able to provide any code samples
for the foreseeable future.

Preston

>>> On Monday, November 09, 2009 at 12:40 PM, Ian

Strachan<IStrachan@co.tulare.ca.us> wrote:
> It appears that a distribution list is a group under address list and the


> AddMember method requires a GroupMemberList.
>
> Group, GroupMember, and GroupMemberList are all in the types.xsl under

gwws.
> However, options for gwws. when trying to Dim a GroupMemberList are only


> Group and GroupMember.
>
> This appears to be a problem or maybe I missed something in the concept.
>
> A sample of adding members might be helpful.

0 Likes
igstrachan Absent Member.
Absent Member.

Re: Addition to Distribution List

I am not trying to add a distribution list to a mail item. I am trying to add (and remove) members from a distribution list.

>>> SomeGuy<someplace@dns.com> 11/9/2009 12:21 PM >>>



something along these lines...

gwNewMailRecipient.distType = Distribution.TO
gwNewMailRecipient.reciptype = RecipientType.User
gwNewMailRecipient.email = "somone@here.com"
gwNewMailDistribution.recipients = New Recipients() {gwNewMailRecipient}

Mail.distribution = gwNewMailDistribution

above is quickly wrote in vb.net, Hope this helps...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List


So then would along these lines work for you... Or am i still off the ball here?

dim NewRec() as Recipients
for each rec as Recipients in gwNewMailDistribution.recipients
if IwantToKeepUser then
System.Array.Resize(NewRec, NewRec.length)
NewRec(NewRec.lenght-1) = rec
end if
next

'assign new dude to current distribution
gwNewMailDistribution.recipients = NewRec
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List


AHHHH a distribution List no the Distribution lis of the email.... My bad.. brain fart!
0 Likes
igstrachan Absent Member.
Absent Member.

Re: Addition to Distribution List

I used the following code to try to add a member:

Dim gwAddMemberRq As New gwws.addMembersRequest
Dim gwAddMemberRp As New gwws.addMembersResponse
Dim gwMember As New gwws.GroupMember
Dim gwMembers(0) As gwws.GroupMember
gwAddMemberRq.members = gwMembers
gwMember.distType = gwws.DistributionType.TO
gwMember.itemType = gwws.ItemType.Contact
gwMember.email = "TCase2@co.tulare.ca.us"
gwMember.name = "Test Case2"
gwMembers(0) = gwmember
gwAddMemberRq.container = "6EA4D780-18A4-0000-92EA-000000000000@58:GroupWiseSystemAddressBook@52"
Try
gwAddMemberRp = gw.addMembersRequest(gwAddMemberRq)
If gwAddMemberRp.status.code = 0 Then

It returned a status code of 0 but did not add a member
I also created a group inside my own address book and got the same result.
Is any special authority needed for a trusted application to add/remove entries from a distribution list?

(Of Note when I look at the distribution list "gwGroup = gwAddrItemsRp.items(I)" gwGroup.members Is Nothing)

>>> Preston Stephenson<PStephenson@gw.novell.com> 11/9/2009 1:27 PM >>>

At least in Java, the GroupMemberList is
constructed with a GroupMember array, or
you set a GroupMember array in a
GroupMemberList object.

I won't be able to provide any code samples
for the foreseeable future.

Preston

>>> On Monday, November 09, 2009 at 12:40 PM, Ian

Strachan<IStrachan@co.tulare.ca.us> wrote:
> It appears that a distribution list is a group under address list and the


> AddMember method requires a GroupMemberList.
>
> Group, GroupMember, and GroupMemberList are all in the types.xsl under

gwws.
> However, options for gwws. when trying to Dim a GroupMemberList are only


> Group and GroupMember.
>
> This appears to be a problem or maybe I missed something in the concept.
>
> A sample of adding members might be helpful.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List


As I am told by our novell guys here. A trusted Application as Admin Access to the Post office Agent. So it shouldn't be a rights issue.

good luck
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List

You can't add members to a group / distribution list
that is in the system address book using SOAP.
You can't update items in the system address book
using SOAP.

To update items in the system address book, you need
to use the Admin API or ConsoleOne.

>>> On Tuesday, November 10, 2009 at 10:45 AM, Ian

Strachan<IStrachan@co.tulare.ca.us> wrote:
> I used the following code to try to add a member:
>
> Dim gwAddMemberRq As New gwws.addMembersRequest
> Dim gwAddMemberRp As New gwws.addMembersResponse
> Dim gwMember As New gwws.GroupMember
> Dim gwMembers(0) As gwws.GroupMember
> gwAddMemberRq.members = gwMembers
> gwMember.distType = gwws.DistributionType.TO
> gwMember.itemType = gwws.ItemType.Contact
> gwMember.email = "TCase2@co.tulare.ca.us"
> gwMember.name = "Test Case2"
> gwMembers(0) = gwmember
> gwAddMemberRq.container =
>

"6EA4D780‑18A4‑0000‑92EA‑000000000000@58:GroupWiseSystemAddressBook@
52"
> Try
> gwAddMemberRp = gw.addMembersRequest(gwAddMemberRq)
> If gwAddMemberRp.status.code = 0 Then
>
> It returned a status code of 0 but did not add a member
> I also created a group inside my own address book and got the same

result.
> Is any special authority needed for a trusted application to add/remove
> entries from a distribution list?
>
> (Of Note when I look at the distribution list "gwGroup =
> gwAddrItemsRp.items(I)" gwGroup.members Is Nothing)
>
>>>> Preston Stephenson<PStephenson@gw.novell.com> 11/9/2009 1:27 PM >>>

> At least in Java, the GroupMemberList is
> constructed with a GroupMember array, or
> you set a GroupMember array in a
> GroupMemberList object.
>
> I won't be able to provide any code samples
> for the foreseeable future.
>
> Preston
>
>>>> On Monday, November 09, 2009 at 12:40 PM, Ian

> Strachan<IStrachan@co.tulare.ca.us> wrote:
>> It appears that a distribution list is a group under address list and

the
>
>> AddMember method requires a GroupMemberList.
>>
>> Group, GroupMember, and GroupMemberList are all in the types.xsl under

> gwws.
>> However, options for gwws. when trying to Dim a GroupMemberList are

only
>
>> Group and GroupMember.
>>
>> This appears to be a problem or maybe I missed something in the concept.
>>
>> A sample of adding members might be helpful.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List


not completely correct.
You, most of the time, impersonate the user you logged in to.
With all the access the user has, not much more...

There is no admin in GroupWise only in eDir 😛

SomeGuy schrieb:
>
> As I am told by our novell guys here. A trusted Application as Admin
> Access to the Post office Agent. So it shouldn't be a rights issue.
>
> good luck
>
>

0 Likes
igstrachan Absent Member.
Absent Member.

Re: Addition to Distribution List

Does the .addMembersRequest have a function other than modifying group / distribution lists?
If it is unsuccessful shouldn't it return a status other than 0 with an appropriate message?

>>> Preston Stephenson<PStephenson@gw.novell.com> 11/11/2009 3:28 AM >>>

You can't add members to a group / distribution list
that is in the system address book using SOAP.
You can't update items in the system address book
using SOAP.

To update items in the system address book, you need
to use the Admin API or ConsoleOne.

>>> On Tuesday, November 10, 2009 at 10:45 AM, Ian

Strachan<IStrachan@co.tulare.ca.us> wrote:
> I used the following code to try to add a member:
>
> Dim gwAddMemberRq As New gwws.addMembersRequest
> Dim gwAddMemberRp As New gwws.addMembersResponse
> Dim gwMember As New gwws.GroupMember
> Dim gwMembers(0) As gwws.GroupMember
> gwAddMemberRq.members = gwMembers
> gwMember.distType = gwws.DistributionType.TO
> gwMember.itemType = gwws.ItemType.Contact
> gwMember.email = "TCase2@co.tulare.ca.us"
> gwMember.name = "Test Case2"
> gwMembers(0) = gwmember
> gwAddMemberRq.container =
>

"6EA4D780-18A4-0000-92EA-000000000000@58:GroupWiseSystemAddressBook@
52"
> Try
> gwAddMemberRp = gw.addMembersRequest(gwAddMemberRq)
> If gwAddMemberRp.status.code = 0 Then
>
> It returned a status code of 0 but did not add a member
> I also created a group inside my own address book and got the same

result.
> Is any special authority needed for a trusted application to add/remove
> entries from a distribution list?
>
> (Of Note when I look at the distribution list "gwGroup =
> gwAddrItemsRp.items(I)" gwGroup.members Is Nothing)
>
>>>> Preston Stephenson<PStephenson@gw.novell.com> 11/9/2009 1:27 PM >>>

> At least in Java, the GroupMemberList is
> constructed with a GroupMember array, or
> you set a GroupMember array in a
> GroupMemberList object.
>
> I won't be able to provide any code samples
> for the foreseeable future.
>
> Preston
>
>>>> On Monday, November 09, 2009 at 12:40 PM, Ian

> Strachan<IStrachan@co.tulare.ca.us> wrote:
>> It appears that a distribution list is a group under address list and

the
>
>> AddMember method requires a GroupMemberList.
>>
>> Group, GroupMember, and GroupMemberList are all in the types.xsl under

> gwws.
>> However, options for gwws. when trying to Dim a GroupMemberList are

only
>
>> Group and GroupMember.
>>
>> This appears to be a problem or maybe I missed something in the concept.
>>
>> A sample of adding members might be helpful.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Addition to Distribution List

I logged a bug to return an error.

>>> On Thursday, November 12, 2009 at 10:17 AM, Ian

Strachan<IStrachan@co.tulare.ca.us> wrote:
> Does the .addMembersRequest have a function other than modifying group /
> distribution lists?
> If it is unsuccessful shouldn't it return a status other than 0 with an
> appropriate message?
>
>>>> Preston Stephenson<PStephenson@gw.novell.com> 11/11/2009 3:28 AM >>>

> You can't add members to a group / distribution list
> that is in the system address book using SOAP.
> You can't update items in the system address book
> using SOAP.
>
> To update items in the system address book, you need
> to use the Admin API or ConsoleOne.
>
>>>> On Tuesday, November 10, 2009 at 10:45 AM, Ian

> Strachan<IStrachan@co.tulare.ca.us> wrote:
>> I used the following code to try to add a member:
>>
>> Dim gwAddMemberRq As New gwws.addMembersRequest
>> Dim gwAddMemberRp As New gwws.addMembersResponse
>> Dim gwMember As New gwws.GroupMember
>> Dim gwMembers(0) As gwws.GroupMember
>> gwAddMemberRq.members = gwMembers
>> gwMember.distType = gwws.DistributionType.TO
>> gwMember.itemType = gwws.ItemType.Contact
>> gwMember.email = "TCase2@co.tulare.ca.us"
>> gwMember.name = "Test Case2"
>> gwMembers(0) = gwmember
>> gwAddMemberRq.container =
>>

>

"6EA4D780‑18A4‑0000‑92EA‑000000000000@58:GroupWiseSystemAddressBook@

> 52"
>> Try
>> gwAddMemberRp = gw.addMembersRequest(gwAddMemberRq)
>> If gwAddMemberRp.status.code = 0 Then
>>
>> It returned a status code of 0 but did not add a member
>> I also created a group inside my own address book and got the same

> result.
>> Is any special authority needed for a trusted application to add/remove
>> entries from a distribution list?
>>
>> (Of Note when I look at the distribution list "gwGroup =
>> gwAddrItemsRp.items(I)" gwGroup.members Is Nothing)
>>
>>>>> Preston Stephenson<PStephenson@gw.novell.com> 11/9/2009 1:27 PM >>>

>> At least in Java, the GroupMemberList is
>> constructed with a GroupMember array, or
>> you set a GroupMember array in a
>> GroupMemberList object.
>>
>> I won't be able to provide any code samples
>> for the foreseeable future.
>>
>> Preston
>>
>>>>> On Monday, November 09, 2009 at 12:40 PM, Ian

>> Strachan<IStrachan@co.tulare.ca.us> wrote:
>>> It appears that a distribution list is a group under address list and

> the
>>
>>> AddMember method requires a GroupMemberList.
>>>
>>> Group, GroupMember, and GroupMemberList are all in the types.xsl under

>> gwws.
>>> However, options for gwws. when trying to Dim a GroupMemberList are

> only
>>
>>> Group and GroupMember.
>>>
>>> This appears to be a problem or maybe I missed something in the

concept.
>>>
>>> A sample of adding members might be helpful.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.