[
https://issues.apache.org/jira/browse/OLINGO-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15244131#comment-15244131
]
Michael Bolz commented on OLINGO-934:
-------------------------------------
Hello [[email protected]],
I'am not sure wether I understand your question correct, however I try to help
;o)
The {{servlet name}} in the web.xml is only used for mapping the
{{url-pattern}} to the correct {{servlet}}.
With the {{url-pattern}} you define the ULR path which is mapped.
If you e.g. want your service available under "Query" you should change the
{{url-pattern}} accordingly.
Sampe below is for request to _MyFormula.svc_.
If this not help/fit to your use case it would be helpful when you attach your
{{web.xml}} and the request URL which response with the error.
Best Regards, Michael
{{http://localhost:8080/MyFormula.svc/$metadata
{code}
...
<servlet>
<servlet-name>CarServiceServlet</servlet-name>
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.apache.olingo.odata2.core.rest.app.ODataApplication</param-value>
</init-param>
<init-param>
<param-name>org.apache.olingo.odata2.service.factory</param-name>
<param-value>${package}.service.ODataJPACarServiceFactory</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CarServiceServlet</servlet-name>
<url-pattern>/MyFormula.svc/*</url-pattern>
</servlet-mapping>
...
{code}
> URI different from Query.svc/* not working
> ------------------------------------------
>
> Key: OLINGO-934
> URL: https://issues.apache.org/jira/browse/OLINGO-934
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.6
> Reporter: Joaquin Diez
>
> I am developing a Odata Service using Olingo Odata v2.0.6 y need to change
> the web.xml configuration to use diferent names for the servlet than Query.svc
> But when I change it to
> <servlet-mapping>
> <servlet-name>OdataServlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> I get the following error
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
> <code/>
> <message xml:lang="en">Could not find container with name: 'Query'.</message>
> </error>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)