cancel
Showing results for 
Search instead for 
Did you mean: 

How to list wcmqs webscripts

stevegreenbaum
Champ in-the-making
Champ in-the-making
Is there an equivalent of the Share services url (http://localhost:8080/share/service/index) for quickstart?   I don't see wcmqs webscripts listed anyplace.  I've tried several variations on the Share url, substituting wcmqs, but none of them return a list of webscripts.
10 REPLIES 10

ben
Champ in-the-making
Champ in-the-making
Hi,

The web scripts for the QS will not be listed seperatley from the other Alfresco web scripts. The Alfresco server scripts will be listed along side the others under http://localhost:8080/alfresco/service/index. I believe that there will only be one web script within the Share tier that is used by the dashlet for import, and that should show using the URL you quoted.

Regards, Ben.

stevegreenbaum
Champ in-the-making
Champ in-the-making
Why don't items like style1.get.desc.xml and detailed.get.desc.xml appear?   I thought web-tier scripts would appear someplace.

bremmington
Champ on-the-rise
Champ on-the-rise
I see. That's a good question. Within the WQS webapp we assume that all paths are referencing assets from the repo. I'd need to try to work out what would be necessary to allow access to the webscript api scripts. Leave it with me…

rmorant
Champ in-the-making
Champ in-the-making
Hi,
Yes, I also miss them. You always need some json service for a javascript component or something like that.

bremmington
Champ on-the-rise
Champ on-the-rise
Sorry for the delay in coming back. Other things intervened.

To enable the webscript management pages in the WQS example web app do the following:

  1. In WEB-INF/urlrewrite.xml add the following immediately beneath the rule that checks if the request is for a static resource:

  2.    <rule>
                <condition type="attribute" name="static" operator="notequal">true</condition>
                <from>/service/**</from>
                <to>/dev/$1</to>
       </rule>   

  3. In wcmqs-webapp-context.xml (or any other extension Spring context file) add the following bean definitions:


  4.     <bean id="basicSurfController" class="org.springframework.extensions.surf.mvc.UrlViewController">
            <property name="urlPathHelper" ref="urlPathHelper" />
        </bean>

        <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="order" value="1" />

           <property name="mappings">
                <value>
                    /dev/**=basicSurfController
                </value>
            </property>

            <property name="interceptors">
                <list>
                    <ref bean="requestContextInterceptor"/>
                    <ref bean="themeInterceptor"/>
                    <ref bean="previewContextInterceptor"/>
                </list>
            </property>          
        </bean>
Once these changes are deployed you should see the webscript management home page when you hit "/wcmqs/service/index/" and the list of the deployed webscripts at "/wcmqs/service/index/all". You can use a similar URL mapping technique to route requests to any custom webscripts that you want to deploy in this tier.

Hope that helps.

stevegreenbaum
Champ in-the-making
Champ in-the-making
I deployed these changes and restarted Alfresco.  With this url, http://192.168.21.128:8080/wcmqs/service/index, I received this message:

HTTP Status 404 - /wcmqs/dev/service/index
type Status report
message /wcmqs/dev/service/index
description The requested resource (/wcmqs/dev/service/index) is not available.

bremmington
Champ on-the-rise
Champ on-the-rise
I just pasted directly from my earlier post into a clean HEAD build and it works. Are you certain that you placed the new urlrewrite rule exactly where I said? Order is important.

stevegreenbaum
Champ in-the-making
Champ in-the-making
Here is the path to the file and the content of urlrewrite.xml, perhaps I've interpreted your instructions incorrectly.

C:\Alfresco34\tomcat\webapps\wcmqs\WEB-INF\urlrewrite.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.1//EN"      
  "./dtd/urlrewrite3.1.dtd">

<urlrewrite default-match-type="wildcard">

        <!– Spring Surf –>
        <!– Not required by quickstart
        <rule>
                <from>/proxy**</from>
                <to>/service/proxy/$1</to>
        </rule>
        <rule>
                <from>/res/**</from>
                <to>/service/resource/$1</to>
        </rule>
        <rule>
                <from>/service/**</from>
                <to>/service/$1</to>
        </rule>
        –>

        <rule match-type="regex">
            <from>/(css|js|img|images|swf)/.*</from>
            <set name="static">true</set>
        </rule>
        <rule>
            <condition type="attribute" name="static" operator="notequal">true</condition>
                <from>/**</from>
                <to>/service/$1</to>
       </rule>
       <rule>
                <condition type="attribute" name="static" operator="notequal">true</condition>
                <from>/service/**</from>
                <to>/dev/$1</to>
       </rule>

        <outbound-rule>
                <from>/service/**</from>
                <to>/$1</to>
        </outbound-rule>

</urlrewrite>

bremmington
Champ on-the-rise
Champ on-the-rise
Yes, change that to be:


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.1//EN"      
  "./dtd/urlrewrite3.1.dtd">

<urlrewrite default-match-type="wildcard">

        <!– Spring Surf –>
        <!– Not required by quickstart
        <rule>
                <from>/proxy**</from>
                <to>/service/proxy/$1</to>
        </rule>
        <rule>
                <from>/res/**</from>
                <to>/service/resource/$1</to>
        </rule>
        <rule>
                <from>/service/**</from>
                <to>/service/$1</to>
        </rule>
        –>

        <rule match-type="regex">
            <from>/(css|js|img|images|swf)/.*</from>
            <set name="static">true</set>
        </rule>
       <rule>
                <condition type="attribute" name="static" operator="notequal">true</condition>
                <from>/service/**</from>
                <to>/dev/$1</to>
       </rule>
        <rule>
            <condition type="attribute" name="static" operator="notequal">true</condition>
                <from>/**</from>
                <to>/service/$1</to>
       </rule>

        <outbound-rule>
                <from>/service/**</from>
                <to>/$1</to>
        </outbound-rule>
</urlrewrite>