Skip to Content
0
Apr 12, 2019 at 09:23 AM

Can't connect to SAP Document Service

412 Views

Hello colleagues.

I'm having trouble with creating and using a Proxy Bridge .

I use this instruction: https://help.sap.com/viewer/b0cc1109d03c4dc299c215871eed8c42/Cloud/en-US/ed1c6732d4214c68846ab9813b9df943.html

After deploying app in SCP I try open this link, but have error.

What could be the problem and what I am doing wrong?

Thanks in advance for the answers)

Project tree:

Servlet code:

package proxy;
import com.sap.ecm.api.AbstractCmisProxyServlet;
public class CMISProxyServlet extends AbstractCmisProxyServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected boolean supportAtomPubBinding() {
		return false;
	}

	@Override
	protected boolean supportBrowserBinding() {
		return true;
	}

    public CMISProxyServlet() {
        super();
    }

    @Override
    protected String getRepositoryUniqueName() {
        return "DocRep";
    }

    @Override
    // For applications in production, use a secure location to store the secret key.
    protected String getRepositoryKey() {
        return "1234567890abc";
    }


}

web.xml code:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>cmisproxy</display-name>

<servlet>
  <servlet-name>cmisproxy</servlet-name>
  <servlet-class>proxy.CMISProxyServlet</servlet-class> 
</servlet> 

<servlet-mapping>
  <servlet-name>cmisproxy</servlet-name>
  <url-pattern>/cmis/*</url-pattern> 
</servlet-mapping>

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Proxy</web-resource-name>
    <url-pattern>/cmis/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
    <role-name>EcmDeveloper</role-name>
  </auth-constraint>

</security-constraint>

</web-app>

Attachments