Can't track the bug ,while creating user for domain through external API?
I am developing an application which is creating domains through an external API,
but there is problem when i create user through this API..
It sometimes works fine sometimes not..
there is no problem with the API i gues..
URL u=null;
HttpURLConnection=null;
int code=0;
boolean blnOK=false;
strUrl="http://externaldomain.net/domain/admin?pwd=admpassword&action=user_createdomain&domain=mynewdomain.domain.net&adminpassword=anypassword&diskquota=4522;
u=new URL(strUrl);
uc=(HttpURLConnection)u.openConnection();
code=uc.getResponseCode();
if(code == 200){
redirectUrl="DomainCreationComplete.jsp";
blnOK=true;
}else{
redirectUrl="DomainCreationError.jsp";
}
if(blnOK){
String strUrlUser="http://externaldomain.net/domain/admin?pwd=admpassword&action=user_createuser&username=mynewuser&password=myuserpassword&domain=mynewdomain.domain.net&communityname=Default&firstname=John&lastname=Doe;
URL u1=new URL(strUrlUser);
HttpURLConnectionuc1=(HttpURLConnection)u1.openConnection();
code=uc1.getResponseCode();
response1=uc1.getResponseMessage();
if(code == 200){
redirectUrl="/DomaincreationComplete.jsp";
}
}else{
redirectUrl="DomainCreationError.jsp";
}
}

