cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1131
Views
1
Helpful
4
Replies
Highlighted

Problem with wsdl file on the RisPort

Hi Cisco,

I think there is a discrepancy between the definition of services as defined in the wsdl file and what the cucm server accepts

Version is 9.1

I am trying to use the SelectCmDevice. According to the wsdl it has a part called StateInfo and another one called CmSelectionCriteria

Both of them need to exist

Now if I go to CmSelectionCriteria I see that it contains 7 elements

MaxReturnedDevices

Class

Model

Status

NodeName

SelectBy

SelectItems

The mandatory ones are Status and SelectBy. The other can be omitted as there is nillable=True. The problem is with the last element 'SelectItems'

If the soap request contains it, the server returns the following

java.lang.ArrayIndexOutOfBoundsException

This error tells me that the soap request contains too many elements (and thus the array is bigger than what cucm expects)

I am using a client (suds) that is constructing the queries based on the wsdl files so that I don't have to bother with manually creating every request

Non working request

--------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://schemas.cisco.com/ast/soap/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Header/>

<ns1:Body>

    <ns2:SelectCmDevice>

        <StateInfo xsi:type="ns0:string"></StateInfo>

        <CmSelectionCriteria xsi:type="ns2:CmSelectionCriteria">

            <ns2:MaxReturnedDevices xsi:type="ns0:unsignedInt">3</ns2:MaxReturnedDevices>

            <ns2:Class xsi:type="ns0:string">Phone</ns2:Class>

            <ns2:Model xsi:type="ns0:unsignedInt" xsi:nil="true"/>

            <ns2:Status xsi:type="ns0:string">Registered</ns2:Status>

            <ns2:NodeName xsi:type="ns0:string" xsi:nil="true"/>

            <ns2:SelectBy xsi:type="ns0:string">Name</ns2:SelectBy>

            <ns2:SelectItems xsi:type="ns2:SelectItems"/>

        </CmSelectionCriteria>

    </ns2:SelectCmDevice>

</ns1:Body>

</SOAP-ENV:Envelope>

Working Request

------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:ns0="http://schemas.cisco.com/ast/soap/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Header/>

    <ns1:Body>

        <ns0:SelectCmDevice>

            <StateInfo xsi:type="ns2:string"></StateInfo>

            <CmSelectionCriteria xsi:type="ns0:CmSelectionCriteria">  

                <ns0:MaxReturnedDevices xsi:type="ns2:unsignedInt">3</ns0:MaxReturnedDevices>

                <ns0:Class xsi:type="ns2:string">Phone</ns0:Class>

                <ns0:Model xsi:type="ns2:unsignedInt" xsi:nil="true"/>

                <ns0:Status xsi:type="ns2:string">Registered</ns0:Status>

                <ns0:NodeName xsi:type="ns2:string" xsi:nil="true"/>

                <ns0:SelectBy xsi:type="ns2:string">Name</ns0:SelectBy>

            </CmSelectionCriteria>

        </ns0:SelectCmDevice>

    </ns1:Body>

</SOAP-ENV:Envelope>

You can see that the only thing missing is the SelectItems element. So either the wsdl is not correct or the cucm is not accepting the proper requests as far as I can tell

Regards,

Christos

Everyone's tags (7)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: Problem with wsdl file on the RisPort

The WSDL is somewhat confusing in that there is an array type defined as 'ArrayofSelectItem', but the actual array elements are named 'item' (naming them 'SelectItem' would have been clearer, I think.)  However, the schema and implementation do work, the resulting request should look something like:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

   <soapenv:Header/>

   <soapenv:Body>

      <soap:selectCmDevice>

         <soap:StateInfo></soap:StateInfo>

         <soap:CmSelectionCriteria>

            <soap:MaxReturnedDevices>1000</soap:MaxReturnedDevices>

            <soap:DeviceClass>Any</soap:DeviceClass>

            <soap:Model>255</soap:Model>

            <soap:Status>Any</soap:Status>

            <soap:NodeName></soap:NodeName>

            <soap:SelectBy>Name</soap:SelectBy>

            <soap:SelectItems>

               <soap:item>

                  <soap:Item>IPCMRAEU5UCM5X7</soap:Item>

               </soap:item>

               <soap:item>

                  <soap:Item>IPCMRAEU5UCM5X8</soap:Item>

               </soap:item>

            </soap:SelectItems>

         </soap:CmSelectionCriteria>

      </soap:selectCmDevice>

   </soapenv:Body>

</soapenv:Envelope>

View solution in original post

4 REPLIES 4
Highlighted
Cisco Employee

Re: Problem with wsdl file on the RisPort

I believe the SelectItems expects one or more items to be defined.  For example:

            <SelectItems xsi:type="soap:SelectItems" soapenc:arrayType="soap:SelectItem[]">

                  <soap:item>*</soap:item>

            </SelectItems>

This works, too:

            <soap:SelectItems>

                  <soap:item>*</soap:item>

            </SelectItems>

Highlighted

Re: Problem with wsdl file on the RisPort

Hi Nicolas,

Thanks for the quick reply! I think you are referring to SelectItem element and not SelectItems (with an s in the end)

I take it from wsdl file

<complexType name="SelectItems">

     <complexContent>

          <restriction base="soapenc:Array">

               <attribute ref="soapenc:arrayType" wsdl:arrayType="tns:SelectItem[]"/>

          </restriction>

     </complexContent>

Am I right to understand that the SelectItems is an array of type SelectItem ?

And that SelectItem contains just string items ?

<complexType name="SelectItem">

<sequence>

     <element name="Item" type="xsd:string"/>

</sequence>

I am confused a bit. When I print the SelectItems type I get this

(SelectItems){

   _arrayType = ""

   _offset = ""

   _id = ""

   _href = ""

   _arrayType = ""

}

When I print SelectItem I get this

(SelectItem){

   Item = None

}

And finally when I print the CmSelectionCriteria I get this

(CmSelectionCriteria){

   MaxReturnedDevices = None

   Class = None

   Model = None

   Status = None

   NodeName = None

   SelectBy = None

   SelectItems =

      (SelectItems){

         _arrayType = ""

         _offset = ""

         _id = ""

         _href = ""

         _arrayType = ""

      }

}

I see it contains already the SelectItems but not the SelectItem (without an s)

All the above is supposed to be constructed by the client based on the wsdl file. Is the file wrong or the client somehow constructs it wrongly ?

Highlighted
Cisco Employee

Re: Problem with wsdl file on the RisPort

The WSDL is somewhat confusing in that there is an array type defined as 'ArrayofSelectItem', but the actual array elements are named 'item' (naming them 'SelectItem' would have been clearer, I think.)  However, the schema and implementation do work, the resulting request should look something like:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

   <soapenv:Header/>

   <soapenv:Body>

      <soap:selectCmDevice>

         <soap:StateInfo></soap:StateInfo>

         <soap:CmSelectionCriteria>

            <soap:MaxReturnedDevices>1000</soap:MaxReturnedDevices>

            <soap:DeviceClass>Any</soap:DeviceClass>

            <soap:Model>255</soap:Model>

            <soap:Status>Any</soap:Status>

            <soap:NodeName></soap:NodeName>

            <soap:SelectBy>Name</soap:SelectBy>

            <soap:SelectItems>

               <soap:item>

                  <soap:Item>IPCMRAEU5UCM5X7</soap:Item>

               </soap:item>

               <soap:item>

                  <soap:Item>IPCMRAEU5UCM5X8</soap:Item>

               </soap:item>

            </soap:SelectItems>

         </soap:CmSelectionCriteria>

      </soap:selectCmDevice>

   </soapenv:Body>

</soapenv:Envelope>

View solution in original post

Highlighted

Re: Problem with wsdl file on the RisPort

Thanks ! Since I don't have the skill to verify if the wsdl file is wrong (it looks ok from what I can tell) then I will have to assume that it's the client that malforms the query

In any case, I can workaround it, it's just that I want to avoid any manual intervention as much as possible

Regards,

Christos