web scripting - HTTP Request from WebScript in Alfresco -


I am writing webscript in Alfresco using JS controller and I want to make local HTTP resource an HTTP request. This resource is a Java-based app and gives me my own API.

My webserver is not a shared component: so I do not have a remote object to call another webscript.

How do I request an HTTP request from a web site to local resources (something like '/ sdo / documents / getName? Type = fl')?

Edit: Alfresco Spring Surf webscripts.container Bean to Removing remote in Web-script-application-context.xml in Remote-API ):

  Lt; Bean id = "webscripts.container" class = "org.alfresco.repo.web.scripts.RepositoryContainer" parent = "Websites. Ablate Container" & gt; & Lt; Property Name = "Name" & gt; & Lt; Value & gt; Repository & lt; / Value & gt; & Lt; / Property & gt; & Lt; Property Name = "Script Object" & gt; & Lt; Map merge = "true" & gt; & Lt; Entry key = "paging" & gt; & Lt; Ref bean = "webscripts.js.paging" /> & Lt; / Entry & gt; & Lt; / Map & gt; & Lt ;! - ..... - & gt; & Lt; / Bean & gt;   

I recommend that you can include it again as a root level object.


Remote comes from the root object framework, which means that you have an evidence against this regardless of your web scripts developing against Alfresco repositories or shares. Here, the public's Alfresco CMIS server (-> Alfreso Repository Instance, is the source for admins to admin / admin if you have been asked to enter):

  var serviceUrl = (Args service === faucet)? "/ API / repository": args.service; Var conn = remote.connect ("alfresco"); Var result = conn.get (stringUtils.urlEncodeComponent (serviceUrl)); Var service = atom.to service (result.response); Var workspace = service.workspaces.get (0); Model.repo = Workspace Gate Extension (atom.names.cmisra_repositoryInfo);   

The following snippet is derived from the spring-surf-application-reference.exam as found in spring-webcript-1.0.0 . CI-Snapshot of Alfresco 3.4.0 .jar , which is where the remote root object is defined:

  & lt; Bean id = "webscripts.container" Parent = "Websites.Sarak Container" class = "org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer" & gt; & Lt; Property name = "name" & gt; & Lt; Value & gt; Spring Surf Container & lt; / Value & gt; & Lt; / Property & gt; & Lt; Property Name = "Registry" ref = "webscripts.registry" /> & Lt; Property name = "searchpath" ref = "webframework.webscript.searchpath" /> & Lt; Property Name = "Template Process Rescript" ref = "webframework.webscripts.registry.templateprocessor" /> & Lt; Property name = "scriptprocessregression" ref = "webframework.webscripts.registry.scriptprocessor" /> & Lt; Property Name = "ScriptPrometRefficiency Registry" ref = "webscripts.web.scriptparameterfactoryregistry" /> & Lt; Property Name = "Config Service" Riff = "Web. Config" / & gt; & Lt; Property Name = "Script Object" & gt; & Lt; Map merge = "true" & gt; & Lt; Entry key = "remote" value-ref = "webframework.webscripts.scriptremote" /> & Lt; / Map & gt; & Lt; / Property & gt; & Lt; Property Name = "Processor ModellHelper" ref = "Processor. Modell. Hopper" /> & Lt; Property Name = "Extensibility Module Handler" ref = "webscripts.extensibility.handler" /> & Lt; / Bean & gt; & Lt; Bean id = "WebFramework.netScriptcriptRate" class = "org.springframework.extensions.webscripts.ScriptRemote" & gt; & Lt; Property Name = "Config Service" Riff = "Web. Config" / & gt; & Lt; Property Name = "Connector Provider" ref = "webframework.connector.provider" /> & Lt; / Bean & gt;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -