2011/5/16 Rajan, Nihar <[email protected]>

> < h t m l > < h e a d > < m e t a h t t p - e q u i v = " C o n t e n t - T
> y p e " c o n t e n t = " t e x t / h t m l ; c h a r s e t = u t f - 1 6 "
> > < / h e a d > < b o d y >
>  Hi,
>    I want to perform basic functions like add/delete users with sipxecs
> wsdl using java. I  bind sipxconfig.wsdl with JAXB and managed to compile
> and generate codes successfully.
> I tried to create users in my sipxecs server with following codes.
>
> package sipwsdltest;
> import javax.xml.bind.JAXB;
> import org.sipfoundry._2007._08._21.configservice.*;
>
>   public class sipwsdltest {
>     /**
>      * @param args the command line arguments
>      */
>     public static void main(String[] args) {
>
>        User usr = new User();
>         usr.setFirstName("Nihar");
>         usr.setLastName("Deb");
>         usr.setUserName("223");
>         usr.setSipPassword("1234");
>         usr.setEmailAddress("[email protected]");
>         AddUser addusr = new AddUser();
>         addusr.setPin("1234");
>         addusr.setUser(usr);
>
>         try {
>             javax.xml.bind.JAXBContext jaxbCtx =
> javax.xml.bind.JAXBContext.newInstance(addusr.getClass().getPackage().getName());
>             javax.xml.bind.Marshaller marshaller =
> jaxbCtx.createMarshaller();
>             marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING,
> "UTF-8"); //NOI18N
>
> marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT,
> Boolean.TRUE);
>             marshaller.marshal(addusr, System.out);
>
>         } catch (javax.xml.bind.JAXBException ex) {
>             // XXXTODO Handle exception
>
> java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE,
> null, ex); //NOI18N
>         }
>
>
>   }
>   }
>
> Can anyone kindly suggest me what is the flow of functions I need to call
> to create a user.
>
Here are some docs and samples (not in Java) on how to create an user:

http://wiki.sipfoundry.org/display/sipXecs/Configuration+SOAP+API

The soap exposed method is addUser
Mircea

>
> Regards,
>   ND
> < h r > < f o n t f a c e = " A r i a l " c o l o r = " G r a y " s i z e =
> " 1 " > T h i s c o m m u n i c a t i o n m a y c o n t a i n p r i v i l e
> g e d o r o t h e r c o n f i d e n t i a l i n f o r m a t i o n . I f y o
> u h a v e r e c e i v e d i t i n e r r o r , p l e a s e a d v i s e t h e
> s e n d e r b y r e p l y i n g t h i s e - m a i l a n d i m m e d i a t e
> l y d e l e t i n g t h i s m e s s a g e a n d a n y a t t a c h m e n t w
> i t h o u t c o p y i n g o r d i s c l o s i n g t h e c o n t e n t s . A
> l t h o u g h t h i s e m a i l a n d a n y a t t a c h m e n t a r e b e l
> i e v e d t o b e f r e e o f a n y v i r u s , T r o j a n h o r s e p r o
> g r a m s , w o r m s , f a u l t o r o t h e r d e f e c t s w h i c h m i
> g h t a f f e c t a n y c o m p u t e r o r s y s t e m i n t o w h i c h i
> t i s r e c e i v e d a n d o p e n e d , i t i s t h e r e s p o n s i b i
> l i t y o f t h e r e c i p i e n t t o e n s u r e t h a t t h i s e m a i
> l a n d i t s a t t a c h m e n t s a r e f r e e f r o m s u c h v i r u s
> e s , f a u l t o r d e f e c t s a n d n o r e s p o n s i b i l i t y i s
> a c c e p t e d b y P l a n e t O n e a n d i t s g r o u p s o f c o m p a
> n i e s . < b r > < / f o n t > < / b o d y > < / h t m l >
> _______________________________________________
> sipx-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipx-dev/
>
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/

Reply via email to