cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
163
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Stephan Steiner on 10-06-2011 12:21:31 PM
Any .NET developers using CUPI out there? It's my first RESTful webservice, and I'e like to avoid writing xml manually at all cost (doing enough of that for CUCM AXL already)- so I've been looking for WADL proxy generators, but the only one I managed to start is wadlsharp - and that chokes on the CUPI 8.5 WADL file.
 
Any suggestions as to how to get started quickly and efficiently? I've already looked at the sample linked in the wiki - but I see quite a bit of manual xml there - aren't we supposed to have it easier in this day and age?

Subject: RE: New Message from Stephan Steiner in Cisco Unity Connection Provisioning
Replied by: Matthew Penning on 10-06-2011 12:48:54 PM
Hi Stephen ¿ one thing you might want to take a look at is how to generate code from the .xsd files instead of from the WADL.  The WADL only describes the URLs and methods (get/put/etc), where as the .xsd files are what defines the XML.  All of the .xsd files are available on the connection server itself at /vmrest/schema (that will give you a list).



So for example, you might be able to use /vmrest/schema/User.xsd to generate a User.cs file to do the xml parsing for you.



One thing to be careful of though: when you update just a single field, you really want to send only that one field back to the server.  Using User as an example again, you¿d want to do something like this to change firstname:



POST /vmrest/users/{myuserid}



<User>

                <FirstName>MyNewFirstName</FirstName>

</User>



Whereas if you did this:



User u = getUser(myuserid);

u.FirstName=¿bill¿;

HttpPost(¿/vmrest/user/myuserid¿,u.toString());



That would send the whole user object back.  It¿s not the end of the world, but it¿s not very clean ¿ obviously more data going over the wire, more processing goes on in the server, and you increase the chance for conflicts.



~ Matt



From: Cisco Developer Community Forums [mailto:[email protected]]
Sent: Friday, June 10, 2011 9:22 AM
To: [email protected]
Subject: New Message from Stephan Steiner in Cisco Unity Connection Provisioning Interface (CUPI) - CUPI Questions: Getting started with .NET



Stephan Steiner has created a new message in the forum "CUPI Questions":

--------------------------------------------------------------
Any .NET developers using CUPI out there? It's my first RESTful webservice, and I'e like to avoid writing xml manually at all cost (doing enough of that for CUCM AXL already)- so I've been looking for WADL proxy generators, but the only one I managed to start is wadlsharp - and that chokes on the CUPI 8.5 WADL file.

Any suggestions as to how to get started quickly and efficiently? I've already looked at the sample linked in the wiki - but I see quite a bit of manual xml there - aren't we supposed to have it easier in this day and age?
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cupi/forums/-/message_boards/view_message/4031666>

or simply reply to this email.
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:

Quick Links