Parameter values in the CUNI Subscribe Web Method

Version 1
    This document was generated from CDN thread

    Created by: Loyd Vest on 18-10-2012 10:50:47 AM
    I'm attempting to use the CUNI SOAP Web Service API to subscribe to CUC to receive message notification events. I'm finding it very difficult to determine what values should be passed in the Subscribe web method call. I have several questions around what values should be passed in the Subscribe. Specifically:

    resourceType  type="xsd:string" - What is an acceptable Resource Type (e.g. User, Folder, etc....)? Where do I find ths list of resource types that can be sent?

    eventTypeList type="tns:ArrayOfString"  - I'm assuming this is a list of the ShortEventTypeEnum values (i.e. All_Events). If not, what is this? 
     
    resourceIdList type="tns:ArrayOfString" - I'm assuming that this is the list of user alias that I want to subscribe for (e.g. operator, user1, etc...). If not, what is this?

    callbackServiceInfo type="ns1:CallbackServiceInfo" - I understand this one.  

    expiration" type="xsd:dateTime" - I understand this one as well.

    keepAliveInterval type="xsd:int" - I understand that this is an integer value that is used for the Keep Alive, but exactly how does the keep alive work? What is are the acceptable values? Is it in seconds or milliseconds? 

    I've mentioned this before on other postings, but this is the kind of information that should be in the programmers guide.  Please get back to me as soon as possible.

    Thanks,

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: Anil Verma on 18-10-2012 04:01:48 PM
    Loyd,
    Did you get a chance to look at the sample here -
    http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Notification_Interface_%28CUNI%29_API_--_Subscribing_to_and_Processing_Notification_Events

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: Loyd Vest on 18-10-2012 04:39:49 PM
    Anil,
    Yes, I've been all over that web page. Unfortunately that sample is using AXIS, and I'm using JAX-WS Client. So you can't create a Subscribe object and then pass the Subscribe object to the ServicePortType.subcribe method. There is no method that is generated that takes a Subscribe object. The ServicePortType.subcribe method that is generated taked all of the parameters listed in my original post. I also created a test .NET Client just to see what it looked like in C#, and it looks the same (i.e. have to pass all of the parameters to the subscribe method).
    Also, the AXIS sample is only setting the Resource ID of a Single user, and then expiration and CallbackInfo. It's not setting the ResourceType or the EventTypeList. I did see in the web page that you listed that the EventTypeList should be left empty if you want to received all events. So I can do that, but it sure would be nice to understand how to set that.
    And then finally there is no discussion anywhere that I can find about the KeepAlive parameter. What the heck is it for and how does it work?
    I sure would appreciate some help here. Customer is breathing down my neck to get this going.

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: Akanksha Agarwal on 22-10-2012 02:33:57 AM
    Hi Loyd,
    Please find the answers below:
    A sample soap request for subscribe is:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:even="http://unity.cisco.com/messageeventservice/event" xmlns:even1="http://event.messageeventservice.unity.cisco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <even:subscribe>
             <even:resourceType>?</even:resourceType>
             <even:eventTypeList>
                <!--Zero or more repetitions:-->
                <even:string>?</even:string>
             </even:eventTypeList>
             ent
             <even:callbackServiceInfo>
                <!--Optional:-->
                <even1:callbackServiceUrl>?</even1:callbackServiceUrl>
                <!--Optional:-->
                <even1:hostname>?</even1:hostname>
                <!--Optional:-->
                <even1:password>?</even1:password>
                <!--Optional:-->
                <even1:port>?</even1:port>
                <!--Optional:-->
                <even1:protocol>?</even1:protocol>
                <!--Optional:-->
                <even1:sslCertificates>
                   <!--Zero or more repetitions:-->
                   <even:string>?</even:string>
                </even1:sslCertificates>
                <!--Optional:-->
                <even1:sslValidateCertificate>?</even1:sslValidateCertificate>
                <!--Optional:-->
                <even1:sslValidateHostname>?</even1:sslValidateHostname>
                <!--Optional:-->
                <even1:username>?</even1:username>
             </even:callbackServiceInfo>
             <even:expiration>?</even:expiration>
             <!--Optional:-->
             <even:keepAliveInterval>?</even:keepAliveInterval>
          </even:subscribe>
       </soapenv:Body>
    </soapenv:Envelope>
     
    Various parameters:
    1) <even:eventTypeList>
                <!--Zero or more repetitions:-->
                <even:string>X</even:string>
             </even:eventTypeList>
    Since you want to subscribe for notification events, you need to mention that for what all events you want notifications. So the value for X could be:
    NEW_MESSAGE: in case you want notification for a new message
    UNREAD_MESSAGE: in case you want notification when a message is marked unread
    SAVED_MESSAGE: in case you want notification when a message isbeing read
    DELETED_MESSAGE: in case you want notification when a message is deleted
    ALL_EVENTS: For all the above mentoned cases
     
    2) <even:resourceIdList>
                <!--Zero or more repetitions:-->
                <even:string>akanksha</even:string>
             </even:resourceIdList>
    This list would carry the names of all the resources(users) for whom you need notification
     
    3)          <even:callbackServiceInfo>
                <!--Optional:-->
                <even1:callbackServiceUrl>http://ucbu-aricent-vm268.cisco.com:7080/vmevents/msgrcv?subscriptionid=5f11dc96-8f84-4d3e-b7e0-f2871cfbaa30</even1:callbackServiceUrl>
                <!--Optional:-->
                <even1:hostname>ucbu-aricent-vm268.cisco.com</even1:hostname>
                <even1:username>test1</even1:username>
             </even:callbackServiceInfo>
    callbackserviceurl: it means the URL where you want to recieve the notification. You can have it as per you application
    Hostname: Connection hostname
    Username: The one who is subscribing
    4) <even:expiration>2012-03-04T01:22:00.0905523+04:00</even:expiration>
    Here you should specify the expiration date for your subscription. After the expiration date, subscription will expire.
     
    5) <even:keepAliveInterval>0</even:keepAliveInterval>
    You can specify the value as per your requirement. It means that your call back URL will be pinged after this interval to check if it's alive.
     
    In the response to the above request, you will recieve a subscription Id.
    Please revert in case you have any further query.
     
    Thanks & Regards,
    Akanksha A

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: Loyd Vest on 23-10-2012 10:00:49 AM
    Thanks for the reply Akanksha that really helped. However, you missed the resourceType paramter. What is an acceptable Resource Type (e.g. User, Folder, etc....)? Where do I find ths list of resource types that can be sent?
    Thanks,
    Loyd

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: David Nguyen on 25-10-2012 06:25:40 PM
    Loyd,
     
    The resourceType parameter is currently not used –
    you can pass anything (or nothing) and it doesn’t matter.
    David

    Subject: RE: Parameter values in the CUNI Subscribe Web Method
    Replied by: Anil Verma on 01-11-2012 07:21:20 PM
    There is a defect in the REST code that is affecting this. It is resolved with the 9.0(1) release.
    Defect id is CSCtx42518
    Defect Descriptions is -
    In CUNI implementation "EventTypeList" is mandatory field, but if its provided in request XML (ALL_EVENTS, NEW_MESSAGE, UNREAD_MESSAGE, SAVED_MESSAGE etc) then subscription events will not be received.
    If EventTypeList is BLANK in request XML, the events are being received.