[OLINGO-234] Action overloading working for v3

This commit is contained in:
Francesco Chicchiriccò 2014-04-07 14:47:41 +02:00
parent 855a586b3d
commit 338ed70789
12 changed files with 1322 additions and 123 deletions

View File

@ -130,7 +130,7 @@ public abstract class AbstractServices {
*/
@GET
@Path("/$metadata")
@Produces("application/xml")
@Produces(MediaType.APPLICATION_XML)
public Response getMetadata() {
return getMetadata(Constants.get(version, ConstantKey.METADATA));
}
@ -1363,7 +1363,7 @@ public abstract class AbstractServices {
}
}
private Map.Entry<Accept, AbstractUtilities> getUtilities(final String accept, final String format) {
public Map.Entry<Accept, AbstractUtilities> getUtilities(final String accept, final String format) {
final Accept acceptType;
if (StringUtils.isNotBlank(format)) {
acceptType = Accept.valueOf(format.toUpperCase());

View File

@ -0,0 +1,200 @@
/*
* 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.
*/
package org.apache.olingo.fit;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.Map;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static javax.ws.rs.core.Response.status;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import static org.apache.olingo.fit.AbstractServices.LOG;
import org.apache.olingo.fit.utils.AbstractUtilities;
import org.apache.olingo.fit.utils.Accept;
import org.apache.olingo.fit.utils.Commons;
import org.apache.olingo.fit.utils.ConstantKey;
import org.apache.olingo.fit.utils.Constants;
import org.apache.olingo.fit.utils.FSManager;
import org.apache.olingo.fit.utils.ODataVersion;
import org.springframework.stereotype.Service;
@Service
@Path("/V30/ActionOverloading.svc")
public class V3ActionOverloading extends AbstractServices {
public V3ActionOverloading() throws Exception {
super(ODataVersion.v3);
}
private Response replaceServiceName(final Response response) {
try {
final String content = IOUtils.toString((InputStream) response.getEntity(), "UTF-8").
replaceAll("Static\\.svc", "ActionOverloading.svc");
final Response.ResponseBuilder builder = status(response.getStatus());
for (String headerName : response.getHeaders().keySet()) {
for (Object headerValue : response.getHeaders().get(headerName)) {
builder.header(headerName, headerValue);
}
}
final InputStream toBeStreamedBack = IOUtils.toInputStream(content, "UTF-8");
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copy(toBeStreamedBack, baos);
IOUtils.closeQuietly(toBeStreamedBack);
builder.header("Content-Length", baos.size());
builder.entity(new ByteArrayInputStream(baos.toByteArray()));
return builder.build();
} catch (Exception e) {
return response;
}
}
@GET
@Path("/$metadata")
@Produces(MediaType.APPLICATION_XML)
public Response getLargeMetadata() {
return super.getMetadata("actionOverloading"
+ StringUtils.capitalize(Constants.get(ODataVersion.v3, ConstantKey.METADATA)));
}
@POST
@Path("/RetrieveProduct")
public Response unboundRetrieveProduct(
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String accept,
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String format,
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType) {
final Accept acceptType;
if (StringUtils.isNotBlank(format)) {
acceptType = Accept.valueOf(format.toUpperCase());
} else {
acceptType = Accept.parse(accept, ODataVersion.v3);
}
if (acceptType == Accept.XML || acceptType == Accept.TEXT) {
throw new UnsupportedMediaTypeException("Unsupported media type");
}
try {
final InputStream result = FSManager.instance(ODataVersion.v3).
readFile("actionOverloadingRetrieveProduct", acceptType);
return replaceServiceName(xml.createResponse(result, null, acceptType));
} catch (Exception e) {
return replaceServiceName(xml.createFaultResponse(accept, e));
}
}
@GET
@Path("/Product({entityId})")
public Response getProduct(
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String accept,
@PathParam("entityId") final String entityId,
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String format) {
final Map.Entry<Accept, AbstractUtilities> utils = super.getUtilities(accept, format);
if (utils.getKey() == Accept.XML || utils.getKey() == Accept.TEXT) {
throw new UnsupportedMediaTypeException("Unsupported media type");
}
final Map.Entry<String, InputStream> entityInfo = utils.getValue().readEntity("Product", entityId, utils.getKey());
InputStream entity = entityInfo.getValue();
try {
if (utils.getKey() == Accept.JSON_FULLMETA || utils.getKey() == Accept.ATOM) {
entity = utils.getValue().addOperation(entity, "RetrieveProduct", "#DefaultContainer.RetrieveProduct",
uriInfo.getAbsolutePath().toASCIIString()
+ "/RetrieveProduct");
}
return replaceServiceName(utils.getValue().createResponse(
entity, Commons.getETag(entityInfo.getKey(), ODataVersion.v3), utils.getKey()));
} catch (Exception e) {
LOG.error("Error retrieving entity", e);
return replaceServiceName(xml.createFaultResponse(accept, e));
}
}
@POST
@Path("/Product({entityId})/RetrieveProduct")
public Response productBoundRetrieveProduct(
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String accept,
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String format,
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType) {
return unboundRetrieveProduct(accept, format, contentType);
}
@GET
@Path("/OrderLine(OrderId={orderId},ProductId={productId})")
public Response getOrderLine(
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String accept,
@PathParam("orderId") final String orderId,
@PathParam("productId") final String productId,
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String format) {
final Map.Entry<Accept, AbstractUtilities> utils = super.getUtilities(accept, format);
if (utils.getKey() == Accept.XML || utils.getKey() == Accept.TEXT) {
throw new UnsupportedMediaTypeException("Unsupported media type");
}
final Map.Entry<String, InputStream> entityInfo = utils.getValue().
readEntity("OrderLine", orderId + " " + productId, utils.getKey());
InputStream entity = entityInfo.getValue();
try {
if (utils.getKey() == Accept.JSON_FULLMETA || utils.getKey() == Accept.ATOM) {
entity = utils.getValue().addOperation(entity, "RetrieveProduct", "#DefaultContainer.RetrieveProduct",
uriInfo.getAbsolutePath().toASCIIString()
+ "/RetrieveProduct");
}
return replaceServiceName(utils.getValue().createResponse(
entity, Commons.getETag(entityInfo.getKey(), ODataVersion.v3), utils.getKey()));
} catch (Exception e) {
LOG.error("Error retrieving entity", e);
return replaceServiceName(xml.createFaultResponse(accept, e));
}
}
@POST
@Path("/OrderLine(OrderId={orderId},ProductId={productId})/RetrieveProduct")
public Response orderLineBoundRetrieveProduct(
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) final String accept,
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) final String format,
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType) {
return unboundRetrieveProduct(accept, format, contentType);
}
}

View File

@ -27,6 +27,7 @@ import org.apache.olingo.fit.utils.XHTTPMethodInterceptor;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.interceptor.InInterceptors;
@ -81,7 +82,7 @@ public class V3Services extends AbstractServices {
*/
@GET
@Path("/large/$metadata")
@Produces("application/xml")
@Produces(MediaType.APPLICATION_XML)
public Response getLargeMetadata() {
return getMetadata("large" + StringUtils.capitalize(Constants.get(version, ConstantKey.METADATA)));
}
@ -93,7 +94,7 @@ public class V3Services extends AbstractServices {
*/
@GET
@Path("/openType/$metadata")
@Produces("application/xml")
@Produces(MediaType.APPLICATION_XML)
public Response getOpenTypeMetadata() {
return getMetadata("openType" + StringUtils.capitalize(Constants.get(version, ConstantKey.METADATA)));
}

View File

@ -0,0 +1,80 @@
{
"odata.metadata": "http://192.168.0.160:8080/DefaultService.svc/$metadata#Person/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"value": [{
"odata.type": "Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"odata.id": "http://192.168.0.160:8080/DefaultService.svc/Person(-10)",
"odata.editLink": "Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"PersonMetadata@odata.navigationLinkUrl": "Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata",
"Manager@odata.navigationLinkUrl": "Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager",
"Car@odata.navigationLinkUrl": "Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car",
"#DefaultContainer.Sack": {
"title": "Sack",
"target": "http://192.168.0.160:8080/DefaultService.svc/Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"
},
"PersonId": -10,
"Name": "\u307a\u30bd\u305e\u5f0c\u30bf\u30a1\u531a\u30bf\u307d\u3072\u30cf\u6b32\u3074\u307b\u531a\u305b\u307e\u305f\u30d0\u30dc\u30c1\u30de\u531a\u3041\u30be\u30bd\u30c1\u3041\u042f\u305d\u3041\u30df\u044f\u66a6\u755a\u30dc\u6b79\u3072\u042f\u307b\u30c0\u30c1\u305d\u042f\u305b\u307d\u30bc\u30dd\u042f\u30c1\uff41\u305f\u6b79\u305f\u3092\u30bf\u30de\u305b\u3092\u305b\u531a\u30df\u30bf\u3072\u305c\u755a\u66a6\u30b0\u30af\u3072\u307b\u305d\u305f\u30b0\u305b\u044f\u30c1\u531a\uff66\u307a\u3041\u88f9\u3041\u30bd\u3073\u9ed1\u88f9\u7e37",
"ManagersPersonId": 47,
"Salary": 4101,
"Title": "\u307a\u30bd\u042f\u3092\u6b79\u30a1\u6b32\u042f\u30bd\u3042\u307d\uff66\uff41\u305d\u305b\u044f\u7e37\u30dd\u305b\uff88\u3074\uff66\u9ed1\u755a\u044f\u307b\u30be\u307b\u3079\uff41\u307b\uff88\u30d0\u755a\u4e5d\u4e9c\u0451\u30cf\u3079\u305c\u30a1\u88f9\u30bd\u6b32\u307b\u30b0\uff9d\u30dd\u5f0c\u9ed1\u30c1\u3073\uff66\uff88\u30df\u307c\u30bf\u305f\u307e\u30d0\u6b79\u30c1\u66a6\u30bf\u6b32\u3092\u30af\u3041\u30af\u3093\uff9d\u307e\u30bd\uff88\u30dc\u307e\u30bf\u305c\u30dc\u30dd\u307b\u6b79\u30bd\u3092\u30a1\u3042\u044f\u30dc\u305f\u30be\u307b",
"CarsVIN": -1911530027,
"Bonus": -37730565,
"IsFullyVested": false
}, {
"odata.type": "Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"odata.id": "http://192.168.0.160:8080/DefaultService.svc/Person(-9)",
"odata.editLink": "Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"PersonMetadata@odata.navigationLinkUrl": "Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata",
"Manager@odata.navigationLinkUrl": "Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager",
"Car@odata.navigationLinkUrl": "Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car",
"#DefaultContainer.Sack": {
"title": "Sack",
"target": "http://192.168.0.160:8080/DefaultService.svc/Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"
},
"PersonId": -9,
"Name": "stiuictvznkcvledkjnnluuvkmyumyfduxmjqpfnbjqgmvhuiytjbjinzbfmf",
"ManagersPersonId": -8429952,
"Salary": -2147483638,
"Title": "\u30d0\u30dc\u6b79\u305d\u042f\u30bc\u3041\u30be\u30bd\u3093\u30dc\u305f\u305d\u4e5d\u30dc\u3072\u73f1\u3042\u30de\u66a6\uff9d\u30bd\u30bd\u30a1\u531a\u307c\u307b\u305f\u30dc\u305c\u30af\u531a\u30bd\u755a\u30be\u3093\uff41\u30a1\u3079\u3042\u044f\u305b\u30bf\u7e37\u30de\u30bc\u3079\u307a\u30de\u7e37\u30bc\u305e\u30bc\u305f\uff5a\u305f\u305f\u30bf\u30a1\u4e5d\u3072\u9ed1\u7e37\u30af\uff66\u6b79\u30de\u307b\u307c\u3092\u307a\u30bf\u755a\u30dc\u5f0c\u9ed1\uff5a\u30cf\u30dc\u30af\u0451\u044f\u30bd\u30df\u30de\u307b\u30bc\u307e\uff41\u30a1\u3072\u30bc\uff9d\u30bd\u9ed1",
"CarsVIN": -2147483648,
"Bonus": -2147483648,
"IsFullyVested": false
}, {
"odata.type": "Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"odata.id": "http://192.168.0.160:8080/DefaultService.svc/Person(-8)",
"odata.editLink": "Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"PersonMetadata@odata.navigationLinkUrl": "Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata",
"Manager@odata.navigationLinkUrl": "Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager",
"Car@odata.navigationLinkUrl": "Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car",
"#DefaultContainer.Sack": {
"title": "Sack",
"target": "http://192.168.0.160:8080/DefaultService.svc/Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"
},
"PersonId": -8,
"Name": "vypuyxjjxlzfldvppqxkmzdnnapmugyumusqfrnaotviyfbudutxksfvpabxdxdmnosflbfxevfsouqdutczmaguuxaf",
"ManagersPersonId": 3777,
"Salary": 334131150,
"Title": "\u305b\u755a\u73f1\u6b32\u30d0\u30bc\u30c1\u30df\u30be\u30a1\u9ed1\u305c\u30be\u30dc\u3093\uff9d\u30c1\u5f0c\uff5a\u30bf\u30dc\u3073\u042f\u30bc\u30b0\u305e\u305b\u307c\u73f1\u30dd\u88f9",
"CarsVIN": -4784,
"Bonus": 2147483647,
"IsFullyVested": true
}, {
"odata.type": "Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"odata.id": "http://192.168.0.160:8080/DefaultService.svc/Person(-7)",
"odata.editLink": "Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee",
"PersonMetadata@odata.navigationLinkUrl": "Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata",
"Manager@odata.navigationLinkUrl": "Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager",
"Car@odata.navigationLinkUrl": "Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car",
"#DefaultContainer.Sack": {
"title": "Sack",
"target": "http://192.168.0.160:8080/DefaultService.svc/Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"
},
"PersonId": -7,
"Name": "\u3073\u305e\u042f\u30bd\u307a\u307d\u30a1\u3041\u30c0\u3092\u30bd\u30dc\u0451\u66a6\u5f0c\u88f9\u30be\u3042\u30c0\u30de\u88f9\u305e\u30dc\u6b79\u307e\u307b\u307c\u4e9c\u307d\u305b\u9ed1\u3092\u30df\u30bf\u30bc\u30bd\u307a\u305e\uff88\u044f\u30d0\uff41\u3041\u0451\u3074\u307d",
"ManagersPersonId": -56,
"Salary": 2016141266,
"Title": "uuzantjguxlhfqgilizenqahpiqcqznzgyeyzaaonqagfcfxkuu",
"CarsVIN": 2147483647,
"Bonus": -9620,
"IsFullyVested": false
}]
}

View File

@ -0,0 +1,131 @@
<?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.
-->
<feed xml:base="http://192.168.0.160:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<id>http://192.168.0.160:8080/DefaultService.svc/Person/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee</id>
<title type="text">Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee</title>
<updated>2014-04-07T12:38:49Z</updated>
<link rel="self" title="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" href="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee"/>
<entry>
<id>http://192.168.0.160:8080/DefaultService.svc/Person(-10)</id>
<category term="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link rel="edit" title="SpecialEmployee" href="Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PersonMetadata" type="application/atom+xml;type=feed" title="PersonMetadata" href="Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Car" type="application/atom+xml;type=entry" title="Car" href="Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car"/>
<title/>
<updated>2014-04-07T12:38:49Z</updated>
<author>
<name/>
</author>
<m:action metadata="http://192.168.0.160:8080/DefaultService.svc/$metadata#DefaultContainer.Sack" title="Sack" target="http://192.168.0.160:8080/DefaultService.svc/Person(-10)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"/>
<content type="application/xml">
<m:properties>
<d:PersonId m:type="Edm.Int32">-10</d:PersonId>
<d:Name>ぺソぞ弌タァ匚タぽひハ欲ぴほ匚せまたバボチマ匚ぁゾソチぁЯそぁミя暦畚ボ歹ひЯほダチそЯせぽゼポЯチaた歹たをタマせをせ匚ミタひぜ畚暦グクひほそたグせяチ匚ヲぺぁ裹ぁソび黑裹縷</d:Name>
<d:ManagersPersonId m:type="Edm.Int32">47</d:ManagersPersonId>
<d:Salary m:type="Edm.Int32">4101</d:Salary>
<d:Title>ぺソЯを歹ァ欲Яソあぽヲaそせя縷ポせネぴヲ黑畚яほゾほべaほネバ畚九亜ёハべぜァ裹ソ欲ほグンポ弌黑チびヲネミぼタたまバ歹チ暦タ欲をクぁクんンまソネボまタぜボポほ歹ソをァあяボたゾほ</d:Title>
<d:CarsVIN m:type="Edm.Int32">-1911530027</d:CarsVIN>
<d:Bonus m:type="Edm.Int32">-37730565</d:Bonus>
<d:IsFullyVested m:type="Edm.Boolean">false</d:IsFullyVested>
</m:properties>
</content>
</entry>
<entry>
<id>http://192.168.0.160:8080/DefaultService.svc/Person(-9)</id>
<category term="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link rel="edit" title="SpecialEmployee" href="Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PersonMetadata" type="application/atom+xml;type=feed" title="PersonMetadata" href="Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Car" type="application/atom+xml;type=entry" title="Car" href="Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car"/>
<title/>
<updated>2014-04-07T12:38:49Z</updated>
<author>
<name/>
</author>
<m:action metadata="http://192.168.0.160:8080/DefaultService.svc/$metadata#DefaultContainer.Sack" title="Sack" target="http://192.168.0.160:8080/DefaultService.svc/Person(-9)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"/>
<content type="application/xml">
<m:properties>
<d:PersonId m:type="Edm.Int32">-9</d:PersonId>
<d:Name>stiuictvznkcvledkjnnluuvkmyumyfduxmjqpfnbjqgmvhuiytjbjinzbfmf</d:Name>
<d:ManagersPersonId m:type="Edm.Int32">-8429952</d:ManagersPersonId>
<d:Salary m:type="Edm.Int32">-2147483638</d:Salary>
<d:Title>バボ歹そЯゼぁゾソんボたそ九ボひ珱あマ暦ンソソァ匚ぼほたボぜク匚ソ畚ゾんaァべあяせタ縷マゼべぺマ縷ゼぞゼたzたたタァ九ひ黑縷クヲ歹マほぼをぺタ畚ボ弌黑zハボクёяソミマほゼまaァひゼンソ黑</d:Title>
<d:CarsVIN m:type="Edm.Int32">-2147483648</d:CarsVIN>
<d:Bonus m:type="Edm.Int32">-2147483648</d:Bonus>
<d:IsFullyVested m:type="Edm.Boolean">false</d:IsFullyVested>
</m:properties>
</content>
</entry>
<entry>
<id>http://192.168.0.160:8080/DefaultService.svc/Person(-8)</id>
<category term="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link rel="edit" title="SpecialEmployee" href="Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PersonMetadata" type="application/atom+xml;type=feed" title="PersonMetadata" href="Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Car" type="application/atom+xml;type=entry" title="Car" href="Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car"/>
<title/>
<updated>2014-04-07T12:38:49Z</updated>
<author>
<name/>
</author>
<m:action metadata="http://192.168.0.160:8080/DefaultService.svc/$metadata#DefaultContainer.Sack" title="Sack" target="http://192.168.0.160:8080/DefaultService.svc/Person(-8)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"/>
<content type="application/xml">
<m:properties>
<d:PersonId m:type="Edm.Int32">-8</d:PersonId>
<d:Name>vypuyxjjxlzfldvppqxkmzdnnapmugyumusqfrnaotviyfbudutxksfvpabxdxdmnosflbfxevfsouqdutczmaguuxaf</d:Name>
<d:ManagersPersonId m:type="Edm.Int32">3777</d:ManagersPersonId>
<d:Salary m:type="Edm.Int32">334131150</d:Salary>
<d:Title>せ畚珱欲バゼチミゾァ黑ぜゾボんンチ弌zタボびЯゼグぞせぼ珱ポ裹</d:Title>
<d:CarsVIN m:type="Edm.Int32">-4784</d:CarsVIN>
<d:Bonus m:type="Edm.Int32">2147483647</d:Bonus>
<d:IsFullyVested m:type="Edm.Boolean">true</d:IsFullyVested>
</m:properties>
</content>
</entry>
<entry>
<id>http://192.168.0.160:8080/DefaultService.svc/Person(-7)</id>
<category term="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link rel="edit" title="SpecialEmployee" href="Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PersonMetadata" type="application/atom+xml;type=feed" title="PersonMetadata" href="Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/PersonMetadata"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Manager"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Car" type="application/atom+xml;type=entry" title="Car" href="Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Car"/>
<title/>
<updated>2014-04-07T12:38:49Z</updated>
<author>
<name/>
</author>
<m:action metadata="http://192.168.0.160:8080/DefaultService.svc/$metadata#DefaultContainer.Sack" title="Sack" target="http://192.168.0.160:8080/DefaultService.svc/Person(-7)/Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee/Sack"/>
<content type="application/xml">
<m:properties>
<d:PersonId m:type="Edm.Int32">-7</d:PersonId>
<d:Name>びぞЯソぺぽァぁダをソボё暦弌裹ゾあダマ裹ぞボ歹まほぼ亜ぽせ黑をミタゼソぺぞネяバaぁёぴぽ</d:Name>
<d:ManagersPersonId m:type="Edm.Int32">-56</d:ManagersPersonId>
<d:Salary m:type="Edm.Int32">2016141266</d:Salary>
<d:Title>uuzantjguxlhfqgilizenqahpiqcqznzgyeyzaaonqagfcfxkuu</d:Title>
<d:CarsVIN m:type="Edm.Int32">2147483647</d:CarsVIN>
<d:Bonus m:type="Edm.Int32">-9620</d:Bonus>
<d:IsFullyVested m:type="Edm.Boolean">false</d:IsFullyVested>
</m:properties>
</content>
</entry>
</feed>

View File

@ -0,0 +1,708 @@
<?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.
-->
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="Microsoft.Test.OData.Services.AstoriaDefaultService" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityType Name="AllSpatialTypes">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Edm.Int32" Nullable="false" />
<Property Name="Geog" Type="Edm.Geography" SRID="Variable" />
<Property Name="GeogPoint" Type="Edm.GeographyPoint" SRID="Variable" />
<Property Name="GeogLine" Type="Edm.GeographyLineString" SRID="Variable" />
<Property Name="GeogPolygon" Type="Edm.GeographyPolygon" SRID="Variable" />
<Property Name="GeogCollection" Type="Edm.GeographyCollection" SRID="Variable" />
<Property Name="GeogMultiPoint" Type="Edm.GeographyMultiPoint" SRID="Variable" />
<Property Name="GeogMultiLine" Type="Edm.GeographyMultiLineString" SRID="Variable" />
<Property Name="GeogMultiPolygon" Type="Edm.GeographyMultiPolygon" SRID="Variable" />
<Property Name="Geom" Type="Edm.Geometry" SRID="Variable" />
<Property Name="GeomPoint" Type="Edm.GeometryPoint" SRID="Variable" />
<Property Name="GeomLine" Type="Edm.GeometryLineString" SRID="Variable" />
<Property Name="GeomPolygon" Type="Edm.GeometryPolygon" SRID="Variable" />
<Property Name="GeomCollection" Type="Edm.GeometryCollection" SRID="Variable" />
<Property Name="GeomMultiPoint" Type="Edm.GeometryMultiPoint" SRID="Variable" />
<Property Name="GeomMultiLine" Type="Edm.GeometryMultiLineString" SRID="Variable" />
<Property Name="GeomMultiPolygon" Type="Edm.GeometryMultiPolygon" SRID="Variable" />
</EntityType>
<EntityType Name="AllSpatialCollectionTypes" Abstract="true">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Edm.Int32" Nullable="false" />
</EntityType>
<EntityType Name="AllSpatialCollectionTypes_Simple" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialCollectionTypes">
<Property Name="ManyGeogPoint" Type="Collection(Edm.GeographyPoint)" Nullable="false" SRID="Variable" />
<Property Name="ManyGeogLine" Type="Collection(Edm.GeographyLineString)" Nullable="false" SRID="Variable" />
<Property Name="ManyGeogPolygon" Type="Collection(Edm.GeographyPolygon)" Nullable="false" SRID="Variable" />
<Property Name="ManyGeomPoint" Type="Collection(Edm.GeometryPoint)" Nullable="false" SRID="Variable" />
<Property Name="ManyGeomLine" Type="Collection(Edm.GeometryLineString)" Nullable="false" SRID="Variable" />
<Property Name="ManyGeomPolygon" Type="Collection(Edm.GeometryPolygon)" Nullable="false" SRID="Variable" />
</EntityType>
<EntityType Name="Customer">
<Key>
<PropertyRef Name="CustomerId" />
</Key>
<Property Name="Thumbnail" Type="Edm.Stream" Nullable="false" />
<Property Name="Video" Type="Edm.Stream" Nullable="false" />
<Property Name="CustomerId" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
<Property Name="PrimaryContactInfo" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails" />
<Property Name="BackupContactInfo" Type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails)" Nullable="false" />
<Property Name="Auditing" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo" />
<NavigationProperty Name="Orders" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Orders" ToRole="Orders" FromRole="Customer" />
<NavigationProperty Name="Logins" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Logins" ToRole="Logins" FromRole="Customer" />
<NavigationProperty Name="Husband" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Husband" ToRole="Husband" FromRole="Customer" />
<NavigationProperty Name="Wife" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Wife" ToRole="Wife" FromRole="Customer" />
<NavigationProperty Name="Info" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Info" ToRole="Info" FromRole="Customer" />
</EntityType>
<ComplexType Name="ContactDetails">
<Property Name="EmailBag" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="AlternativeNames" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="ContactAlias" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Aliases" />
<Property Name="HomePhone" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone" />
<Property Name="WorkPhone" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone" />
<Property Name="MobilePhoneBag" Type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Phone)" Nullable="false" />
</ComplexType>
<ComplexType Name="Aliases">
<Property Name="AlternativeNames" Type="Collection(Edm.String)" Nullable="false" />
</ComplexType>
<ComplexType Name="Phone">
<Property Name="PhoneNumber" Type="Edm.String" />
<Property Name="Extension" Type="Edm.String" />
</ComplexType>
<ComplexType Name="AuditInfo">
<Property Name="ModifiedDate" Type="Edm.DateTime" Nullable="false" />
<Property Name="ModifiedBy" Type="Edm.String" />
<Property Name="Concurrency" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ConcurrencyInfo" />
</ComplexType>
<ComplexType Name="ConcurrencyInfo">
<Property Name="Token" Type="Edm.String" />
<Property Name="QueriedDateTime" Type="Edm.DateTime" />
</ComplexType>
<EntityType Name="Login">
<Key>
<PropertyRef Name="Username" />
</Key>
<Property Name="Username" Type="Edm.String" Nullable="false" />
<Property Name="CustomerId" Type="Edm.Int32" Nullable="false" />
<NavigationProperty Name="Customer" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_Customer" ToRole="Customer" FromRole="Login" />
<NavigationProperty Name="LastLogin" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_LastLogin" ToRole="LastLogin" FromRole="Login" />
<NavigationProperty Name="SentMessages" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_SentMessages" ToRole="SentMessages" FromRole="Login" />
<NavigationProperty Name="ReceivedMessages" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_ReceivedMessages" ToRole="ReceivedMessages" FromRole="Login" />
<NavigationProperty Name="Orders" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_Orders" ToRole="Orders" FromRole="Login" />
</EntityType>
<EntityType Name="RSAToken">
<Key>
<PropertyRef Name="Serial" />
</Key>
<Property Name="Serial" Type="Edm.String" Nullable="false" />
<Property Name="Issued" Type="Edm.DateTime" Nullable="false" />
<NavigationProperty Name="Login" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.RSAToken_Login" ToRole="Login" FromRole="RSAToken" />
</EntityType>
<EntityType Name="PageView">
<Key>
<PropertyRef Name="PageViewId" />
</Key>
<Property Name="PageViewId" Type="Edm.Int32" Nullable="false" />
<Property Name="Username" Type="Edm.String" />
<Property Name="Viewed" Type="Edm.DateTimeOffset" Nullable="false" />
<Property Name="TimeSpentOnPage" Type="Edm.Time" Nullable="false" />
<Property Name="PageUrl" Type="Edm.String" />
<NavigationProperty Name="Login" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.PageView_Login" ToRole="Login" FromRole="PageView" />
</EntityType>
<EntityType Name="ProductPageView" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.PageView">
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="ConcurrencyToken" Type="Edm.String" ConcurrencyMode="Fixed" />
</EntityType>
<EntityType Name="LastLogin">
<Key>
<PropertyRef Name="Username" />
</Key>
<Property Name="Username" Type="Edm.String" Nullable="false" />
<Property Name="LoggedIn" Type="Edm.DateTime" Nullable="false" />
<Property Name="LoggedOut" Type="Edm.DateTime" />
<Property Name="Duration" Type="Edm.Time" Nullable="false" />
<NavigationProperty Name="Login" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.LastLogin_Login" ToRole="Login" FromRole="LastLogin" />
</EntityType>
<EntityType Name="Message">
<Key>
<PropertyRef Name="FromUsername" />
<PropertyRef Name="MessageId" />
</Key>
<Property Name="MessageId" Type="Edm.Int32" Nullable="false" />
<Property Name="FromUsername" Type="Edm.String" Nullable="false" />
<Property Name="ToUsername" Type="Edm.String" />
<Property Name="Sent" Type="Edm.DateTimeOffset" Nullable="false" m:FC_TargetPath="SyndicationPublished" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Subject" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Body" Type="Edm.String" />
<Property Name="IsRead" Type="Edm.Boolean" Nullable="false" />
<NavigationProperty Name="Sender" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Sender" ToRole="Sender" FromRole="Message" />
<NavigationProperty Name="Recipient" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Recipient" ToRole="Recipient" FromRole="Message" />
<NavigationProperty Name="Attachments" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Attachments" ToRole="Attachments" FromRole="Message" />
</EntityType>
<EntityType Name="MessageAttachment">
<Key>
<PropertyRef Name="AttachmentId" />
</Key>
<Property Name="AttachmentId" Type="Edm.Guid" Nullable="false" />
<Property Name="Attachment" Type="Edm.Binary" />
</EntityType>
<EntityType Name="Order">
<Key>
<PropertyRef Name="OrderId" />
</Key>
<Property Name="OrderId" Type="Edm.Int32" Nullable="false" />
<Property Name="CustomerId" Type="Edm.Int32" />
<Property Name="Concurrency" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ConcurrencyInfo" />
<NavigationProperty Name="Login" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Order_Login" ToRole="Login" FromRole="Order" />
<NavigationProperty Name="Customer" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Order_Customer" ToRole="Customer" FromRole="Order" />
</EntityType>
<EntityType Name="OrderLine">
<Key>
<PropertyRef Name="OrderId" />
<PropertyRef Name="ProductId" />
</Key>
<Property Name="OrderLineStream" Type="Edm.Stream" Nullable="false" />
<Property Name="OrderId" Type="Edm.Int32" Nullable="false" />
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="Quantity" Type="Edm.Int32" Nullable="false" />
<Property Name="ConcurrencyToken" Type="Edm.String" ConcurrencyMode="Fixed" />
<NavigationProperty Name="Order" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine_Order" ToRole="Order" FromRole="OrderLine" />
<NavigationProperty Name="Product" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine_Product" ToRole="Product" FromRole="OrderLine" />
</EntityType>
<EntityType Name="BackOrderLine" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine" />
<EntityType Name="BackOrderLine2" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.BackOrderLine" />
<EntityType Name="Product">
<Key>
<PropertyRef Name="ProductId" />
</Key>
<Property Name="Picture" Type="Edm.Stream" Nullable="false" />
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="Description" Type="Edm.String" />
<Property Name="Dimensions" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions" />
<Property Name="BaseConcurrency" Type="Edm.String" ConcurrencyMode="Fixed" />
<Property Name="ComplexConcurrency" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ConcurrencyInfo" />
<Property Name="NestedComplexConcurrency" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.AuditInfo" />
<NavigationProperty Name="RelatedProducts" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_RelatedProducts" ToRole="RelatedProducts" FromRole="Product" />
<NavigationProperty Name="Detail" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Detail" ToRole="Detail" FromRole="Product" />
<NavigationProperty Name="Reviews" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Reviews" ToRole="Reviews" FromRole="Product" />
<NavigationProperty Name="Photos" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Photos" ToRole="Photos" FromRole="Product" />
</EntityType>
<EntityType Name="DiscontinuedProduct" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.Product">
<Property Name="Discontinued" Type="Edm.DateTime" Nullable="false" />
<Property Name="ReplacementProductId" Type="Edm.Int32" />
<Property Name="DiscontinuedPhone" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone" />
<Property Name="ChildConcurrencyToken" Type="Edm.String" ConcurrencyMode="Fixed" />
</EntityType>
<ComplexType Name="Dimensions">
<Property Name="Width" Type="Edm.Decimal" Nullable="false" />
<Property Name="Height" Type="Edm.Decimal" Nullable="false" />
<Property Name="Depth" Type="Edm.Decimal" Nullable="false" />
</ComplexType>
<EntityType Name="ProductDetail">
<Key>
<PropertyRef Name="ProductId" />
</Key>
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="Details" Type="Edm.String" />
<NavigationProperty Name="Product" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductDetail_Product" ToRole="Product" FromRole="ProductDetail" />
</EntityType>
<EntityType Name="ProductReview">
<Key>
<PropertyRef Name="ProductId" />
<PropertyRef Name="ReviewId" />
<PropertyRef Name="RevisionId" />
</Key>
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="ReviewId" Type="Edm.Int32" Nullable="false" />
<Property Name="Review" Type="Edm.String" />
<Property Name="RevisionId" Type="Edm.String" Nullable="false" />
<NavigationProperty Name="Product" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductReview_Product" ToRole="Product" FromRole="ProductReview" />
</EntityType>
<EntityType Name="ProductPhoto">
<Key>
<PropertyRef Name="PhotoId" />
<PropertyRef Name="ProductId" />
</Key>
<Property Name="ProductId" Type="Edm.Int32" Nullable="false" />
<Property Name="PhotoId" Type="Edm.Int32" Nullable="false" />
<Property Name="Photo" Type="Edm.Binary" />
</EntityType>
<EntityType Name="CustomerInfo" m:HasStream="true">
<Key>
<PropertyRef Name="CustomerInfoId" />
</Key>
<Property Name="CustomerInfoId" Type="Edm.Int32" Nullable="false" />
<Property Name="Information" Type="Edm.String" />
</EntityType>
<EntityType Name="Computer">
<Key>
<PropertyRef Name="ComputerId" />
</Key>
<Property Name="ComputerId" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
<NavigationProperty Name="ComputerDetail" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Computer_ComputerDetail" ToRole="ComputerDetail" FromRole="Computer" />
</EntityType>
<EntityType Name="ComputerDetail">
<Key>
<PropertyRef Name="ComputerDetailId" />
</Key>
<Property Name="ComputerDetailId" Type="Edm.Int32" Nullable="false" />
<Property Name="Manufacturer" Type="Edm.String" m:FC_TargetPath="SyndicationAuthorEmail" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Model" Type="Edm.String" m:FC_TargetPath="SyndicationAuthorUri" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Serial" Type="Edm.String" />
<Property Name="SpecificationsBag" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="PurchaseDate" Type="Edm.DateTime" Nullable="false" />
<Property Name="Dimensions" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions" />
<NavigationProperty Name="Computer" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail_Computer" ToRole="Computer" FromRole="ComputerDetail" />
</EntityType>
<EntityType Name="Driver">
<Key>
<PropertyRef Name="Name" />
</Key>
<Property Name="Name" Type="Edm.String" Nullable="false" />
<Property Name="BirthDate" Type="Edm.DateTime" Nullable="false" />
<NavigationProperty Name="License" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Driver_License" ToRole="License" FromRole="Driver" />
</EntityType>
<EntityType Name="License">
<Key>
<PropertyRef Name="Name" />
</Key>
<Property Name="Name" Type="Edm.String" Nullable="false" />
<Property Name="LicenseNumber" Type="Edm.String" />
<Property Name="LicenseClass" Type="Edm.String" m:FC_TargetPath="SyndicationContributorEmail" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
<Property Name="Restrictions" Type="Edm.String" m:FC_TargetPath="SyndicationContributorUri" m:FC_ContentKind="text" m:FC_KeepInContent="false" />
<Property Name="ExpirationDate" Type="Edm.DateTime" Nullable="false" />
<NavigationProperty Name="Driver" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.License_Driver" ToRole="Driver" FromRole="License" />
</EntityType>
<EntityType Name="MappedEntityType">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Edm.Int32" Nullable="false" />
<Property Name="Href" Type="Edm.String" />
<Property Name="Title" Type="Edm.String" />
<Property Name="HrefLang" Type="Edm.String" />
<Property Name="Type" Type="Edm.String" />
<Property Name="Length" Type="Edm.Int32" Nullable="false" />
<Property Name="BagOfPrimitiveToLinks" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="Logo" Type="Edm.Binary" />
<Property Name="BagOfDecimals" Type="Collection(Edm.Decimal)" Nullable="false" />
<Property Name="BagOfDoubles" Type="Collection(Edm.Double)" Nullable="false" />
<Property Name="BagOfSingles" Type="Collection(Edm.Single)" Nullable="false" />
<Property Name="BagOfBytes" Type="Collection(Edm.Byte)" Nullable="false" />
<Property Name="BagOfInt16s" Type="Collection(Edm.Int16)" Nullable="false" />
<Property Name="BagOfInt32s" Type="Collection(Edm.Int32)" Nullable="false" />
<Property Name="BagOfInt64s" Type="Collection(Edm.Int64)" Nullable="false" />
<Property Name="BagOfGuids" Type="Collection(Edm.Guid)" Nullable="false" />
<Property Name="BagOfDateTime" Type="Collection(Edm.DateTime)" Nullable="false" />
<Property Name="BagOfComplexToCategories" Type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.ComplexToCategory)" Nullable="false" />
<Property Name="ComplexPhone" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Phone" m:FC_TargetPath="SyndicationRights" m:FC_ContentKind="text" m:FC_SourcePath="PhoneNumber" m:FC_KeepInContent="true" />
<Property Name="ComplexContactDetails" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ContactDetails" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text" m:FC_SourcePath="WorkPhone/Extension" m:FC_KeepInContent="true" />
</EntityType>
<ComplexType Name="ComplexToCategory">
<Property Name="Term" Type="Edm.String" />
<Property Name="Scheme" Type="Edm.String" />
<Property Name="Label" Type="Edm.String" />
</ComplexType>
<EntityType Name="Car" m:HasStream="true">
<Key>
<PropertyRef Name="VIN" />
</Key>
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
<Property Name="Video" Type="Edm.Stream" Nullable="false" />
<Property Name="VIN" Type="Edm.Int32" Nullable="false" />
<Property Name="Description" Type="Edm.String" />
</EntityType>
<EntityType Name="Person">
<Key>
<PropertyRef Name="PersonId" />
</Key>
<Property Name="PersonId" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
<NavigationProperty Name="PersonMetadata" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Person_PersonMetadata" ToRole="PersonMetadata" FromRole="Person" />
</EntityType>
<EntityType Name="Contractor" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.Person">
<Property Name="ContratorCompanyId" Type="Edm.Int32" Nullable="false" />
<Property Name="BillingRate" Type="Edm.Int32" Nullable="false" />
<Property Name="TeamContactPersonId" Type="Edm.Int32" Nullable="false" />
<Property Name="JobDescription" Type="Edm.String" />
</EntityType>
<EntityType Name="Employee" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.Person">
<Property Name="ManagersPersonId" Type="Edm.Int32" Nullable="false" />
<Property Name="Salary" Type="Edm.Int32" Nullable="false" />
<Property Name="Title" Type="Edm.String" />
<NavigationProperty Name="Manager" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee_Manager" ToRole="Manager" FromRole="Employee" />
</EntityType>
<EntityType Name="SpecialEmployee" BaseType="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee">
<Property Name="CarsVIN" Type="Edm.Int32" Nullable="false" />
<Property Name="Bonus" Type="Edm.Int32" Nullable="false" />
<Property Name="IsFullyVested" Type="Edm.Boolean" Nullable="false" />
<NavigationProperty Name="Car" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee_Car" ToRole="Car" FromRole="SpecialEmployee" />
</EntityType>
<EntityType Name="PersonMetadata">
<Key>
<PropertyRef Name="PersonMetadataId" />
</Key>
<Property Name="PersonMetadataId" Type="Edm.Int32" Nullable="false" />
<Property Name="PersonId" Type="Edm.Int32" Nullable="false" />
<Property Name="PropertyName" Type="Edm.String" />
<Property Name="PropertyValue" Type="Edm.String" />
<NavigationProperty Name="Person" Relationship="Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata_Person" ToRole="Person" FromRole="PersonMetadata" />
</EntityType>
<Association Name="Customer_Orders">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" Role="Orders" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="*" />
</Association>
<Association Name="Customer_Logins">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Logins" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="*" />
</Association>
<Association Name="Customer_Husband">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Husband" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="*" />
</Association>
<Association Name="Customer_Wife">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Wife" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="*" />
</Association>
<Association Name="Customer_Info">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.CustomerInfo" Role="Info" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="*" />
</Association>
<Association Name="Login_Customer">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="0..1" />
</Association>
<Association Name="Login_LastLogin">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.LastLogin" Role="LastLogin" Multiplicity="0..1" />
</Association>
<Association Name="Login_SentMessages">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" Role="SentMessages" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="*" />
</Association>
<Association Name="Login_ReceivedMessages">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" Role="ReceivedMessages" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="*" />
</Association>
<Association Name="Login_Orders">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" Role="Orders" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="*" />
</Association>
<Association Name="RSAToken_Login">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.RSAToken" Role="RSAToken" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="0..1" />
</Association>
<Association Name="PageView_Login">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.PageView" Role="PageView" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="0..1" />
</Association>
<Association Name="LastLogin_Login">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.LastLogin" Role="LastLogin" Multiplicity="*" />
</Association>
<Association Name="Message_Sender">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" Role="Message" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Sender" Multiplicity="0..1" />
</Association>
<Association Name="Message_Recipient">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" Role="Message" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Recipient" Multiplicity="0..1" />
</Association>
<Association Name="Message_Attachments">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.MessageAttachment" Role="Attachments" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" Role="Message" Multiplicity="*" />
</Association>
<Association Name="Order_Login">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" Role="Order" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" Role="Login" Multiplicity="0..1" />
</Association>
<Association Name="Order_Customer">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" Role="Order" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" Role="Customer" Multiplicity="0..1" />
</Association>
<Association Name="OrderLine_Order">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine" Role="OrderLine" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" Role="Order" Multiplicity="0..1" />
</Association>
<Association Name="OrderLine_Product">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine" Role="OrderLine" Multiplicity="*" />
</Association>
<Association Name="Product_RelatedProducts">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="RelatedProducts" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="*" />
</Association>
<Association Name="Product_Detail">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductDetail" Role="Detail" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="*" />
</Association>
<Association Name="Product_Reviews">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductReview" Role="Reviews" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="*" />
</Association>
<Association Name="Product_Photos">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductPhoto" Role="Photos" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="*" />
</Association>
<Association Name="ProductDetail_Product">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductDetail" Role="ProductDetail" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="0..1" />
</Association>
<Association Name="ProductReview_Product">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductReview" Role="ProductReview" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" Role="Product" Multiplicity="0..1" />
</Association>
<Association Name="Computer_ComputerDetail">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail" Role="ComputerDetail" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Computer" Role="Computer" Multiplicity="*" />
</Association>
<Association Name="ComputerDetail_Computer">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail" Role="ComputerDetail" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Computer" Role="Computer" Multiplicity="0..1" />
</Association>
<Association Name="Driver_License">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.License" Role="License" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Driver" Role="Driver" Multiplicity="*" />
</Association>
<Association Name="License_Driver">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.License" Role="License" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Driver" Role="Driver" Multiplicity="0..1" />
</Association>
<Association Name="Person_PersonMetadata">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata" Role="PersonMetadata" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Person" Role="Person" Multiplicity="*" />
</Association>
<Association Name="Employee_Manager">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" Role="Manager" Multiplicity="0..1" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" Role="Employee" Multiplicity="*" />
</Association>
<Association Name="SpecialEmployee_Car">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" Role="SpecialEmployee" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Car" Role="Car" Multiplicity="0..1" />
</Association>
<Association Name="PersonMetadata_Person">
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata" Role="PersonMetadata" Multiplicity="*" />
<End Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Person" Role="Person" Multiplicity="0..1" />
</Association>
<EntityContainer Name="DefaultContainer" m:IsDefaultEntityContainer="true">
<EntitySet Name="AllGeoTypesSet" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes" />
<EntitySet Name="AllGeoCollectionTypesSet" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialCollectionTypes" />
<EntitySet Name="Customer" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer" />
<EntitySet Name="Login" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Login" />
<EntitySet Name="RSAToken" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.RSAToken" />
<EntitySet Name="PageView" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.PageView" />
<EntitySet Name="LastLogin" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.LastLogin" />
<EntitySet Name="Message" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Message" />
<EntitySet Name="MessageAttachment" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.MessageAttachment" />
<EntitySet Name="Order" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Order" />
<EntitySet Name="OrderLine" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine" />
<EntitySet Name="Product" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" />
<EntitySet Name="ProductDetail" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductDetail" />
<EntitySet Name="ProductReview" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductReview" />
<EntitySet Name="ProductPhoto" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductPhoto" />
<EntitySet Name="CustomerInfo" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.CustomerInfo" />
<EntitySet Name="Computer" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Computer" />
<EntitySet Name="ComputerDetail" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail" />
<EntitySet Name="Driver" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Driver" />
<EntitySet Name="License" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.License" />
<EntitySet Name="MappedEntityType" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.MappedEntityType" />
<EntitySet Name="Car" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Car" />
<EntitySet Name="Person" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.Person" />
<EntitySet Name="PersonMetadata" EntityType="Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata" />
<FunctionImport Name="RetrieveProduct" ReturnType="Edm.Int32" m:HttpMethod="POST" />
<FunctionImport Name="RetrieveProduct" ReturnType="Edm.Int32" IsBindable="true">
<Parameter Name="product" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Product" />
</FunctionImport>
<FunctionImport Name="RetrieveProduct" ReturnType="Edm.Int32" IsBindable="true">
<Parameter Name="orderLine" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine" />
</FunctionImport>
<FunctionImport Name="IncreaseSalaries" IsBindable="true">
<Parameter Name="employees" Type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Employee)" />
<Parameter Name="n" Type="Edm.Int32" Nullable="false" />
</FunctionImport>
<FunctionImport Name="IncreaseSalaries" IsBindable="true">
<Parameter Name="specialEmployees" Type="Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee)" />
<Parameter Name="n" Type="Edm.Int32" Nullable="false" />
</FunctionImport>
<FunctionImport Name="UpdatePersonInfo" />
<FunctionImport Name="UpdatePersonInfo" IsBindable="true">
<Parameter Name="person" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Person" />
</FunctionImport>
<FunctionImport Name="UpdatePersonInfo" IsBindable="true">
<Parameter Name="employee" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" />
</FunctionImport>
<FunctionImport Name="UpdatePersonInfo" IsBindable="true">
<Parameter Name="specialEmployee" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" />
</FunctionImport>
<FunctionImport Name="UpdatePersonInfo" IsBindable="true" m:IsAlwaysBindable="true">
<Parameter Name="contractor" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Contractor" />
</FunctionImport>
<FunctionImport Name="IncreaseEmployeeSalary" ReturnType="Edm.Boolean" IsBindable="true">
<Parameter Name="employee" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" />
<Parameter Name="n" Type="Edm.Int32" Nullable="false" />
</FunctionImport>
<FunctionImport Name="IncreaseEmployeeSalary" ReturnType="Edm.Int32" IsBindable="true">
<Parameter Name="specialEmployee" Type="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee" />
</FunctionImport>
<AssociationSet Name="Customer_Orders" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Orders">
<End Role="Customer" EntitySet="Customer" />
<End Role="Orders" EntitySet="Order" />
</AssociationSet>
<AssociationSet Name="Customer_Logins" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Logins">
<End Role="Customer" EntitySet="Customer" />
<End Role="Logins" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="Customer_Husband" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Husband">
<End Role="Customer" EntitySet="Customer" />
<End Role="Husband" EntitySet="Customer" />
</AssociationSet>
<AssociationSet Name="Customer_Wife" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Wife">
<End Role="Customer" EntitySet="Customer" />
<End Role="Wife" EntitySet="Customer" />
</AssociationSet>
<AssociationSet Name="Customer_Info" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Customer_Info">
<End Role="Customer" EntitySet="Customer" />
<End Role="Info" EntitySet="CustomerInfo" />
</AssociationSet>
<AssociationSet Name="Login_Customer" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_Customer">
<End Role="Login" EntitySet="Login" />
<End Role="Customer" EntitySet="Customer" />
</AssociationSet>
<AssociationSet Name="Login_LastLogin" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_LastLogin">
<End Role="Login" EntitySet="Login" />
<End Role="LastLogin" EntitySet="LastLogin" />
</AssociationSet>
<AssociationSet Name="Login_SentMessages" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_SentMessages">
<End Role="Login" EntitySet="Login" />
<End Role="SentMessages" EntitySet="Message" />
</AssociationSet>
<AssociationSet Name="Login_ReceivedMessages" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_ReceivedMessages">
<End Role="Login" EntitySet="Login" />
<End Role="ReceivedMessages" EntitySet="Message" />
</AssociationSet>
<AssociationSet Name="Login_Orders" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Login_Orders">
<End Role="Login" EntitySet="Login" />
<End Role="Orders" EntitySet="Order" />
</AssociationSet>
<AssociationSet Name="RSAToken_Login" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.RSAToken_Login">
<End Role="RSAToken" EntitySet="RSAToken" />
<End Role="Login" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="PageView_Login" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.PageView_Login">
<End Role="PageView" EntitySet="PageView" />
<End Role="Login" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="LastLogin_Login" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.LastLogin_Login">
<End Role="LastLogin" EntitySet="LastLogin" />
<End Role="Login" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="Message_Sender" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Sender">
<End Role="Message" EntitySet="Message" />
<End Role="Sender" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="Message_Recipient" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Recipient">
<End Role="Message" EntitySet="Message" />
<End Role="Recipient" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="Message_Attachments" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Message_Attachments">
<End Role="Message" EntitySet="Message" />
<End Role="Attachments" EntitySet="MessageAttachment" />
</AssociationSet>
<AssociationSet Name="Order_Login" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Order_Login">
<End Role="Order" EntitySet="Order" />
<End Role="Login" EntitySet="Login" />
</AssociationSet>
<AssociationSet Name="Order_Customer" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Order_Customer">
<End Role="Order" EntitySet="Order" />
<End Role="Customer" EntitySet="Customer" />
</AssociationSet>
<AssociationSet Name="OrderLine_Order" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine_Order">
<End Role="OrderLine" EntitySet="OrderLine" />
<End Role="Order" EntitySet="Order" />
</AssociationSet>
<AssociationSet Name="OrderLine_Product" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine_Product">
<End Role="OrderLine" EntitySet="OrderLine" />
<End Role="Product" EntitySet="Product" />
</AssociationSet>
<AssociationSet Name="Product_RelatedProducts" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_RelatedProducts">
<End Role="Product" EntitySet="Product" />
<End Role="RelatedProducts" EntitySet="Product" />
</AssociationSet>
<AssociationSet Name="Product_Detail" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Detail">
<End Role="Product" EntitySet="Product" />
<End Role="Detail" EntitySet="ProductDetail" />
</AssociationSet>
<AssociationSet Name="Product_Reviews" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Reviews">
<End Role="Product" EntitySet="Product" />
<End Role="Reviews" EntitySet="ProductReview" />
</AssociationSet>
<AssociationSet Name="Product_Photos" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Product_Photos">
<End Role="Product" EntitySet="Product" />
<End Role="Photos" EntitySet="ProductPhoto" />
</AssociationSet>
<AssociationSet Name="ProductDetail_Product" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductDetail_Product">
<End Role="ProductDetail" EntitySet="ProductDetail" />
<End Role="Product" EntitySet="Product" />
</AssociationSet>
<AssociationSet Name="ProductReview_Product" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.ProductReview_Product">
<End Role="ProductReview" EntitySet="ProductReview" />
<End Role="Product" EntitySet="Product" />
</AssociationSet>
<AssociationSet Name="Computer_ComputerDetail" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Computer_ComputerDetail">
<End Role="Computer" EntitySet="Computer" />
<End Role="ComputerDetail" EntitySet="ComputerDetail" />
</AssociationSet>
<AssociationSet Name="ComputerDetail_Computer" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail_Computer">
<End Role="ComputerDetail" EntitySet="ComputerDetail" />
<End Role="Computer" EntitySet="Computer" />
</AssociationSet>
<AssociationSet Name="Driver_License" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Driver_License">
<End Role="Driver" EntitySet="Driver" />
<End Role="License" EntitySet="License" />
</AssociationSet>
<AssociationSet Name="License_Driver" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.License_Driver">
<End Role="License" EntitySet="License" />
<End Role="Driver" EntitySet="Driver" />
</AssociationSet>
<AssociationSet Name="Employee_Manager" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Employee_Manager">
<End Role="Employee" EntitySet="Person" />
<End Role="Manager" EntitySet="Person" />
</AssociationSet>
<AssociationSet Name="SpecialEmployee_Car" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee_Car">
<End Role="SpecialEmployee" EntitySet="Person" />
<End Role="Car" EntitySet="Car" />
</AssociationSet>
<AssociationSet Name="Person_PersonMetadata" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.Person_PersonMetadata">
<End Role="Person" EntitySet="Person" />
<End Role="PersonMetadata" EntitySet="PersonMetadata" />
</AssociationSet>
<AssociationSet Name="PersonMetadata_Person" Association="Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata_Person">
<End Role="PersonMetadata" EntitySet="PersonMetadata" />
<End Role="Person" EntitySet="Person" />
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

View File

@ -0,0 +1 @@
{"odata.metadata":"http://192.168.0.160:8080/ActionOverloadingService.svc/$metadata#Edm.Int32","value":-10}

View File

@ -0,0 +1,24 @@
<?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.
-->
<d:RetrieveProduct xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
m:type="Edm.Int32">-10</d:RetrieveProduct>

View File

@ -41,6 +41,7 @@
<jaxrs:serviceBeans>
<bean class="org.apache.olingo.fit.V3Services"/>
<bean class="org.apache.olingo.fit.V3KeyAsSegment"/>
<bean class="org.apache.olingo.fit.V3ActionOverloading"/>
<bean class="org.apache.olingo.fit.V4Services"/>
<bean class="org.apache.olingo.fit.V4NorthWind"/>
<bean class="org.apache.olingo.fit.V4NorthWindExt"/>

View File

@ -89,6 +89,8 @@ public abstract class AbstractTestITCase {
protected static String testKeyAsSegmentServiceRootURL;
protected static String testActionOverloadingServiceRootURL;
protected static String testOpenTypeServiceRootURL;
protected static String testLargeModelServiceRootURL;
@ -99,6 +101,7 @@ public abstract class AbstractTestITCase {
public static void setUpODataServiceRoot() throws IOException {
testStaticServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc";
testKeyAsSegmentServiceRootURL = "http://localhost:9080/StaticService/V30/KeyAsSegment.svc";
testActionOverloadingServiceRootURL = "http://localhost:9080/StaticService/V30/ActionOverloading.svc";
testOpenTypeServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/openType";
testLargeModelServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/large";
testAuthServiceRootURL = "http://localhost:9080/DefaultService.svc";

View File

@ -18,116 +18,166 @@
*/
package org.apache.olingo.client.core.it.v3;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
import org.apache.olingo.client.api.uri.v3.URIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.commons.api.domain.v3.ODataEntity;
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
import org.apache.olingo.commons.api.domain.v3.ODataProperty;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmActionImport;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.core.edm.primitivetype.EdmInt32;
import org.junit.Test;
public class ActionOverloadingTestITCase extends AbstractTestITCase {
// @Test
// public void retrieveProducts() {
// final EdmV3Metadata metadata = client.getRetrieveRequestFactory().
// getMetadataRequest(testActionOverloadingServiceRootURL).execute().getBody();
// assertNotNull(metadata);
//
// final EntityContainer container = metadata.getSchema(0).getEntityContainers().get(0);
// assertNotNull(container);
//
// int execs = 0;
// for (FunctionImport funcImp : container.getFunctionImports("RetrieveProduct")) {
// final ODataInvokeResponse<ODataProperty> res;
// if (funcImp.getParameters().isEmpty()) {
// final URIBuilder funcImpBuilder = client.getURIBuilder(testActionOverloadingServiceRootURL).
// appendFunctionImportSegment(URIUtils.rootFunctionImportURISegment(container, funcImp));
//
// res = client.getInvokeRequestFactory().<ODataProperty>getInvokeRequest(
// funcImpBuilder.build(), metadata, funcImp).execute();
// } else if ("Microsoft.Test.OData.Services.AstoriaDefaultService.Product".
// equals(funcImp.getParameters().get(0).getType())) {
//
// final ODataEntity product = client.getRetrieveRequestFactory().getEntityRequest(
// client.getURIBuilder(testActionOverloadingServiceRootURL).
// appendEntityTypeSegment("Product").appendKeySegment(-10).build()).
// execute().getBody();
// assertNotNull(product);
//
// res = client.getInvokeRequestFactory().<ODataProperty>getInvokeRequest(
// product.getOperation("RetrieveProduct").getTarget(), metadata, funcImp).execute();
// } else if ("Microsoft.Test.OData.Services.AstoriaDefaultService.OrderLine".
// equals(funcImp.getParameters().get(0).getType())) {
//
// final Map<String, Object> key = new LinkedHashMap<String, Object>(2);
// key.put("OrderId", -10);
// key.put("ProductId", -10);
// final ODataEntity orderLine = client.getRetrieveRequestFactory().getEntityRequest(
// client.getURIBuilder(testActionOverloadingServiceRootURL).
// appendEntityTypeSegment("OrderLine").appendKeySegment(key).build()).
// execute().getBody();
// assertNotNull(orderLine);
//
// res = client.getInvokeRequestFactory().<ODataProperty>getInvokeRequest(
// orderLine.getOperation("RetrieveProduct").getTarget(), metadata, funcImp).execute();
// } else {
// res = null;
// }
//
// assertNotNull(res);
// assertEquals(200, res.getStatusCode());
// assertEquals(Integer.valueOf(-10), res.getBody().getPrimitiveValue().<Integer>toCastValue());
// execs++;
// }
// assertEquals(3, execs);
// }
//
// @Test
// public void increaseSalaries() {
// final EdmV3Metadata metadata =
// client.getRetrieveRequestFactory().getMetadataRequest(testActionOverloadingServiceRootURL).execute().
// getBody();
// assertNotNull(metadata);
//
// final EntityContainer container = metadata.getSchema(0).getEntityContainers().get(0);
// assertNotNull(container);
//
// int execs = 0;
// for (FunctionImport funcImp : container.getFunctionImports("IncreaseSalaries")) {
// final Map<String, ODataValue> parameters = new LinkedHashMap<String, ODataValue>(1);
// parameters.put("n",
// client.getPrimitiveValueBuilder().setType(EdmSimpleType.Int32).setValue(5).build());
//
// final ODataInvokeResponse<ODataNoContent> res;
// if ("Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.Employee)".
// equals(funcImp.getParameters().get(0).getType())) {
//
// final URIBuilder builder = client.getURIBuilder(testActionOverloadingServiceRootURL).
// appendEntitySetSegment("Person").
// appendStructuralSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.Employee");
//
// final ODataEntitySet employees = client.getRetrieveRequestFactory().getEntitySetRequest(
// builder.build()).execute().getBody();
// assertNotNull(employees);
//
// res = client.getInvokeRequestFactory().<ODataNoContent>getInvokeRequest(
// builder.appendFunctionImportSegment(funcImp.getName()).build(), metadata, funcImp, parameters).
// execute();
// } else if ("Collection(Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee)".
// equals(funcImp.getParameters().get(0).getType())) {
//
// final URIBuilder builder = client.getURIBuilder(testActionOverloadingServiceRootURL).
// appendEntitySetSegment("Person").
// appendStructuralSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee");
//
// final ODataEntitySet specialEmployees = client.getRetrieveRequestFactory().getEntitySetRequest(
// builder.build()).execute().getBody();
// assertNotNull(specialEmployees);
//
// res = client.getInvokeRequestFactory().<ODataNoContent>getInvokeRequest(
// builder.appendFunctionImportSegment(funcImp.getName()).build(), metadata, funcImp, parameters).
// execute();
// } else {
// res = null;
// }
//
// assertNotNull(res);
// assertEquals(204, res.getStatusCode());
// execs++;
// }
// assertEquals(2, execs);
// }
@Test
public void retrieveProduct() throws EdmPrimitiveTypeException {
final Edm edm = getClient().getRetrieveRequestFactory().
getMetadataRequest(testActionOverloadingServiceRootURL).execute().getBody();
assertNotNull(edm);
final EdmEntityContainer container = edm.getSchemas().get(0).getEntityContainer();
assertNotNull(container);
int execs = 0;
for (EdmActionImport actImp : container.getActionImports()) {
if ("RetrieveProduct".equals(actImp.getName())) {
// 1. unbound
final EdmAction unbound = actImp.getUnboundAction();
assertNotNull(unbound);
assertEquals(EdmInt32.getInstance(), unbound.getReturnType().getType());
final URIBuilder unboundBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
appendOperationCallSegment(URIUtils.operationImportURISegment(container, actImp));
final ODataInvokeResponse<ODataProperty> unboundRes = getClient().getInvokeRequestFactory().
<ODataProperty>getInvokeRequest(unboundBuilder.build(), unbound).execute();
assertNotNull(unboundRes);
assertEquals(200, unboundRes.getStatusCode());
assertEquals(Integer.valueOf(-10), unboundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
execs++;
// 2. bound to Product
final EdmAction productBound = edm.getBoundAction(
new FullQualifiedName(container.getNamespace(), actImp.getName()),
new FullQualifiedName(container.getNamespace(), "Product"), false);
assertNotNull(productBound);
assertEquals(EdmInt32.getInstance(), productBound.getReturnType().getType());
final ODataEntity product = getClient().getRetrieveRequestFactory().getEntityRequest(
getClient().getURIBuilder(testActionOverloadingServiceRootURL).
appendEntitySetSegment("Product").appendKeySegment(-10).build()).
execute().getBody();
assertNotNull(product);
final ODataInvokeResponse<ODataProperty> productBoundRes = getClient().getInvokeRequestFactory().
<ODataProperty>getInvokeRequest(product.getOperation(actImp.getName()).getTarget(), unbound).
execute();
assertNotNull(productBoundRes);
assertEquals(200, productBoundRes.getStatusCode());
assertEquals(Integer.valueOf(-10), productBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
execs++;
// 3. bound to OrderLine
final EdmAction orderLineBound = edm.getBoundAction(
new FullQualifiedName(container.getNamespace(), actImp.getName()),
new FullQualifiedName(container.getNamespace(), "OrderLine"), false);
assertNotNull(orderLineBound);
assertEquals(EdmInt32.getInstance(), orderLineBound.getReturnType().getType());
final Map<String, Object> key = new LinkedHashMap<String, Object>(2);
key.put("OrderId", -10);
key.put("ProductId", -10);
final ODataEntity orderLine = getClient().getRetrieveRequestFactory().getEntityRequest(
getClient().getURIBuilder(testActionOverloadingServiceRootURL).
appendEntitySetSegment("OrderLine").appendKeySegment(key).build()).
execute().getBody();
assertNotNull(orderLine);
final ODataInvokeResponse<ODataProperty> orderLineBoundRes = getClient().getInvokeRequestFactory().
<ODataProperty>getInvokeRequest(orderLine.getOperation(actImp.getName()).getTarget(), unbound).
execute();
assertNotNull(orderLineBoundRes);
assertEquals(200, orderLineBoundRes.getStatusCode());
assertEquals(Integer.valueOf(-10), orderLineBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
execs++;
}
}
assertEquals(3, execs);
}
@Test
public void increaseSalaries() {
final Edm edm = getClient().getRetrieveRequestFactory().
getMetadataRequest(testActionOverloadingServiceRootURL).execute().getBody();
assertNotNull(edm);
final EdmEntityContainer container = edm.getSchemas().get(0).getEntityContainer();
assertNotNull(container);
int execs = 0;
for (EdmActionImport actImp : container.getActionImports()) {
if ("IncreaseSalaries".equals(actImp.getName())) {
final Map<String, ODataValue> parameters = new LinkedHashMap<String, ODataValue>(1);
parameters.put("n", getClient().getObjectFactory().newPrimitiveValueBuilder().
setType(EdmPrimitiveTypeKind.Int32).setValue(5).build());
// 1. bound to employees
final EdmAction employeeBound = edm.getBoundAction(
new FullQualifiedName(container.getNamespace(), actImp.getName()),
new FullQualifiedName(container.getNamespace(), "Employee"), true);
assertNotNull(employeeBound);
assertNull(employeeBound.getReturnType());
final URIBuilder employeeBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
appendEntitySetSegment("Person").
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.Employee");
final ODataEntitySet employees = getClient().getRetrieveRequestFactory().getEntitySetRequest(
employeeBuilder.build()).execute().getBody();
assertNotNull(employees);
final ODataInvokeResponse<ODataNoContent> employeeRes = getClient().getInvokeRequestFactory().
<ODataNoContent>getInvokeRequest(employeeBuilder.appendOperationCallSegment(actImp.getName()).build(),
employeeBound, parameters).execute();
assertNotNull(employeeRes);
assertEquals(204, employeeRes.getStatusCode());
execs++;
// 1. bound to special employees
final EdmAction specEmpBound = edm.getBoundAction(
new FullQualifiedName(container.getNamespace(), actImp.getName()),
new FullQualifiedName(container.getNamespace(), "SpecialEmployee"), true);
assertNotNull(specEmpBound);
assertNull(specEmpBound.getReturnType());
final URIBuilder specEmpBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
appendEntitySetSegment("Person").
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee");
final ODataEntitySet specEmps = getClient().getRetrieveRequestFactory().getEntitySetRequest(
specEmpBuilder.build()).execute().getBody();
assertNotNull(specEmps);
final ODataInvokeResponse<ODataNoContent> specEmpsRes = getClient().getInvokeRequestFactory().
<ODataNoContent>getInvokeRequest(specEmpBuilder.appendOperationCallSegment(actImp.getName()).build(),
specEmpBound, parameters).execute();
assertNotNull(specEmpsRes);
assertEquals(204, specEmpsRes.getStatusCode());
execs++;
}
}
assertEquals(2, execs);
}
}