I am trying to create an Appointment based on this string. But because of the status X-MICROSOFT-CDO-BUSYSTATUS: WORKINGELSEWHERE, an error occurs.
BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
X-WR-CALNAME:51 items
BEGIN:VTIMEZONE
TZID:Russian Standard Time
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION;LANGUAGE=ru-RU:Status Working else where\n
UID:AAMkAGJiZWFjNDg3LTQyMzYtNDkyNC1iZGQ2LTU2NjJiMzJjNjFkZgBGAAAAAACVQ/p9ho/mRo83Vjne2sE0BwCP3pbhbJOaQqEopR6KkVdcAAAAAYWjAACP3pbhbJOaQqEopR6KkVdcAAATSbclAAA=
SUMMARY;LANGUAGE=ru-RU:Status Working else where
DTSTART;VALUE=DATE:20200813
DTEND;VALUE=DATE:20200814
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20201215T082510Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=ru-RU:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:0
X-MICROSOFT-CDO-BUSYSTATUS:WORKINGELSEWHERE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-LOCATIONS:[]
END:VEVENT
END:VCALENDAR
There is a piece of code where this enum is not processed.
switch(var1.getMicrosoftIntendedStatus()) {
case 0:
var30 = zbkz.a;
break;
case 1:
var30 = zbkz.b;
break;
case 2:
var30 = zbkz.d;
break;
case 3:
var30 = zbkz.c;
break;
default:
throw new AsposeArgumentOutOfRangeException(“Unexpected value is discovered: {0}”, var1.getMicrosoftIntendedStatus());
}
Status WorkingElsewhere at number 5
Stacktrace:
com.aspose.email.AsposeArgumentOutOfRangeException: Unexpected value is discovered: WORKINGELSEWHERE
at com.aspose.email.zgy.a(SourceFile:866)
at com.aspose.email.zgy.e(SourceFile:490)
at com.aspose.email.zgy.b(SourceFile:232)
at com.aspose.email.Appointment.a(SourceFile:1420)
at com.aspose.email.Appointment.b(SourceFile:1362)
at com.aspose.email.Appointment.load(SourceFile:1355)
@Alexey_Zakharov,
Welcome to our community! Thank you for your request. Unfortunately, I cannot use your piece of code to reproduce the exception. Could you share a simple comprehensive code example reproducing the issue, please? Also, please specify the version of Aspose.Email you used.
Hello. I am using version 20.7.
Sample code:
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(calendar.getBytes(StandardCharsets.UTF_8));
Optional appointment = Optional
.of(Appointment.load(byteArrayInputStream));
calendar is a regular string in java =
“BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
X-WR-CALNAME:51 items
BEGIN:VTIMEZONE
TZID:Russian Standard Time
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION;LANGUAGE=ru-RU:Status Working else where\n
UID:AAMkAGJiZWFjNDg3LTQyMzYtNDkyNC1iZGQ2LTU2NjJiMzJjNjFkZgBGAAAAAACVQ/p9ho/mRo83Vjne2sE0BwCP3pbhbJOaQqEopR6KkVdcAAAAAYWjAACP3pbhbJOaQqEopR6KkVdcAAATSbclAAA=
SUMMARY;LANGUAGE=ru-RU:Status Working else where
DTSTART;VALUE=DATE:20200813
DTEND;VALUE=DATE:20200814
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20201215T082510Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=ru-RU:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:0
X-MICROSOFT-CDO-BUSYSTATUS:WORKINGELSEWHERE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-LOCATIONS:[]
END:VEVENT
END:VCALENDAR”
@Alexey_Zakharov,
Thank you for the additional information. I reproduced the issue and received the same results. I’ve logged the issue in our tracking system with ID EMAILJAVA-34861. Our development team will investigate it. You will be notified when it is fixed.
I have the same problem, but also with
X-MICROSOFT-CDO-INTENDEDSTATUS:WORKINGELSEWHERE
Will it be fixed under this issue?
Just in case code, example and version:
aspose-email: 21.3 Canceled_ Second test.zip (1.5 KB)
InputStream objectStream = new FileInputStream("…Canceled_ Second test.ics")
Appointment appointment = Appointment.load(objectStream);
@mrila,
Thank you for the issue description. I reproduced the error and got the same result. It seems a similar case. I’ve logged the issue in our tracking system with ID EMAILJAVA-34873. Our development team will investigate this case. You will be notified when it is fixed.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.