title: Error when trying to update API in API Manager
body: <p>I started with a fresh install of the API Manager.  I can create an API just fine but I can not update it.</p>
  
  <p>I am logged in as a 'creator'role as defined in the documentation of what roles to create.  The same user is logged in that is trying to modify it.  Even if i just create a new API then immediately try to update with ( with out any changes ) I get the following error.</p>
  
  <pre><code>TID: [0] [AM] [2014-01-30 13:16:41,059] ERROR {org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject} -  Error while updating the API- ItemService-1.0 {org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject}
  org.wso2.carbon.apimgt.api.APIManagementException: Error while updating the API :ItemService
      at org.wso2.carbon.apimgt.impl.AbstractAPIManager.handleException(AbstractAPIManager.java:666)
      at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:496)
      at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.updateAPI(UserAwareAPIProvider.java:58)
      at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_updateAPI(APIProviderHostObject.java:772)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
      at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
      at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      at org.jaggeryjs.rhino.publisher.modules.api.c4._c_anonymous_1(/publisher/modules/api/update.jag:6)
      at org.jaggeryjs.rhino.publisher.modules.api.c4.call(/publisher/modules/api/update.jag)
      at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      at org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_9(/publisher/modules/api/module.jag:35)
      at org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
      at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_anonymous_1(/publisher/site/blocks/item-add/ajax/add.jag:116)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
      at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_script_0(/publisher/site/blocks/item-add/ajax/add.jag:4)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
      at org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.exec(/publisher/site/blocks/item-add/ajax/add.jag)
      at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
      at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
      at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
      at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
      at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
      at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
      at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
      at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
      at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error while performing registry transaction operation
      at org.wso2.carbon.apimgt.impl.AbstractAPIManager.handleException(AbstractAPIManager.java:666)
      at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateApiArtifact(APIProviderImpl.java:579)
      at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:425)
      ... 63 more
  Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Failed to reset the WSDL : /registry/resource/_system/governance/apimgt/applicationdata/wsdls/creator--ItemService1.0.wsdl
      at org.wso2.carbon.apimgt.impl.utils.APIUtil.createWSDL(APIUtil.java:787)
      at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateApiArtifact(APIProviderImpl.java:541)
      ... 64 more
  Caused by: org.wso2.carbon.apimgt.api.APIManagementException:  Error occurs when change the addres URL of the WSDL
      at org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader.readAndCleanWsdl(APIMWSDLReader.java:103)
      at org.wso2.carbon.apimgt.impl.utils.APIUtil.createWSDL(APIUtil.java:767)
      ... 65 more
  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at '/registry/resource/_system/governance/apimgt/applicationdata/wsdls/creator--ItemService1.0.wsdl'.: java.io.FileNotFoundException: This file was not found: file:/registry/resource/_system/governance/apimgt/applicationdata/wsdls/creator--ItemService1.0.wsdl
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2259)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2207)
      at org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader.readWSDLFile(APIMWSDLReader.java:128)
      at org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader.readAndCleanWsdl(APIMWSDLReader.java:84)
      ... 66 more
  Caused by: java.io.FileNotFoundException: This file was not found: file:/registry/resource/_system/governance/apimgt/applicationdata/wsdls/creator--ItemService1.0.wsdl
      at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(StringUtils.java:173)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2238)
      ... 69 more
  </code></pre>