Cannot update the name of a space using storeSpace(String in0, RemoteSpace in1)

XMLWordPrintable

      When I try to edit an existing space using the Remote API, I get the following AlreadyExistsException.

      com.atlassian.confluence.rpc.AlreadyExistsException: A space already exists with key 18
      

      Java Code used to perform task:

      
      				String spaceKey = getSpaceKey(newTitle);
      				RemoteSpace space = null;
      				try{
      					space = confluenceWSDLService.getSpace(token, spaceKey);					
      				} catch(Exception e){
      					LOGGER.info("Unable to locate space... creating it now.");
      				}
      				
      				if(space == null){
      					space = new RemoteSpace();
      				}
      
      				space.setKey(spaceKey);
      				space.setName(buildSpaceName(newTitle));
      				space = confluenceWSDLService.storeSpace(token, space);
      

              Assignee:
              Paul Curren
              Reporter:
              Waldo Rochow
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: