Webscript Share proxy issue

cancel
Showing results for 
Search instead for 
Did you mean: 
gluck113
Established Member

Webscript Share proxy issue

Jump to solution

Hi everbody

I'm going into the circle with a webscript issue and need some light.

So I've created a backend webscript to send back metadata fields for a document model.

easyContent2Metadata/allMetadataFields.get.desc.xml at feature/dropdownListsFilled · sgirardin/easyC... 

This webscript is called in share to populate a dropdown list. For the moment it works because it (the webscript) is called by directly passing by the repository (http://localhost:8080/alfresco/s/...).

easyContent2Metadata/dynamic-property-dropdown.ftl at feature/dropdownListsFilled · sgirardin/easyCo... 

But when I try to call it like this in the js: Alfresco.constants.PROXY_URI + "/ec2m/dropdownlist/retrieveallMetadataFields?qname I get a 500 error exception with the following log in the console: XML Parsing Error: no root element found
Location: http://localhost:8080/share/proxy/alfresco//e2cm/dropdownlist/retrieveallMetadataFields?qname={http://www.alfresco.org/model/custommodelmanagement/1.0}customModelManagementModel
Any ideas what goes wrong in the share proxy

Alfresco version: 5.2.g

Share version: 5.2.f

1 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: Webscript Share proxy issue

Jump to solution

Encode url parameters using encodeURIComponent method.It will work.

View solution in original post

2 Replies
krutik_jayswal
Senior Member II

Re: Webscript Share proxy issue

Jump to solution

Encode url parameters using encodeURIComponent method.It will work.

gluck113
Established Member

Re: Webscript Share proxy issue

Jump to solution

Yes it worked! Thanks alot. I wouldn't have guessed it was that.

Code works fine with this code:

"/ec2m/dropdownlist/retrieveallMetadataFields?qname=" + encodeURIComponent(qnameToSearch.toString());