Created by: Chris Visagie on 22-06-2010 08:37:01 PM Hi, I am developing against Version 8.0.2.10000-12 REST interface. I can create and modify an SMS notification device, but I cannot delete it. It seems I cannot control the Undeletable flag. The flag is set to false in the body of the request when creating the device: <Undeletable>0</Undeletable> On query of the device the flag is indicated to be true: <Undeletable>true</Undeletable> Trying to modify the device gives the same results. On trying to delete this device, I receive the following response: status_code[400], status_message[Bad Request], response[<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ErrorDetails><errors><code>DATA_EXCEPTION</code><message>Object is undeletable. Object = , Table = [tbl_NotificationDevice]</message></errors></ErrorDetails>] On the same system I can create an SMS notification device through the GUI and a query through the REST interface provides <Undeletable>false</Undeletable> and I can also delete this device through the GUI. Does the Undeletable flag depend on any other settings? It does not seem to be dependent on whether this device is active or not. I get the same error in both states. Any other suggestions will be appreciated. Thanks.
Subject: RE: Undeletable flag in sms notification device. Replied by: David Wanagel on 23-06-2010 02:41:58 PM It looks like you need to send undeletable as a string representation of a boolean: <Undeletable>false</Undeletable> I use the JAXB object factory to create the objects in my test code and that is how it comes out. Using that on an 8.5 system this seems to work fine, so please let me know if that helps on your 8.0.2 server. The HTTP of a test POST, GET, DELETE is included below. In the example HTTP undeletable is not set explicitly and it defaults to false. I also sent the device with undeletable explicitly set and that worked as well: {"SmppProviderObjectId":"236e9b43-74e3-43af-80e9-7c5bbc8e23d0","DisplayName":"my sms device","Undeletable":"false","RecipientAddress":"foo"} Or as XML <?xml version="1.0" encoding="UTF-8" standalone="yes"?><SmsDevice><SmppProviderObjectId>236e9b43-74e3-43af-80e9-7c5bbc8e23d0</SmppProviderObjectId><DisplayName>my sms device</DisplayName><Undeletable>false</Undeletable><RecipientAddress>foo</RecipientAddress></SmsDevice> -Dave Example HTTP: POST /vmrest/users/efdd5fb7-0924-4384-9423-2cbfd167532c/notificationdevices/smsdevices HTTP/1.1
Subject: RE: Undeletable flag in sms notification device. Replied by: Chris Visagie on 28-06-2010 12:11:40 PM Thanks for the reply David. <SmsDevice> <StaticText>You have a voicemail message.</StaticText> <SmppProviderObjectId>61180a89-5e49-4deb-9cd2-0c306d8983b0</SmppProviderObjectId> <Active>1</Active> <DeviceName>SMS</DeviceName> <DisplayName>SMS</DisplayName> <Undeletable>false</Undeletable> <RecipientAddress>12345678</RecipientAddress> </SmsDevice> I have tried what you suggested, but the simptoms are still the same. Might be an issue with the software version. At least it reacts differently on a later version. <SmsDevice> <URI>/vmrest/users/f4a16b6e-94db-4f5e-b739-2d983c951792/notificationdevices/smsdevices/d1c83bf9-4aef-40ee-8feb-f1e9aea957e8</URI> <SendCount>true</SendCount> <StaticText>You have a voicemail message.</StaticText> <SmppProviderObjectId>61180a89-5e49-4deb-9cd2-0c306d8983b0</SmppProviderObjectId> <ObjectId>d1c83bf9-4aef-40ee-8feb-f1e9aea957e8</ObjectId> <Active>true</Active> <DeviceName>SMS</DeviceName> <DisplayName>SMS</DisplayName> <MaxBody>512</MaxBody> <MaxSubject>64</MaxSubject> <SubscriberObjectId>f4a16b6e-94db-4f5e-b739-2d983c951792</SubscriberObjectId> <UserURI>/vmrest/users/f4a16b6e-94db-4f5e-b739-2d983c951792</UserURI> <SendCallerId>true</SendCallerId> <Undeletable>true</Undeletable> <RecipientAddress>12345678</RecipientAddress> <EventList>NewVoiceMail</EventList> </SmsDevice> I see the GUI reports version 8.0.2.10000-12, but the REST interface actually reports 8.0.1.12. We are investigating using a later version which is still an option.
Subject: RE: Undeletable flag in sms notification device. Replied by: David Wanagel on 29-06-2010 01:18:47 PM Something is funny, I installed 8.0.2ES14 (8.0.2ES14.41005-14) and it works OK the same as 8.5, which is what I would have expected, can you capture the actual HTTP? -Dave
Subject: RE: Undeletable flag in sms notification device. Replied by: Chris Visagie on 30-06-2010 05:25:19 PM [Updated to show and attempted modify of the Undeletable flag] Below, a debug log that I could not attach as a file. Any feedback will be appreciated. It includes a process of creating a user, adding, modifying and deleting (error) an SMS notification device and then deleting the user.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: