Re: CISCO getting user information, like login / name

Jörg Wiesmann <[email protected]> Wed, 22 Mar 2006 11:24:13 +0100
Newsgroups gmane.comp.java.sun.jtapi
Message-ID <[email protected]>
Hi,

it helps me out a little bit, i start understanding what this soap
request is all about, but i guess
i cannot use it, cause i do not have admin rights for the callmanager, i
am just using cti, to
connect to some phones and do not have any possibility to manage the
callmanager itself.
Whatever, i ask the admin to give me an account and i can access the
server with status 200 now,
but i always get an error back, for example i login with my username,
ask for that username and
the response is, that i (the userid) does not exist :-(
And ofcourse, i do not have any userIds, i just have the phonenumber and
its
phoneid / terminalconnection

Is it may possible to just get all users and its phoneid, to figure out,
who tries to connect via cti?
for example:
<getAllUsers></getAllUsers>
or something like that?
Where do you got that xml - tags from? You may got a link for me?
I just found the "AXL Serviceability API Programming Guide
<http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_reference_guide09186a00802e3df8.html>"
and something like that .. hmmm

btw. thanx a lot Ana :-)

greetz Jörg!


Ana Soares wrote:
> Hello,
>
> Here I'll show you an example to get information from one user - lock.
>
> String sAXLSOAPRequest = null;        // will hold the complete request,
>                                               // HTTP header and SOAP
> payload
>         String sAXLRequest = null;            // will hold only the
> SOAP payload
>         Socket socket = null;                 // socket to AXL server
>         OutputStream out = null;              // output stream to server
>         InputStream in = null;                // input stream from server
>         byte[] bArray = null;                 // buffer for reading
> response from server
>     ArrayList listaDevices = new ArrayList();
>
>
>         // Build the HTTP Header
>         sAXLSOAPRequest = "POST /CCMApi/AXL/V1/soapisapi.dll \r\n";
>
>       sAXLSOAPRequest += "Host: " + server + ":" + port + "\r\n";
>     sAXLSOAPRequest += "Authorization: Basic "+ pass + "\r\n";
>
>         sAXLSOAPRequest += "Content-type: text/xml\r\n";
>         sAXLSOAPRequest += "Content-length: ";
>         sAXLRequest =  "<SOAP-ENV:Envelope
> xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\
> <http://schemas.xmlsoap.org/soap/envelope/%5C>" " ;
>         sAXLRequest += "xmlns:xsi=\"
> http://www.w3.org/2001/XMLSchema-instance\
> <http://www.w3.org/2001/XMLSchema-instance%5C>" ";
>         sAXLRequest += "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\
> <http://www.w3.org/2001/XMLSchema%5C>">";
>         sAXLRequest += "<SOAP-ENV:Body>";
>         sAXLRequest += "<axl:getUser
> xmlns:axl=\"http://www.cisco.com/AXL/1.0\
> <http://www.cisco.com/AXL/1.0%5C> "
> xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0
> http://gkar.cisco.com/schema/axlsoap.xsd\
> <http://gkar.cisco.com/schema/axlsoap.xsd%5C>" sequence=\"1234\">";
>         sAXLRequest += "<userid>lock</userid>";
>         sAXLRequest += "</axl:getUser>";
>         sAXLRequest += "</SOAP-ENV:Body>";
>         sAXLRequest += "</SOAP-ENV:Envelope>";
>
>         // finish the HTTP Header
>         sAXLSOAPRequest += sAXLRequest.length();
>         sAXLSOAPRequest += "\r\n\r\n";
>
>         // now add the SOAP payload to the HTTP header, which
> completes the AXL SOAP
>     sAXLSOAPRequest += sAXLRequest;
>
>         // now that the message has been built, we can connect to
> server and send it
>
>         try{
>       Socket = new Socket(server, 80);
>
>             out = socket.getOutputStream();
>             in = socket.getInputStream();
>
>             // send the request to the host
>             out.write(sAXLSOAPRequest.getBytes());
>             // read the response from the host
>             StringBuffer sb = new StringBuffer(2048);
>             bArray = new byte[2048];
>             int ch = 0;
>             int sum = 0;
>             while ( (ch = in.read(bArray)) != -1 ){
>                 sum += ch;
>                 sb.append(new String(bArray, 0, ch));
>             }
>             socket.close();
>
> Then you can look for the information you want in the response from de
> server.
>
> Ana
>
>
> On 3/21/06, *Jörg Wiesmann* <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Hello Ana,
>
>     "I hope it help's", sorrily not :-)
>     You may have any example for me? I do not really understand what
>     you mean.
>     Regards Jörg
>
>     Ana Soares wrote:
>     > Hi,
>     >
>     > Normaly to get information from the user, or from the phone I will
>     > make a soap request to the server.
>     > This request has in the body an AXL method.
>     >
>     > I hope it help's
>     >
>     > Ana
>     >
>     > On 3/21/06, *Jörg Wiesmann* < [email protected]
>     <mailto:[email protected]>
>     > <mailto:[email protected]
>     <mailto:[email protected]>>> wrote:
>     >
>     >     Hello,
>     >
>     >     i wrote a quite fine working application with the usabillity of
>     >     CTI with the
>     >     CISCO implementation.
>     >     But now i got to add more phones to the application, which
>     got the
>     >     same
>     >     number, but different terminals.
>     >     In fact that any user is able to connect to any phone, doesn´t
>     >     care of the
>     >     MAC-Address, it is hard to find out which terminal i shall
>     connect
>     >     to the
>     >     server.
>     >
>     >     My question is:
>     >     Is there any possibility to get the userinformation from phone?
>     >     Like the login or the name assigned in the callmanager?
>     >     Any help would be great!
>     >
>     >     Thanks Jörg!
>     >
>     >
>     ===========================================================================
>
>     >     To unsubscribe, send email to [email protected]
>     <mailto:[email protected]>
>     >     <mailto:[email protected]
>     <mailto:[email protected]>> and include in the body
>     >     of the message "signoff JTAPI-INTEREST".  For general help, send
>     >     email to
>     >     [email protected] <mailto:[email protected]>
>     <mailto: [email protected] <mailto:[email protected]>> and
>     include
>     >     in the body of the message "help".
>     >
>     >
>     >
>     ===========================================================================
>     > To unsubscribe, send email to [email protected]
>     <mailto:[email protected]> and include in the
>     > body of the message "signoff JTAPI-INTEREST". For general help, send
>     > email to [email protected] <mailto:[email protected]>
>     and include in the body of the message
>     > "help".
>
>     ===========================================================================
>     To unsubscribe, send email to [email protected]
>     <mailto:[email protected]> and include in the body
>     of the message "signoff JTAPI-INTEREST".  For general help, send
>     email to
>     [email protected] <mailto:[email protected]> and include
>     in the body of the message "help".
>
>
> ===========================================================================
> To unsubscribe, send email to [email protected] and include in the
> body of the message "signoff JTAPI-INTEREST". For general help, send
> email to [email protected] and include in the body of the message
> "help".

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JTAPI-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".