return result;
}
private void parseURL(String providerUrl) throws XWException{
String pURL=providerUrl.trim();
if(!providerUrl.startsWith("regesta"))
throw new XWException("Invaild URL String");
try {
theHost = pURL.substring(pURL.indexOf("//")+2,pURL.lastIndexOf(":"));
pURL = pURL.substring(pURL.lastIndexOf(":")+1,pURL.length());
thePort = Integer.parseInt( pURL.substring(0,pURL.indexOf("/")) );
pURL = pURL.substring(pURL.indexOf("/")+1,pURL.length());
theDb = pURL.substring(0,pURL.indexOf("/"));
pURL = pURL.substring(pURL.indexOf("/")+1,pURL.length());
StringTokenizer strtok= new StringTokenizer(pURL,";");
while(strtok.hasMoreTokens()){
String token=strtok.nextToken();
if(token.indexOf("user=")!=-1)
theUserDB = token.substring(token.indexOf("user=")+"user=".length(),token.length());
if(token.indexOf("password=")!=-1)
thePasswordDB = token.substring(token.indexOf("password=")+"password=".length(),token.length());
if(token.indexOf("pne=")!=-1)
thePne = token.substring(token.indexOf("pne=")+"pne=".length(),token.length());
if(token.indexOf("pnce=")!=-1)
thePnce = token.substring(token.indexOf("pnce=")+"pnce=".length(),token.length());
}
if(thePne.equals(""))
throw new XWException("Invaild URL String XW_PNE is required");
}
catch (NumberFormatException e) {
throw new XWException("Invaild port");
}
catch (ArrayIndexOutOfBoundsException e) {
throw new XWException("Invaild URL String");
}
catch (NullPointerException e) {
throw new XWException("Invaild URL String");
}
}