cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1402
Views
3
Helpful
10
Replies

AXL SOAP delete contact not working

Laura Mayer
Level 1
Level 1

Hello,

I was finally able to figure out how to do this and I get a succeeded message but the contact list is not being updated. It worked great yesterday now of course when I sit down to document the steps it stops working. Can someone tell me why?

  1. <?xml version="1.0" encoding="UTF-8"?> 
  2. <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
  5. xmlns:epas="urn:cisco:epas:soap" 
  6. xmlns="urn:cisco:epas:soap"> 
  7. <soapenv:Header> 
  8. <session-key>b2a9c7d9-b08e-a64f-1414-58f0039c5585</session-key
  9. </soapenv:Header> 
  10. <soapenv:Body> 
  11. <delete-contact> 
  12. <group name="MIS"
  13. <persona-id>lmtest</persona-id> 
  14. </group> 
  15. </delete-contact> 
  16. </soapenv:Body> 
  17. </soapenv:Envelope> 

And the result:

  1. <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope
  2.    xmlns:xsd="http://www.w3.org/2001/XMLSchema
  3.    xmlns:xml="http://www.w3.org/XML/1998/namespace
  4.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
  5. <env:Body> 
  6.   <epas:delete-contact-resp  xmlns:epas="urn:cisco:epas:soap"
  7.     <epas:status ret-code="0" persona-id="lmtest" group="MIS">succeeded</epas:status> 
  8.   </epas:delete-co
  9. <?xml version='1.0' ?> 
  10. ntact-resp> 
  11. </env:Body> 
  12. </env:Envelope> 

but when I look at my contact list its still there.

Any ideas would be great.

Thanks

Laura

1 Accepted Solution

Accepted Solutions

npetrele
Cisco Employee
Cisco Employee

I tested it on servers with the same version.  It says the operation succeeded even if you don't specify the contact correctly (which is a defect, IMO, and should be fixed). In that case, it will say it succeeded, but won't remove the contact you thought you wanted to remove.  But if you specify the contact (persona-id) correctly, it does remove the contact. 


First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete.  Then make sure you have specified the correct group and persona-id.  The following works for me:


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">

   <soap:Header>

      <urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>

   </soap:Header>

   <soap:Body>

      <urn:delete-contact>

         <urn:group name="Nicholas Contacts">

            <urn:persona-id>elmer</urn:persona-id>

         </urn:group>

      </urn:delete-contact>

   </soap:Body>

</soap:Envelope>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <env:Body>

      <epas:delete-contact-resp xmlns:epas="urn:cisco:epas:soap">

         <epas:status ret-code="0" persona-id="elmer" group="Nicholas Contacts">succeeded</epas:status>

      </epas:delete-contact-resp>

   </env:Body>

</env:Envelope>

Depending upon how your server is configured, you may need to add the domain, so that it looks more like this:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">

   <soap:Header>

      <urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>

   </soap:Header>

   <soap:Body>

      <urn:delete-contact>

         <urn:group name="Nicholas Contacts">

            <urn:persona-id domain="cisco.com">elmer</urn:persona-id>

         </urn:group>

      </urn:delete-contact>

   </soap:Body>

</soap:Envelope>

View solution in original post

10 Replies 10

npetrele
Cisco Employee
Cisco Employee

What version of Cisco IMP (CUPS) server are you running?  What version of CUCM? 

Hi Nicholas,

cups = 10.5.1.10000-9

CUCM = 10.5.1.10000-7

Thanks

Laura

Thanks - I didn't forget about you.  We had to fix our lab servers after moving them to a new location.  They're working now, so I'll check into this tonight or tomorrow. 

npetrele
Cisco Employee
Cisco Employee

I tested it on servers with the same version.  It says the operation succeeded even if you don't specify the contact correctly (which is a defect, IMO, and should be fixed). In that case, it will say it succeeded, but won't remove the contact you thought you wanted to remove.  But if you specify the contact (persona-id) correctly, it does remove the contact. 


First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete.  Then make sure you have specified the correct group and persona-id.  The following works for me:


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">

   <soap:Header>

      <urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>

   </soap:Header>

   <soap:Body>

      <urn:delete-contact>

         <urn:group name="Nicholas Contacts">

            <urn:persona-id>elmer</urn:persona-id>

         </urn:group>

      </urn:delete-contact>

   </soap:Body>

</soap:Envelope>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <env:Body>

      <epas:delete-contact-resp xmlns:epas="urn:cisco:epas:soap">

         <epas:status ret-code="0" persona-id="elmer" group="Nicholas Contacts">succeeded</epas:status>

      </epas:delete-contact-resp>

   </env:Body>

</env:Envelope>

Depending upon how your server is configured, you may need to add the domain, so that it looks more like this:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">

   <soap:Header>

      <urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>

   </soap:Header>

   <soap:Body>

      <urn:delete-contact>

         <urn:group name="Nicholas Contacts">

            <urn:persona-id domain="cisco.com">elmer</urn:persona-id>

         </urn:group>

      </urn:delete-contact>

   </soap:Body>

</soap:Envelope>

I think that might be my problem:

    "First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete."


I am needing to delete this for all users like when someone leaves the company. I just took the session key from a webpage and pasting it. I thought it worked because as you said it said succeeded. 


Is there a way to incorporate a session key into the delete request itself?


Thanks again for all your help and time.


Laura

It sounds like you want to delete a user from the system, not delete a contact from someone's roster.  Is that the case? 

Or are you trying to delete a contact from everyone's roster, but let that person remain in the system? 

If the person leaves the company I want to delete them from the system and the rosters for everyone. Can I do that? If I can only delete them from the rosters I'll take that too.

Thanks

Laura

Hi Nicholas,

I had to call cisco there was something else going on as well. Its working now with the script you gave me above. Thank you so much for all your help as always.

Laura

Great, glad to hear you've got something working!  If you want to delete a person from the system, you need to do that in CUCM, and then the delete operation will automatically sync to your CIMP/CUP server.  You can do that manually in the CUCM web UI, or with AXL (not EPASSoap, but in administrative XML for CUCM).  Here's an example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:removeUser>

         <userid>nicholas</userid>

      </ns:removeUser>

   </soapenv:Body>

</soapenv:Envelope>

The URI for this operation would be something like https://yourcucmserver.com:8443/axl/

Thanks as always Nicholas! Have a great weekend.

Laura

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: