Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.