cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with delete webscript

ramos69
Champ in-the-making
Champ in-the-making
Hi.. I'm having a problem when I call a Webscript…

This is the deleteNode description

elete WebscriptDELETE /alfresco/service/….NaNet/deleteNode?nodeid={nodeid}DELETE /alfresco/service/….NaNet/deleteNode?storeid={storeid}&path={path}Description:   Apaga documentos pelo idAuthentication:   userTransaction:   requiredFormat Style:   argumentDefault Format:   xmlId:   ….NaNet/deleteNode.deleteDescription:   classpath:alfresco/webscripts/….NaNet/deleteNode.delete.desc.xml‍‍‍‍‍‍‍‍‍‍‍


And I'm using a HttpService on actionscript to acess this webscript
public function exec(noRep:NoRepr):void{      try      {                                     var model:ModelController = ModelController.getInstance();         var service:HTTPService = new HTTPService;         var url:String = model.configuracoes.protocol + "://" + model.configuracoes.domain + ":" + model.configuracoes.port + model.configuracoes.alfrescoUrlPart + "….NaNet/deleteNode";         service.addEventListener(ResultEvent.RESULT, onResult);         service.addEventListener(FaultEvent.FAULT, onFault);            var params:Object = new Object();         params.alf_ticket = model.dadosPessoa.ticketAlfresco;         //params.storeid= noRep.getStoreId();         //params.path = noRep.getPath();         params.nodeid = noRep.getId();         service.method = "DELETE";         service.url= url;               service.send(params);                        }      catch (error:Error)      {         trace("ERROR");      }   }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


well the url that I'm sending is

http://....:8080/alfresco/service/.....NaNet/deleteNode?alf%5Fticket=TICKET%5F9919621338df1820493e50...‍‍‍


And I'm getting this error

[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Erro de fluxo. URL: http://....:8080/alfresco/service/.....NaNet/deleteNode?alf%5Fticket=TICKET%5F9919621338df1820493e50...….."]. URL: http://.....:8080/alfresco/service/......NaNet/deleteNode"]‍‍‍‍‍


If I put the url on the browser it return a error saying that the webscript dont support GET method, what is correct.


Can someone help me???


Thanks
1 REPLY 1

ramos69
Champ in-the-making
Champ in-the-making
Problem solved…

var model:ModelController = ModelController.getInstance();         var service:HTTPService= new HTTPService();         var url:String = model.configuracoes.protocol + "://" + model.configuracoes.domain + ":" + model.configuracoes.port + model.configuracoes.alfrescoUrlPart + "….NaNet/deleteNode";         service.addEventListener(ResultEvent.RESULT, onResult);         service.addEventListener(FaultEvent.FAULT, onFault);            var params:Object = new Object();         params.alf_ticket = model.dadosPessoa.ticketAlfresco;         [b]params.alf_method = "DELETE"[/b]         //params.storeid= noRep.getStoreId();         //params.path = noRep.getPath();         params.nodeid = noRep.getId();                  service.url= url;               service.send(params);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍