Re: New Message from Keith Lunn in Administration XML (AXL) -Administration

Version 1
    This document was generated from CDN thread

    Created by: Wes Schochet on 03-11-2009 10:46:35 PM
    I have had success with a slightly more condensed format that skips the array and id reference syntax.  And yes, no header.  I believe this format was coded by a human rather than a RAD tool:

    <soapenv:Envelope xmlns:soapenv="" xmlns:soapenc="" xmlns:tns="" xmlns:types="" xmlns:xsi="" xmlns:xsd="">
          <ns1:SelectCmDevice soapenv:encodingStyle="" xmlns:ns1="">
          <StateInfo xsi:type="xsd:string"/>
          <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
          <Class xsi:type="xsd:string">Phone</Class>
          <Model xsi:type="xsd:unsignedInt">255</Model>
          <Status xsi:type="xsd:string">Registered</Status>
          <NodeName xsi:type="xsd:string" xsi:nil="true"/>
          <SelectBy xsi:type="xsd:string">Name</SelectBy>
              <Item xsi:type="xsd:string">SEP002333417023</Item>

    >>> On 11/3/2009 at 3:47 PM, in message <>, Cisco Developer Community Forums <> wrote:
    Keith Lunn has created a new message in the forum "Administration XML Questions":
    Hello Folks,
    Env=CUCM 6.13, RIS port request to get status on a single phone by device name.
    Programming Language: WSH 5.7/cscript; JScript
    This is my first attempt on creating a RIS port request and after reading the chapter in the XML Devleopers guide (v6.01)- I am throughly confused!!

    Here is my SOAP payload I am sending - it returns http error 500 - can someone give me some guidence on how to debug?

    [Execution Example]
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.

    RIS SOAP Request=[
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="<a></a>]"
    xmlns:xsi="<a></a>]" xmlns:xsd="<a></a>]">
    <tns:AstHeader id="id1"> <SessionId xsi:type="xsd:string">600</SessionId>
    <soap:Body soap:encodingStyle="<a></a>]">
    <StateInfo xsi:type="xsd:string" />
    <CmSelectionCriteria href="#id1"/>
    <tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">
    <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
    <NodeName xsi:type="xsd:string" xsi:nil="true"/>
    <SelectBy xsi:type="tns:CmSelectBy">Name</SelectBy>
    <SelectItems href="#id2" />Name</tns:CmSelectionCriteria
    <soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[1]">
    <Item href="#id3"/><Item xsi:null="1"/>
    <tns:SelectItem id="id3" xsi:type="tns:SelectItem">
    <Item xsi:type="xsd:string"/>SEP0017593F52C4</Item>
    ] Len[1254] SEQ#[600]
    Transmitting RIS Request to [https://613pub:8443/realtimeservice/services/RisPort/] for UID[user1]
    RIS Return HTTP Status=>500
    A critical RIS HTTP Error has occurred. Status=[500]

    Other questions:
    #1 - I have noticed in the forum many people are not coding the SOAP Header and their code seems to execute ok - but the xml developers guide shows a header example with a session ID - so if I don't include this, am I creating a problem?

    #2 - MaxReturnedDevices - I have seen users code 10 - 1000 for this parm - what is the exact meaning of this parm. I thought you could only query a max of 200 devices at a time so what is the purpose of this parm? Why would someone code 1000 for this parm?

    #3 - an array of items to get status for. The xml developers guide shows the use of #id2, #id3 - what are these ids used for and what is their significance? Example from guide:
    #4 - What is this: ="tns:SelectItem[2]" and what significance does the "2" have? Is this the number of item rows that are coded?

    Array of Items for Which Search Criteria Are Specified

    The following example specifies an array that contains the IP Address or Device Name of the items for
    which a real-time status is required.

    23. <SelectItems href="#id2" />Name or IP</tns:CmSelectionCriteria
    24. <soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[2]">
    25. <Item href="#id3"/><Item xsi:null="1"/>
    26. </soapenc:Array>
    27. <tns:SelectItem id="id3" xsi:type="tns:SelectItem">
    28. <Item xsi:type="xsd:string"/></tns:SelectItem>
    29. </soap:Body>
    30. </soap:Envelope>

    Thanks for any guidenace and ideas and suggestions!!!

    To respond to this post, please click the following link:
    or simply reply to this email.

    Subject: RE: Re: New Message from Keith Lunn in Administration XML (AXL) -Administra
    Replied by: Stephan Steiner on 04-11-2009 01:53:12 AM
    You can also leave out the whole xsi: tags.
    For a condensed query that queries specific phones (but multiple ones), check the netpro forum (ip phone services for developers) for posts on that topic by myself.. I have a nice example (that took me long enough to work out).

    Subject: RE: Re: New Message from Keith Lunn in Administration XML (AXL) -Administra
    Replied by: Stephan Steiner on 05-11-2009 11:47:35 PM
    Is the WSDL not self contained in this instance? If it is not, and you get the WSDL from your server, it should contain a reference to the XSD file.
    And yes.. if the syntax is wrong, you'll probably get a 500 error - it's a bit different than with CCM - it doesn't really tell you what is going wrong in most times whereas with AXL you have at least some semblance of a useful error message.
    Also make sure you send the appropriate SOAP header... with AXL you can leave up the DB version, but the RisPort is a stickler for those things.