Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:01:27+00:00 2026-05-25T06:01:27+00:00

I’m writing a WebScript in Alfresco using JS controller and I want to make

  • 0

I’m writing a WebScript in Alfresco using JS controller and I want to make a HTTP request to the local HTTP resource. This resource is a Java-based app and gives me its own REST API.

My WebScript is not a Share Component: so I don’t have a remote object to call another webscript.

How can I make a HTTP request to the local resource (something like ‘/sdo/documents/getName?type=fl’) from a WebScript?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:01:28+00:00Added an answer on May 25, 2026 at 6:01 am

    EDIT: Alfresco is overriding the Spring Surf webscripts.container bean removing the remote definition (in web-scripts-application-context.xml of remote-api):

    <bean id="webscripts.container" class="org.alfresco.repo.web.scripts.RepositoryContainer" parent="webscripts.abstractcontainer">
          <property name="name"><value>Repository</value></property>
          <property name="scriptObjects">
             <map merge="true">
               <entry key="paging">
                  <ref bean="webscripts.js.paging"/>
               </entry>
             </map>
    <!-- ..... -->
    </bean>
    

    I suggest you include it again as a custom Javascript API root level object.


    The remote root object comes from the Spring Surf framework, meaning you have it regardless of being developing your Web Scripts against the Alfresco repository or Share. As a proof, here’s the source for a Web Script available in the public Alfresco CMIS server (-> Alfresco repository instance, admin/admin if you are asked to login):

    var serviceUrl = (args.service === null) ? "/api/repository" : args.service;
    var conn = remote.connect("alfresco");
    var result = conn.get(stringUtils.urlEncodeComponent(serviceUrl));
    
    var service = atom.toService(result.response);
    var workspace = service.workspaces.get(0);
    model.repo = workspace.getExtension(atom.names.cmisra_repositoryInfo);
    

    The following snippet is taken from spring-surf-application-context.xml as found inside spring-webscripts-1.0.0.CI-SNAPSHOT.jar of Alfresco 3.4.0, which is where the remote root object gets its definition:

       <bean id="webscripts.container" parent="webscripts.abstractcontainer" class="org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer">
          <property name="name"><value>Spring Surf Container</value></property>
          <property name="registry" ref="webscripts.registry" />
          <property name="searchPath" ref="webframework.webscripts.searchpath" />
          <property name="templateProcessorRegistry" ref="webframework.webscripts.registry.templateprocessor" />
          <property name="scriptProcessorRegistry" ref="webframework.webscripts.registry.scriptprocessor" />
          <property name="scriptParameterFactoryRegistry" ref="webscripts.web.scriptparameterfactoryregistry" />
          <property name="configService" ref="web.config" />
          <property name="scriptObjects">
             <map merge="true">
                <entry key="remote" value-ref="webframework.webscripts.scriptremote" />
             </map>
          </property>
          <property name="processorModelHelper" ref="processor.model.helper"/>
          <property name="extensibilityModuleHandler" ref="webscripts.extensibility.handler"/>
       </bean>
    
       <bean id="webframework.webscripts.scriptremote" class="org.springframework.extensions.webscripts.ScriptRemote">
          <property name="configService" ref="web.config"/>
          <property name="connectorProvider" ref="webframework.connector.provider"/>
       </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.