cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1255
Views
0
Helpful
3
Replies

CUNI - subscribe ends with <faultstring>unknown</faultstring>

andrysek1
Beginner
Beginner

I'm trying to use the CUNI SOAP API to subscribe to CUC.  I followed the article Parameter values in the CUNI Subscribe Web Method,

made a lot of attempts, but it still gives me  error <faultstring>unknown</faultstring>.

The request is as follows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<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:eventTypeList/>

      <even:resourceIdList/>

      <even:callbackServiceInfo>

        <even1:callbackServiceUrl>http://192.168.6.61/webmail</even1:callbackServiceUrl>

      </even:callbackServiceInfo>

      <even:expiration>2015-10-26T21:32:52</even:expiration>

    </even:subscribe>

  </soapenv:Body>

</soapenv:Envelope>

RAW data:

POST /messageeventservice/services/MessageEventService HTTP/1.1

Host: 192.168.6.169

Authorization: Basic QWRtaW5pc3RyYXRvcjpJY2UyM3dhcnA=

connection:close

Content-Length: 644

Content-Type: text/xml

SOAPAction:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><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:eventTypeList/>     <even:resourceIdList/>     <even:callbackServiceInfo>        <even1:callbackServiceUrl>http://192.168.6.61/webmail</even1:callbackServiceUrl>     </even:callbackServiceInfo>     <even:expiration>2015-10-26T21:32:52</even:expiration>  </even:subscribe></soapenv:Body></soapenv:Envelope>

The corresponding response:  (RAW)

HTTP/1.1 500 Internal Server Error

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Thu, 03 Apr 2014 07:11:44 GMT

Connection: close

Server: 

112

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Please do you have any hints how to solve this?

Thanks

Josef Andrysek

1 Accepted Solution

Accepted Solutions

lindborg
Cisco Employee
Cisco Employee

  I just did a quick test using the CUNI SDK (available via NuGet) and captured the output against my 10.0 server (details below). If you’re interested in using the CUNI SDK for testing and such check out the home page here:

http://www.ciscounitytools.com/CodeSamples/Connection/Notifications/NotificationSdk.html


there’s some training videos to help get you started but in short about 10 lines of code will get you monitoring message event notification – doesn’t get any easier.  And if you’re developing in Java or Python or whatever you can use it as a test bed (a number of sites I work with use the various REST SDKs for this purpose).


Anyway – my Connection server is “192.168.0.188” here and I’m setting up a notification callback to my Windows 7 dev box at “192.168.0.99”.  I’m telling it to monitor “operator” and “jlindborg” mailboxes (aliases for users on the Connection server).  The request and response details look like this:


Request:


POST http://192.168.0.188/messageeventservice/services/MessageEventService


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <subscribe xmlns="http://unity.cisco.com/messageeventservice/event">
      <resourceType />
      <eventTypeList xsi:nil="true" />
      <resourceIdList>
        <string>operator</string>
        <string>jlindborg</string>
      </resourceIdList>
      <callbackServiceInfo>
        <callbackServiceUrl xmlns="http://event.messageeventservice.unity.cisco.com">http://192.168.0.99:8080/MessageEvent/AllEvents</callbackServiceUrl>
        <hostname xmlns="http://event.messageeventservice.unity.cisco.com">192.168.0.99</hostname>
        <password xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <protocol xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <sslCertificates xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <username xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
      </callbackServiceInfo>
      <expiration>2014-04-25T12:26:37.1445312-07:00</expiration>
      <keepAliveInterval>1</keepAliveInterval>
    </subscribe>
  </soap:Body>
</soap
:Envelope>

Response:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ns2:subscribeResponse xmlns:ns2="http://unity.cisco.com/messageeventservice/event">
      <ns2:out>
        <ns1:subscriptionId xmlns:ns1="http://event.messageeventservice.unity.cisco.com">ab260b3e-3923-440e-b0d0-d1f8b86cfd8a</ns1:subscriptionId>
      </ns2:out>
    </ns2:subscribeResponse>
  </soapenv:Body>
</soapenv
:Envelope>

View solution in original post

3 Replies 3

lindborg
Cisco Employee
Cisco Employee

  I just did a quick test using the CUNI SDK (available via NuGet) and captured the output against my 10.0 server (details below). If you’re interested in using the CUNI SDK for testing and such check out the home page here:

http://www.ciscounitytools.com/CodeSamples/Connection/Notifications/NotificationSdk.html


there’s some training videos to help get you started but in short about 10 lines of code will get you monitoring message event notification – doesn’t get any easier.  And if you’re developing in Java or Python or whatever you can use it as a test bed (a number of sites I work with use the various REST SDKs for this purpose).


Anyway – my Connection server is “192.168.0.188” here and I’m setting up a notification callback to my Windows 7 dev box at “192.168.0.99”.  I’m telling it to monitor “operator” and “jlindborg” mailboxes (aliases for users on the Connection server).  The request and response details look like this:


Request:


POST http://192.168.0.188/messageeventservice/services/MessageEventService


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <subscribe xmlns="http://unity.cisco.com/messageeventservice/event">
      <resourceType />
      <eventTypeList xsi:nil="true" />
      <resourceIdList>
        <string>operator</string>
        <string>jlindborg</string>
      </resourceIdList>
      <callbackServiceInfo>
        <callbackServiceUrl xmlns="http://event.messageeventservice.unity.cisco.com">http://192.168.0.99:8080/MessageEvent/AllEvents</callbackServiceUrl>
        <hostname xmlns="http://event.messageeventservice.unity.cisco.com">192.168.0.99</hostname>
        <password xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <protocol xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <sslCertificates xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
        <username xsi:nil="true" xmlns="http://event.messageeventservice.unity.cisco.com" />
      </callbackServiceInfo>
      <expiration>2014-04-25T12:26:37.1445312-07:00</expiration>
      <keepAliveInterval>1</keepAliveInterval>
    </subscribe>
  </soap:Body>
</soap
:Envelope>

Response:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ns2:subscribeResponse xmlns:ns2="http://unity.cisco.com/messageeventservice/event">
      <ns2:out>
        <ns1:subscriptionId xmlns:ns1="http://event.messageeventservice.unity.cisco.com">ab260b3e-3923-440e-b0d0-d1f8b86cfd8a</ns1:subscriptionId>
      </ns2:out>
    </ns2:subscribeResponse>
  </soapenv:Body>
</soapenv
:Envelope>

Thank you very much. I discovered that the problem was sending empty <resourceIdList/>. I found somewhere that this enables notifications for any account, but it seems that it is not supported by CUC. The SDK is also very useful. 

Originally there was supposed to be the ability to register for all users on the box but keeping this updated as users were added and removed across potentially multiple subscriptions was a little problematic - so static lists of aliases are required for each subscription - at least one at a minimum.

Getting Started

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:

Recognize Your Peers