Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
huangsike Absent Member.
Absent Member.
2131 views

Shared Address Book

Hi,

How do I create a shared address book via GWWS?

Regards,
Sike
Labels (1)
0 Likes
14 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

Here is some test code:
public void testCreateSharedAB() {
AccessControlListEntry[] acle = new AccessControlListEntry[3];
AccessControlList acl = new AccessControlList( acle );
CreateItemResponse resp = null;
SharedBook book = new SharedBook();
SharedFolderNotification sfn = new SharedFolderNotification();
Rights rights = new Rights();
Rights all = new Rights();

sfn.setSubject( "Sharing: MyBook" );
sfn.setMessage( "sharing this book" );
rights.setRead( true );
acle[0] = new AccessControlListEntry();
acle[0].setDisplayName( "Jay Parker" );
acle[0].setEmail( "jparker@prestons.provo.novell.com" );
acle[0].setUuid( "C974CA00-0B55-0000-B976-8E90E5B002BD" );
acle[0].setRights( rights );

acle[1] = new AccessControlListEntry();
acle[1].setDisplayName( "Craig Johnson" );
acle[1].setEmail( "cjohnson@prestons.provo.novell.com" );
acle[1].setUuid( "AD712880-0B55-0000-B976-8E90E5B002BD" );
acle[1].setRights( rights );

acle[2] = new AccessControlListEntry();
acle[2].setDisplayName( "Bob Goodman" );
acle[2].setEmail( "rgoodman@prestons.provo.novell.com" );
acle[2].setUuid( "A15E8230-0110-0000-87A9-F2F2F4BB96F7" );
all.setRead( true );
all.setEdit( true );
acle[2].setRights( all );

book.setName( "MyBook" );
book.setAcl( acl );
try {
resp = m_main.getService().createItemRequest( book, sfn,
m_main.getSessionId(), m_main.getTrace() );
} catch ( Exception e ) {
e.printStackTrace();
}
}

You have use 8.0.0 at least. I don't remember if you need
8.0.1.

Preston

>>> On Friday, June 05, 2009 at 3:16 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> Hi,
>
> How do I create a shared address book via GWWS?
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

Where does this "SharedBook" come from?

There is NO such class in gwws.jar in novell-gwsoap-devel-2008.12.23-1cross_platform.zip


Regards,
Sike
0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

I think I should also elaborate my question:

How do I create an address book, create/add contacts into it, and share it with other users via GWWS?


Regards,
Sike
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

It is in \Novell\novell-gwsoap-devel-2008.12.23-1cross_platform\WSDL and
schemas\GW8\types.xsd

>>> On Friday, June 05, 2009 at 8:06 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> Where does this "SharedBook" come from?
>
> There is NO such class in gwws.jar in
> novell‑gwsoap‑devel‑2008.12.23‑1cross_platform.zip
>
>
> Regards,
> Sike

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

The example I posted shows giving three users rights to the
book. The first two users only have read rights. The third
user has read and write rights.
Once you have the id of the book, you can put / create items
in the book (if you have edit rights). The three uses will
receive a shared address book notification message. Once
they accept the notification, they can access the book.

Preston

>>> On Friday, June 05, 2009 at 8:46 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> I think I should also elaborate my question:
>
> How do I create an address book, create/add contacts into it, and share
> it with other users via GWWS?
>
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

Hi, Preston, I followed your step, created a SharedBook via user1 and set and ACL entry to be user2 in the demo server, but I couldn't see any notification message in GW client for both users.


SharedFolderNotification sharedFolderNotification = new SharedFolderNotification();
sharedFolderNotification.setSubject("Sharing: MyBook");
sharedFolderNotification.setMessage("sharing this book");

Rights all = new Rights();
all.setRead(true);
all.setEdit(true);

Filter filter = new Filter();
FilterEntry filterEntry = new FilterEntry();
filterEntry.setOp(FilterOp.eq);
filterEntry.setField("username");
filterEntry.setValue("user2");
filter.setElement(filterEntry);
GetItemsResponse getItemResponse = gwService.getItemsRequest("GroupWiseSystemAddressBook@52", null, filter, null, 500, loginResponse.getSession(), false);
Item[] items = getItemResponse.getItems().getItem();
Contact contact = (Contact) items[0];

AccessControlListEntry accessControlListEntry = new AccessControlListEntry();
accessControlListEntry.setDisplayName(contact.getFullName().getDisplayName());
accessControlListEntry.setEmail(contact.getEmailList().getPrimary());
accessControlListEntry.setUuid(contact.getUuid());
accessControlListEntry.setRights(all);

SharedBook book = new SharedBook();
book.setName("MyBook");
AccessControlList accessControlList = new AccessControlList();
accessControlList.setEntry(new AccessControlListEntry[]{accessControlListEntry});
book.setAcl(accessControlList);
CreateItemResponse response = gwService.createItemRequest(book, sharedFolderNotification, loginResponse.getSession(), false);



Regards,
Sike
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

The notification message doesn't go to the owner.
Are you saying user2 didn't receive a notification
message?

>>> On Monday, June 08, 2009 at 3:46 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> Hi, Preston, I followed your step, created a SharedBook via user1 and
> set and ACL entry to be user2 in the demo server, but I couldn't see any
> notification message in GW client for both users.
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> SharedFolderNotification sharedFolderNotification = new
> SharedFolderNotification();


>
> sharedFolderNotification.setSubject("Sharing: MyBook");


>


>
> sharedFolderNotification.setMessage("sharing this book");


>


>
>
> Rights all = new Rights();


>


>
> all.setRead(true);


>


>
> all.setEdit(true);


>


>
>
> Filter filter = new Filter();


>


>
> FilterEntry filterEntry = new FilterEntry();


>


>
> filterEntry.setOp(FilterOp.eq);


>


>
> filterEntry.setField("username");


>


>
> filterEntry.setValue("user2");


>


>
> filter.setElement(filterEntry);


>


>
> GetItemsResponse getItemResponse =
> gwService.getItemsRequest("GroupWiseSystemAddressBook@52", null, filter,
> null, 500, loginResponse.getSession(), false);
> Item[] items = getItemResponse.getItems().getItem();


>


>
> Contact contact = (Contact) items[0];


>


>
>
> AccessControlListEntry accessControlListEntry = new
> AccessControlListEntry();


>
>
>

accessControlListEntry.setDisplayName(contact.getFullName().getDisplayName()
)
> ;


> accessControlListEntry.setEmail(contact.getEmailList().getPrimary());


>


>
> accessControlListEntry.setUuid(contact.getUuid());


>


>
> accessControlListEntry.setRights(all);


>


>
>
> SharedBook book = new SharedBook();


>


>
> book.setName("MyBook");


>


>
> AccessControlList accessControlList = new AccessControlList();


>


>
> accessControlList.setEntry(new
> AccessControlListEntry[]{accessControlListEntry});


>
> book.setAcl(accessControlList);


>


>
> CreateItemResponse response = gwService.createItemRequest(book,
> sharedFolderNotification, loginResponse.getSession(), false);


>
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

User2 has no notification message.

I can't find this shared address book in GW client for user1 and user2, even though gwService.createItemRequest successfully returns the id.


Regards,
Sike
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

Can you send the SOAP trace of the create of the
SharedBook?

>>> On Monday, June 08, 2009 at 5:16 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> User2 has no notification message.
>
> I can't find this shared address book in GW client for user1 and user2,
> even though gwService.createItemRequest successfully returns the id.
>
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book


<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://schemas.novell.com/2005/01/GroupWise/methods">
<env:Header>
<ans1:session xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">XnNifDKXozWMuhrM</ans1:session>
<ans1:gwTrace xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">false</ans1:gwTrace>
</env:Header>
<env:Body>
<ns0:createItemRequest>
<ns0:item xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types" xsi:type="ans1:SharedBook">
<ans1:name>MyBook</ans1:name>
<ans1:version>0</ans1:version>
<ans1:acl>
<ans1:entry xsi:type="ans1:AccessControlListEntry">
<ans1:displayName>Betty User</ans1:displayName>
<ans1:email>user2@dmz1.provo.novell.com</ans1:email>
<ans1:uuid>C74A3700-0A93-0000-9B1F-B3FCEF85DEA4</ans1:uuid>
<ans1:rights>
<ans1:read>true</ans1:read>
<ans1:edit>true</ans1:edit>
</ans1:rights>
</ans1:entry>
</ans1:acl>
<ans1:owner>A550B480-0A93-0000-9B1F-B3FCEF85DEA4</ans1:owner>
</ns0:item>
<ns0:notification>
<ans1:subject xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">Sharing: MyBook
</ans1:subject>
<ans1:message xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">sharing this book
</ans1:message>
</ns0:notification>
</ns0:createItemRequest>
</env:Body>
</env:Envelope>
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

And you have the MTA agent running?
There are some things which only require
the POA agent running. For others, you
need to have the MTA running and all the
POA's involved. I believe that shared address
books always need the MTA running, even
if the user is in the same post office.
You also need to be sure that the links
between the primary MTA, it's POA's and
the secondary MTA's and their POA's are
running.

Preston

>>> On Monday, June 08, 2009 at 6:26 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> <?xml version="1.0" encoding="UTF‑8"?>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance"
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns0="http://schemas.novell.com/2005/01/GroupWise/methods">
> <env:Header>
> <ans1:session
>

xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">XnNifDKXozWMu
hr
> M</ans1:session>
> <ans1:gwTrace
>

xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">false</ans1:g
wTr
> ace>
> </env:Header>
> <env:Body>
> <ns0:createItemRequest>
> <ns0:item xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types"


> xsi:type="ans1:SharedBook">
> <ans1:name>MyBook</ans1:name>
> <ans1:version>0</ans1:version>
> <ans1:acl>
> <ans1:entry xsi:type="ans1:AccessControlListEntry">
> <ans1:displayName>Betty User</ans1:displayName>
> <ans1:email>user2@dmz1.provo.novell.com</ans1:email>
> <ans1:uuid>C74A3700‑0A93‑0000‑9B1F‑B3FCEF85DEA4</ans1:uuid>
> <ans1:rights>
> <ans1:read>true</ans1:read>
> <ans1:edit>true</ans1:edit>
> </ans1:rights>
> </ans1:entry>
> </ans1:acl>
> <ans1:owner>A550B480‑0A93‑0000‑9B1F‑B3FCEF85DEA4</ans1:owner>
> </ns0:item>
> <ns0:notification>
> <ans1:subject
> xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">Sharing:

MyBook
> </ans1:subject>
> <ans1:message
> xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">sharing

this
> book
> </ans1:message>
> </ns0:notification>
> </ns0:createItemRequest>
> </env:Body>
> </env:Envelope>
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

Hi, Preston, I use the test server 151.155.5.234 given by you, I don't know about the status of MTAs.

Regards,
Sike
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shared Address Book

It will be awhile before I can look at the issue on
that server.

>>> On Monday, June 08, 2009 at 7:46 AM,

huangsike<huangsike@no-mx.forums.novell.com> wrote:

> Hi, Preston, I use the test server 151.155.5.234 given by you, I don't
> know about the status of MTAs.
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Shared Address Book

Thanks for your time, meanwhile, I discovered that the creation of SharedBook on 151.155.5.234 returned me a Mail, and I did notice a Posted Message in creator's Mailbox in GW client.


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://schemas.novell.com/2005/01/GroupWise/methods">
<env:Header>
<ans1:session xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">y9szZevmVVTuZaI6</ans1:session>
<ans1:gwTrace xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">false</ans1:gwTrace>
</env:Header>
<env:Body>
<ns0:createItemRequest>
<ns0:item xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types" xsi:type="ans1:SharedBook">
<ans1:name>MyBook</ans1:name>
<ans1:version>0</ans1:version>
<ans1:acl>
<ans1:entry xsi:type="ans1:AccessControlListEntry">
<ans1:displayName>Betty User</ans1:displayName>
<ans1:email>user2@dmz1.provo.novell.com</ans1:email>
<ans1:uuid>C74A3700-0A93-0000-9B1F-B3FCEF85DEA4</ans1:uuid>
<ans1:rights>
<ans1:read>true</ans1:read>
<ans1:edit>true</ans1:edit>
</ans1:rights>
</ans1:entry>
</ans1:acl>
</ns0:item>
<ns0:notification>
<ans1:subject xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">Sharing: MyBook
</ans1:subject>
<ans1:message xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">sharing this book
</ans1:message>
</ns0:notification>
</ns0:createItemRequest>
</env:Body>
</env:Envelope>



<env:Envelope xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<ans1:gwTrace xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">false</ans1:gwTrace>
</env:Header>
<env:Body>
<gwm:createItemResponse xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods"
xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types">
<gwm:id>4A2F17FC.dom1.po1.100.1787430.1.4C6.1@1:7.dom1.po1.100.0.1.0.1@16</gwm:id>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:createItemResponse>
</env:Body>
</env:Envelope>



<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<ans1:gwTrace xmlns:ans1="http://schemas.novell.com/2005/01/GroupWise/types">false</ans1:gwTrace>
</env:Header>
<env:Body>
<gwm:getItemResponse xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods"
xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types">
<gwm:item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="gwt:Mail">
<gwt:id>4A2F17FC.dom1.po1.100.1787430.1.4C6.1@1:7.dom1.po1.100.0.1.0.1@16</gwt:id>
<gwt:version>1</gwt:version>
<gwt:modified>2009-06-10T08:18:36Z</gwt:modified>
<gwt:container>7.dom1.po1.100.0.1.0.1@16</gwt:container>
<gwt:created>2009-06-10T08:18:36Z</gwt:created>
<gwt:status>
<gwt:accepted>1</gwt:accepted>
<gwt:opened>1</gwt:opened>
<gwt:read>1</gwt:read>
</gwt:status>
<gwt:msgId>4A2F17FC.dom1.po1.100.1787430.1.4C6.1</gwt:msgId>
<gwt:source>personal</gwt:source>
<gwt:delivered>2009-06-10T08:18:36Z</gwt:delivered>
<gwt:security>Normal</gwt:security>
<gwt:distribution>
<gwt:from>
<gwt:displayName>Abel User</gwt:displayName>
<gwt:email>user1@dmz1.provo.novell.com</gwt:email>
<gwt:uuid>A550B480-0A93-0000-9B1F-B3FCEF85DEA4</gwt:uuid>
</gwt:from>
<gwt:sendoptions>
<gwt:statusTracking>None</gwt:statusTracking>
</gwt:sendoptions>
</gwt:distribution>
<gwt:options>
<gwt:priority>Standard</gwt:priority>
</gwt:options>
<gwt:size>256</gwt:size>
</gwm:item>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:getItemResponse>
</env:Body>
</env:Envelope>
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.