Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
huangsike Absent Member.
Absent Member.
3248 views

Update & Delete an Posted Appointment

Hi

In GW8 client, after I post an posted appointment,

1) I can update a posted appointment by "Resend" it with an option to "Retract Original Item"

2) also I can "Delete" it with an option to "Delete this item from all other recipient's mailboxes"

How can I achieve the same function by using GW SOAP by Java calls (gwws.jar)?

Regards,
Sike
Labels (1)
0 Likes
10 Replies
huangsike Absent Member.
Absent Member.

Re: Update & Delete an Posted Appointment

Hi,

I try to delete an posted appointment by calling:


ItemRefList itemRefList = new ItemRefList();
itemRefList.setItem(new String[]{createdId});
String comment = null;
Status status = gwService.retractRequest(itemRefList, comment, true, false, RetractType.allMailboxes, loginResponse.getSession(), false);


but the status gives
59905 Bad parameter passed to a NCSP function

btw the createdId is

4A1CB53E.dom1.po1.100.1787430.1.2B1.1@4:7.dom1.po1.100.0.1.0.1@16

which returned by

gwService.sendItemRequest(appointment, loginResponse.getSession(), false);
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Update & Delete an Posted Appointment

Retract works only on sent items. As a convenience,
retract will also work on the received item that
you sent to yourself.

For personal items, you can modify the appointment
or you can delete the appointment using
removeItemsRequest. Personal items are only in
your mailbox. No one else will have a copy of your
personal item, so there is no need to retract
something that is not there.

Preston

>>> On Wednesday, May 27, 2009 at 2:16 AM,

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

> Hi
>
> In GW8 client, after I post an posted appointment,
>
> 1) I can update a posted appointment by "Resend" it with an option to
> "Retract Original Item"
>
> 2) also I can "Delete" it with an option to "Delete this item from all
> other recipient's mailboxes"
>
> How can I achieve the same function by using GW SOAP by Java calls
> (gwws.jar)?
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Update & Delete an Posted Appointment

Thanks for your reply, Preston.

However let me clarify the scenario, I created an Appointment, set Abel User, and Betty User as recipients


Appointment appointment = new Appointment();
Distribution distribution = new Distribution();
RecipientList gwRecipientList = new RecipientList();
Recipient[] gwRecipientArray = new Recipient[gwAccounts.size()];
for (int i = 0; i < gwAccounts.size(); i++) {
Recipient gwRecipient = new Recipient();
gwRecipient.setDisplayName(gwAccounts.get(i).getUsername());
gwRecipient.setEmail(gwAccounts.get(i).getUsername());
gwRecipient.setDistType(DistributionType.TO);
gwRecipient.setRecipType(RecipientType.User);
gwRecipientArray = gwRecipient;
}
gwRecipientList.setRecipient(gwRecipientArray);
distribution.setRecipients(gwRecipientList);
appointment.setDistribution(distribution);
// then set subject, place, date and etc...


then logged in GroupWise as Abel User and call gwService.sendItemRequest

After that, an Appointment is created on both Abel and Betty's calendar, which states from Abel, to Abel and Betty.

My questions are:
1) How to update this appointment?
For example, In GW client 8, Abel can resend this appointment and retract the old one, so the changes will be seen in all recipients' calendar.

2) How to delete this appointment?
For exmaple, In GW client 8, Abel can delete this appointment and furthermore have the option to delete it from other recipients' calendar as well

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

Re: Update & Delete an Posted Appointment

Logged in as Abel:
If you change the recipient list using the
modifyItemRequest, the appointment will be
sent to the new users and deleted from any
users removed from the original recipient
list.

If you use the modifyItemRequest to modify
the original start or end times, the original
appointment will be retracted under the
covers and the new appointment created /
sent.

If you want to manually delete / retract
the appointment, you use the retractRequest.

Preston


>>> On Thursday, May 28, 2009 at 3:06 AM,

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

> Thanks for your reply, Preston.
>
> However let me clarify the scenario, I created an Appointment, set Abel
> User, and Betty User as recipients
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> Appointment appointment = new Appointment();
> Distribution distribution = new Distribution();
> RecipientList gwRecipientList = new RecipientList();
> Recipient[] gwRecipientArray = new Recipient[gwAccounts.size()];
> for (int i = 0; i < gwAccounts.size(); i++) {
> Recipient gwRecipient = new Recipient();
> gwRecipient.setDisplayName(gwAccounts.get(i).getUsername());
> gwRecipient.setEmail(gwAccounts.get(i).getUsername());
> gwRecipient.setDistType(DistributionType.TO);
> gwRecipient.setRecipType(RecipientType.User);
> gwRecipientArray = gwRecipient;
> }
> gwRecipientList.setRecipient(gwRecipientArray);
> distribution.setRecipients(gwRecipientList);
> appointment.setDistribution(distribution);
> // then set subject, place, date and etc...
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> then logged in GroupWise as Abel User and call
> gwService.sendItemRequest
>
> After that, an Appointment is created on both Abel and Betty's
> calendar, which states from Abel, to Abel and Betty.
>
> My questions are:
> 1) How to update this appointment?
> For example, In GW client 8, Abel can resend this appointment and
> retract the old one, so the changes will be seen in all recipients'
> calendar.
>
> 2) How to delete this appointment?
> For exmaple, In GW client 8, Abel can delete this appointment and
> furthermore have the option to delete it from other recipients'
> calendar as well
>
> Regards,
> Sike

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Update & Delete an Posted Appointment

I should add that the modification of the
recipient list is only available in 8.0.

>>> On Thursday, May 28, 2009 at 4:37 AM, Preston

Stephenson<PStephenson@gw.novell.com> wrote:
> Logged in as Abel:
> If you change the recipient list using the
> modifyItemRequest, the appointment will be
> sent to the new users and deleted from any
> users removed from the original recipient
> list.
>
> If you use the modifyItemRequest to modify
> the original start or end times, the original
> appointment will be retracted under the
> covers and the new appointment created /
> sent.
>
> If you want to manually delete / retract
> the appointment, you use the retractRequest.
>
> Preston
>
>
>>>> On Thursday, May 28, 2009 at 3:06 AM,

> huangsike<huangsike@no‑mx.forums.novell.com> wrote:
>
>> Thanks for your reply, Preston.
>>
>> However let me clarify the scenario, I created an Appointment, set Abel
>> User, and Betty User as recipients
>>
>>
>> Code:
>> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>>
>> Appointment appointment = new Appointment();
>> Distribution distribution = new Distribution();
>> RecipientList gwRecipientList = new RecipientList();
>> Recipient[] gwRecipientArray = new Recipient[gwAccounts.size()];
>> for (int i = 0; i < gwAccounts.size(); i++) {
>> Recipient gwRecipient = new Recipient();
>> gwRecipient.setDisplayName(gwAccounts.get(i).getUsername());
>> gwRecipient.setEmail(gwAccounts.get(i).getUsername());
>> gwRecipient.setDistType(DistributionType.TO);
>> gwRecipient.setRecipType(RecipientType.User);
>> gwRecipientArray = gwRecipient;
>> }
>> gwRecipientList.setRecipient(gwRecipientArray);
>> distribution.setRecipients(gwRecipientList);
>> appointment.setDistribution(distribution);
>> // then set subject, place, date and etc...
>>
>> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>>
>>
>> then logged in GroupWise as Abel User and call
>> gwService.sendItemRequest
>>
>> After that, an Appointment is created on both Abel and Betty's
>> calendar, which states from Abel, to Abel and Betty.
>>
>> My questions are:
>> 1) How to update this appointment?
>> For example, In GW client 8, Abel can resend this appointment and
>> retract the old one, so the changes will be seen in all recipients'
>> calendar.
>>
>> 2) How to delete this appointment?
>> For exmaple, In GW client 8, Abel can delete this appointment and
>> furthermore have the option to delete it from other recipients'
>> calendar as well
>>
>> Regards,
>> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Update & Delete an Appointment

Hi Preston,

I tried your suggestion against GW test server 151.155.5.234.

The update worked on appointment properties, such as time, subject and etc, but the recipient list remained untouched, is the GW test server version 8, or is the problem of my procedure?

basically, what I did was:
1) create an new Appointment
2) set its id to the one created by GW (returned by sendItemResponse)
3) update time, subject, etc
4) create an new Distribution, and set new recipients
5) call modifyItemRequest


// update
Appointment appointment_new = new Appointment();
appointment_new.setId(createdId);

ItemChanges itemChanges = new ItemChanges();
// update time
Calendar calStart_new = Calendar.getInstance();
calStart_new.set(Calendar.HOUR_OF_DAY, 18);
calStart_new.set(Calendar.MINUTE, 30);
Calendar calEnd_new = (Calendar) calStart_new.clone();
calEnd_new.add(Calendar.HOUR, 2);
appointment_new.setStartDate(calStart_new);
appointment_new.setEndDate(calEnd_new);
appointment_new.setPlace("another place");
appointment_new.setSubject("another subject");
// update recipient
Distribution distribution_new = new Distribution();
RecipientList gwRecipientList_new = new RecipientList();
Recipient[] gwRecipientArray_new = new Recipient[2];

Recipient gwRecipient_new = new Recipient();
gwRecipient_new.setDisplayName("demo1");
gwRecipient_new.setEmail("demo1");
gwRecipient_new.setDistType(DistributionType.TO);
gwRecipient_new.setRecipType(RecipientType.User);
gwRecipientArray_new[0] = gwRecipient_new;

Recipient gwRecipient2_new = new Recipient();
gwRecipient2_new.setDisplayName("demo3");
gwRecipient2_new.setEmail("demo3");
gwRecipient2_new.setDistType(DistributionType.TO);
gwRecipient2_new.setRecipType(RecipientType.User);
gwRecipientArray_new[1] = gwRecipient2_new;

gwRecipientList_new.setRecipient(gwRecipientArray_new);
distribution_new.setRecipients(gwRecipientList_new);
appointment_new.setDistribution(distribution_new);

itemChanges.setUpdate(appointment_new);

ModifyItemResponse modifyItemResponse = gwService.modifyItemRequest(createdId, null, itemChanges, 0L, loginResponse.getSession(), false);



Another issue is that modifyItemResponse returned me an new id of the updated appointment, I tried to retract it with the new id:


// remove
ItemRefList itemRefList = new ItemRefList();
itemRefList.setItem(new String[]{createdId});
String comment = null;
Status status = gwService.retractRequest(itemRefList, comment, true, true, RetractType.allMailboxes, loginResponse.getSession(), false);


but it gave me an non-zero return code, even though the appointment had been retracted from GroupWise calendar magically

code = 59905
description = "Bad parameter passed to a NCSP function"



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

Re: Update & Delete an Posted Appointment

If you are changing the recipients, you can
only change the recipients. If you are changing
the time and place, you don't change the recipients.
For what you are doing, you would have to manually
retract the old appointment and create a new
appointment.

Preston

>>> On Thursday, May 28, 2009 at 6:16 AM,

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

> Hi Preston,
>
> I tried your suggestion against GW test server 151.155.5.234.
>
> The update worked on appointment properties, such as time, subject and
> etc, but the recipient list remained untouched, is the GW test server
> version 8, or is the problem of my procedure?
>
> basically, what I did was:
> 1) create an new Appointment
> 2) set its id to the one created by GW (returned by sendItemResponse)
> 3) update time, subject, etc
> 4) create an new Distribution, and set new recipients
> 5) call modifyItemRequest
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> // update


>
> Appointment appointment_new = new Appointment();
> appointment_new.setId(createdId);
>
> ItemChanges itemChanges = new ItemChanges();


>
> // update time


>
> Calendar calStart_new = Calendar.getInstance();


>
> calStart_new.set(Calendar.HOUR_OF_DAY, 18);


>
> calStart_new.set(Calendar.MINUTE, 30);


>
> Calendar calEnd_new = (Calendar) calStart_new.clone();


>
> calEnd_new.add(Calendar.HOUR, 2);


>
> appointment_new.setStartDate(calStart_new);


>
> appointment_new.setEndDate(calEnd_new);


>
> appointment_new.setPlace("another place");


>
> appointment_new.setSubject("another subject");


>
> // update recipient


>
> Distribution distribution_new = new Distribution();


>
> RecipientList gwRecipientList_new = new RecipientList();


>
> Recipient[] gwRecipientArray_new = new Recipient[2];


>
>
> Recipient gwRecipient_new = new Recipient();


>
> gwRecipient_new.setDisplayName("demo1");


>
> gwRecipient_new.setEmail("demo1");


>
> gwRecipient_new.setDistType(DistributionType.TO);


>
> gwRecipient_new.setRecipType(RecipientType.User);


>
> gwRecipientArray_new[0] = gwRecipient_new;


>
>
> Recipient gwRecipient2_new = new Recipient();


>
> gwRecipient2_new.setDisplayName("demo3");


>
> gwRecipient2_new.setEmail("demo3");


>
> gwRecipient2_new.setDistType(DistributionType.TO);


>
> gwRecipient2_new.setRecipType(RecipientType.User);


>
> gwRecipientArray_new[1] = gwRecipient2_new;


>
>
> gwRecipientList_new.setRecipient(gwRecipientArray_new);


>
> distribution_new.setRecipients(gwRecipientList_new);


>


>


>
> appointment_new.setDistribution(distribution_new);


>
>
> itemChanges.setUpdate(appointment_new);


>
>
> ModifyItemResponse modifyItemResponse =
> gwService.modifyItemRequest(createdId, null, itemChanges, 0L,
> loginResponse.getSession(), false);
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
>
> Another issue is that modifyItemResponse returned me an new id of the
> updated appointment, I tried to retract it with the new id:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> // remove
> ItemRefList itemRefList = new ItemRefList();
> itemRefList.setItem(new String[]{createdId});
> String comment = null;
> Status status = gwService.retractRequest(itemRefList, comment, true,

true,
> RetractType.allMailboxes, loginResponse.getSession(), false);
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> but it gave me an non‑zero return code, even though the appointment had
> been retracted from GroupWise calendar magically
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> code = 59905
> description = "Bad parameter passed to a NCSP function"
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
>
> Regards,
> Sike

0 Likes
huangsike Absent Member.
Absent Member.

Re: Update & Delete an Posted Appointment

Thanks, Preston, you made the point.

How about the issue with retract, I tried to retract an appointment with its id

ItemRefList itemRefList = new ItemRefList();
itemRefList.setItem(new String[]{createdId});
String comment = null;
Status status = gwService.retractRequest(itemRefList, comment, true, true, RetractType.allMailboxes, loginResponse.getSession(), false);


but it gave me an non-zero return code, even though the appointment had been retracted from GroupWise calendar magically

code = 59905
description = "Bad parameter passed to a NCSP function"


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

Re: Update & Delete an Posted Appointment

I found the problem, I should have used RetractType.recipientMailboxes rather then RetractType.allMailboxes.

About the two boolean fileds:
retractingAllInstances and retractCausedByResend

Do their values matter?

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

Re: Update & Delete an Posted Appointment

If you have a recurring appointment, you specify
retractingAllInstances = true. This will retract
all of the instances. If you don't specify true,
only the one instance will be retracted. If you
don't have a recurring item, the element will be
ignored.

If you specify retractCausedByResend = true, the
appointment(s) will be deleted and no notice will
be sent to the recipients. (This is the case where
you are going to replace the appointment(s). If
you don't specify true, the recipients will receive
a mail message saying the appointment(s) has been
deleted.

Preston

>>> On Friday, May 29, 2009 at 1:46 AM,

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

> I found the problem, I should have used RetractType.recipientMailboxes
> rather then RetractType.allMailboxes.
>
> About the two boolean fileds:
> retractingAllInstances and retractCausedByResend
>
> Do their values matter?
>
> Regards,
> Sike

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.