Getting started with Java

Version 1
    This document was generated from CDN thread

    Created by: Doug Kartio on 23-06-2011 03:01:52 PM
    I have recently been asked to take a look into using java to provision unity users.  I have been using java to provision CUCM/CUPS through the AXL interface.
    I have looked at the "documentation" that is found in the docwiki, but have been able to do more than a simple get through Firefox.
    Does anyone have better documentation, or better yet, some java sample code I could look at.

    Subject: RE: Getting started with Java
    Replied by: Stephan Steiner on 24-06-2011 03:17:58 AM
    Not Java, but there's a C# example linked in the wiki:
    You need to check it out from the code repository and can then have a look. seeing as Java and C# are pretty similar, I think you'll be able to follow the example.
    Also, for Java you can generate a proxy for the WADL (like you can from the WSDL for SOAP services).. there's a bunch of code generators around (for C# the situation is more dire).

    Subject: RE: Getting started with Java
    Replied by: Doug Kartio on 24-06-2011 10:37:47 AM
    Stephan -

    Thanks for your help.  I am able to hit the server now.  Here's my next issue.

    I am able to do a GET for a particular user.

    GET /vmrest/users/f34daa87-a06c-4f6e-9125-dee46d767bbf

    but when I change that to either a DELETE, which is exactly the same except for the "DELETE" part or try and modify the user with a "PUT"

     3Sending message...
     5PUT /vmrest/users/f34daa87-a06c-4f6e-9125-dee46d767bbf HTTP/1.1
     7Authorization: Basic ZGthcnRpbzpUdW5kcmExMA==
     8Content-type: application/xml
     9Accept: application/xml
    10User-Agent: Java/1.6.0_24
    11Content-length: 103
    13<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    I get the following error:

     3Response Back...
     5HTTP/1.1 400 Bad Request
     6Pragma: No-cache
     7Cache-Control: no-cache
     8Expires: Wed, 31 Dec 1969 18:00:00 CST
     9Set-Cookie: JSESSIONIDSSO=FB1D12272C575A1E54330918F40EEB94; Path=/; Secure
    10Set-Cookie: JSESSIONID=F8158FD2258E4475D5EAF7FE9868E480; Path=/vmrest; Secure
    11Content-Type: application/xml
    12Transfer-Encoding: chunked
    13Date: Fri, 24 Jun 2011 14:36:16 GMT
    14Connection: close
    18<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ErrorDetails><errors><code>DATA_EXCEPTION</code><message>Subscriber not found </message></errors></ErrorDetails>

    Any ideas???


    Subject: RE: Getting started with Java
    Replied by: Christophe Baehr on 30-01-2012 07:28:34 AM
    I have the same problem, is someone could help me?
    Thanks in advance.