Repository: olingo-odata4 Updated Branches: refs/heads/olingo-266-ref 66a8f99b4 -> e54aaac76
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e54aaac7/lib/ref/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/lib/ref/src/main/webapp/WEB-INF/web.xml b/lib/ref/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..caeb8e2 --- /dev/null +++ b/lib/ref/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="WebApp_ID" version="2.5"> + <display-name>Apache Olingo OData 4.0 Reference Scenario Service</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + </welcome-file-list> + + <servlet> + <servlet-name>ODataServlet</servlet-name> + <servlet-class>org.apache.olingo.ref.ReferenceScenarioServlet</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>ODataServlet</servlet-name> + <url-pattern>/odata.svc/*</url-pattern> + </servlet-mapping> + +</web-app> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e54aaac7/lib/ref/src/main/webapp/index.html ---------------------------------------------------------------------- diff --git a/lib/ref/src/main/webapp/index.html b/lib/ref/src/main/webapp/index.html new file mode 100644 index 0000000..e25f4fb --- /dev/null +++ b/lib/ref/src/main/webapp/index.html @@ -0,0 +1,32 @@ +<html> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<body> + <h1>Olingo OData 4.0 Reference Scenario Service</h1> + <hr> + <h2>Reference Scenario Service</h2> + <lu> + <li><a href="odata.svc/">Service Document</a></li> + <li><a href="odata.svc/$metadata">Metadata</a></li> + </lu> + +</body> + +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e54aaac7/lib/server-core/src/main/java/org/apache/olingo/server/core/servlet/ODataServlet.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/servlet/ODataServlet.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/servlet/ODataServlet.java index b6d31c9..2d87ad3 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/servlet/ODataServlet.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/servlet/ODataServlet.java @@ -32,7 +32,7 @@ import org.apache.olingo.server.api.serializer.ODataSerializer; import org.apache.olingo.server.core.ODataServerImpl; import org.apache.olingo.server.core.edm.provider.EdmProviderImpl; -public class ODataServlet extends HttpServlet { +public abstract class ODataServlet extends HttpServlet { private static final long serialVersionUID = 1L; @@ -57,9 +57,7 @@ public class ODataServlet extends HttpServlet { sendResponse(responseEntity); } - protected EdmProvider createEdmProvider() { - return null; - } + abstract public EdmProvider createEdmProvider(); // TODO: check throws private void sendResponse(final Object entity) throws IOException {
