I'm passing the XML created by the method below to a GeoServer REST API request that successfully creates a postGIS data store. However, password is not persisted. I have to update the password manually in the data store. I need the password to be saved for subsequent requests using the data store to be successful. Any suggestions on what I can do for the password to be saved?
private string getDbXml(string dsName)
{
string dbHost = "localhost";
string dbPort = "5432";
string dbName = "testgis";
string dbUser = "mydbuser";
string dbPassword = "mydbpassword";
string dbType = "postgis";
string exposePKsParameter = "<entry key=\"Expose primary keys\">true</entry>";
string xml = "<dataStore>" +
"<name>" + dsName + "</name>" +
"<enabled>true</enabled>" +
"<connectionParameters>" +
"<host>" + dbHost + "</host>" +
"<port>" + dbPort + "</port>" +
"<database>" + dbName + "</database>" +
"<user>" + dbUser + "</user>" +
"<password>" + dbPassword + "</password>" +
"<dbtype>" + dbType + "</dbtype>" +
"<namespace>" + dsName + "_NS</namespace>" +
exposePKsParameter +
"</connectionParameters>" +
"</dataStore>";
return xml;
}
I'm using GeoServer 2.1.3 and PostGIS 1.5.