LineSelectOrder and ListLineGroup

Version 1
    This document was generated from CDN thread

    Created by: troehler michael on 18-05-2011 12:17:51 PM
    Hi,
     
    I am trying to get names of all linegroup on my cucm and put member on it.
     
    I ) I try this code to get all line group :
     
    ===========================
    ListLineGroupReq        listLG        = new ListLineGroupReq();
    ListLineGroupRes        listRes    = new ListLineGroupRes();
    Vector<Serializable>    returnCisco    = null;
                    
    ListLineGroupReqSearchCriteria    LlgSearchCriteria = new ListLineGroupReqSearchCriteria();
    LlgSearchCriteria.setName("");
    listLG.setSearchCriteria(LlgSearchCriteria);

    LLineGroup returnedTags = new LLineGroup();
    listLG.setReturnedTags(returnedTags);
           
            //send
            try {
                returnCisco = action.sendRequestCiscoRead(listLG, CRNumber);
            } catch (Exception e) {
                log.logAction("FATAL", "ActionDeleteAgent{}", "getProfileNameANDPattern", "Send request to cisco - read mode: ", e);
            }

            if (returnCisco.get(0) != null){
                listRes = (ListLineGroupRes)returnCisco.get(0);
                log.logAction("INFO", "ActionListLineGroup{}", "getLineGroup", "sizeof:" + returnCisco.size(), null);
                LLineGroup[]    Llg = new LLineGroup[listRes.get_return().length];
                Llg = listRes.get_return();
                return Llg;
        }
    ============================
    I do not understand what is exactly "ListLineGroupReqSearchCriteria " because i thing it is why i can not get my line group.
    And why i have to setReturnedTags ?
    listRes.get_return() has nothing inside... so the request is ok.
     
     
    II) add a member in a line group
    =====
            UpdateLineGroupReq        ulg            = new UpdateLineGroupReq();
            LineGroupSoap            lineGroup    = new LineGroupSoap();
            ulg = lineGroup.AddMemberInLineGroup(nameLineGroup, CRNumber, internalNumber, matricule);

            action.sendRequestCiscoWrite(tabFields, CRNumber);
    =====
            public    UpdateLineGroupReq    AddMemberInLineGroup(String nameLineGroup, String cRNumber, String internalNumber, String matricule) {
                UpdateLineGroupReq        uplg = new UpdateLineGroupReq();         
                uplg.setName(nameLineGroup);
              
                XLineGroupMember[]    xlineGM    = new XLineGroupMember[1];
               
                xlineGM[0] = new XLineGroupMember();

                BigInteger nb        = BigInteger.valueOf(0);
                XInteger lineSelect = new XInteger();
                lineSelect.setValue(nb);           
                xlineGM[0].setLineSelectionOrder(lineSelect);
                XDirn                xDirn        = new XDirn();
                xDirn.setPattern(internalNumber);
                XFkType                xfkType        = new XFkType();
                xfkType.setUuid(conf.routePartitionName);
                xDirn.setRoutePartitionName(xfkType);
                xlineGM[0].setDirectoryNumber(xDirn);
                uplg.setAddMembers(xlineGM);
                return uplg;   
            }
    =====
     
    the error SOAP is
    2011-05-18 18:16:42,003 INFO  Log logAction Class: Action{} - Method: sendRequestCiscoFromQueue - ERROR WRITE : updateLineGroup - Cisco return = union value 'com.cisco.www.AXL.API._8_0.XInteger@1' does not match any members of 'XInteger in namespace http://www.cisco.com/AXL/API/8.0'
     
    What am i supposed to set inside this types ?
     
    I am using wsdl 8.0 and cucm 8.5
     
    Thanks a lot for you help,

    Subject: RE: LineSelectOrder and ListLineGroup
    Replied by: troehler michael on 20-05-2011 08:34:34 AM
    Hi,

    I saw in an other thread you have to put  % inside SearchCriteria.

    But the return of cisco has something strange, it returns me an good Uuid but the name is null ...
    So actually i make an other action with GetLineGroup with uuid and it returns me the good name.

    little bit tricky

    Subject: RE: LineSelectOrder and ListLineGroup
    Replied by: troehler michael on 25-05-2011 10:52:09 AM
    anybody know when i want to list something like that :

    1        ListCallPickupGroupReqSearchCriteria searchCriteria = new ListCallPickupGroupReqSearchCriteria();
    2        searchCriteria.setPattern("%");



    or

    1        ListLineGroupReqSearchCriteria    LlgSearchCriteria = new ListLineGroupReqSearchCriteria();
    2        LlgSearchCriteria.setName("%");



    i can get only Uuid, all of attributs are null ...

    Thanks for  your help,