Thanks George, but I still dont get it, I am not that familiar with this
part of the code.

Our deleteUser looks like this

 public void deleteSipXECSUser( String sipUserId ) {

  log.debug (" removeSipXECSUser id : " + sipUserId);
  ObjectFactory objectFactory = new ObjectFactory();

// Ask for user
      UserSearch usearch = new UserSearch();
      usearch.setByUserName( sipUserId );

ManageUser mUser = new ManageUser();
mUser.setSearch(usearch);
JAXBElement jelement = objectFactory.createManageUserDeleteUser( true );
mUser.setDeleteUser (jelement);

us.manageUser( mUser );
  }

while our editUser looks like this:

public void editSipXECSUser(
String sipUserId, String sipUserPassword,
String firstName, String surName,
String oldGroupId, String newGroupId ) {

log.debug (" removeSipXECSUser id : " + sipUserId);

User existingUser = getCurrentUser ( sipUserId );

if( existingUser == null ) {
addSipXECSUser( sipUserId, sipUserPassword, firstName, surName, newGroupId
);
editUserToUserGroup ( sipUserId, oldGroupId, newGroupId );
return;
}

// Ask for user
      UserSearch usearch = new UserSearch();
      usearch.setByUserName( sipUserId );

ManageUser mUser = new ManageUser();
mUser.setSearch( usearch );

mUser.getEdit( ); //??

editUserToUserGroup (sipUserId, oldGroupId, newGroupId);
  }



On Sun, Jul 1, 2012 at 9:58 PM, George Niculae <[email protected]> wrote:

> On Sun, Jul 1, 2012 at 11:52 PM, Sven Evensen <[email protected]>
> wrote:
> > Our application is adding and deleting users using SOAP just fine, But I
> > want to edit name and sipPassword and I just cannot figure out how. I
> aasume
> > ManagerUser is to be used somehow.
> >
> > Any tips?
> >
>
> Use ManageUser same way you use it for deleting user but with edit
> operation - you can pass sipPassword and userName/lastName/firstName
> with an User object. Check sipxconfig.wsdl,
>       <xsd:element name="ManageUser">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="search" type="tns:UserSearch"
> minOccurs="1" maxOccurs="1" />
>             <xsd:element name="edit" type="tns:Property"
> maxOccurs="unbounded" />
>             <xsd:element name="deleteUser" type="xsd:boolean"
> nillable="true" minOccurs="0" maxOccurs="1" />
>             <xsd:element name="addGroup" type="xsd:string"
> nillable="true" minOccurs="0" maxOccurs="1" />
>             <xsd:element name="removeGroup" type="xsd:string"
> nillable="true" minOccurs="0" maxOccurs="1" />
>             <xsd:element name="updateBranch" type="xsd:string"
> nillable="true" minOccurs="0" maxOccurs="1" />
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>
> and User type
>
>
> <xsd:complexType name="User">
>         <xsd:sequence>
>           <xsd:element name="userName" type="xsd:string" minOccurs="1"
> maxOccurs="1" />
>           <xsd:element name="pintoken" type="xsd:string"
> nillable="true" maxOccurs="1" />
>           <xsd:element name="lastName" type="xsd:string"
> nillable="true" maxOccurs="1" />
>           <xsd:element name="firstName" type="xsd:string"
> nillable="true" maxOccurs="1" />
>           <xsd:element name="sipPassword" type="xsd:string"
> nillable="true" maxOccurs="1" />
>           <xsd:element name="aliases" type="xsd:string"
> nillable="true" minOccurs="0" maxOccurs="unbounded" />
>           <xsd:element name="emailAddress" type="xsd:string"
> nillable="true" maxOccurs="1" />
>           <xsd:element name="groups" type="xsd:string" nillable="true"
> minOccurs="0" maxOccurs="unbounded" />
>           <xsd:element name="permissions" type="xsd:string"
> nillable="true" minOccurs="0" maxOccurs="unbounded" />
>           <xsd:element name="branchName" type="xsd:string"
> nillable="true" maxOccurs="1" />
>         </xsd:sequence>
>       </xsd:complexType>
>
>
> George
> _______________________________________________
> sipx-users mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipx-users/
>



-- 

*Sven Evensen, Operations Consultant*

*OnRelay*

Elizabeth House │ 39 York Road, London SE1 7NQ, UK │ +44 (0) 207 902 8123 │
mailto:[email protected] <[email protected]> │ www.onrelay.com


This electronic message transmission contains information from OnRelay,
Ltd., that may be confidential or privileged. The information is intended
solely for the recipient and use by any other party is not authorised. If
you are not the intended recipient, be aware that any disclosure, copying,
distribution or use of the contents of this information or any attachment,
is prohibited. If you have received this electronic transmission in error,
please notify us immediately by electronic mail ([email protected]) and
delete this message, along with any attachments, from your computer.
Registered in England No 04006093 ¦ Registered Office 1st Floor, 236 Gray's
Inn Road, London WC1X 8HB
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/

Reply via email to