[OLINGO-266] fit metadata and service document

This commit is contained in:
Stephan Klevenz 2014-05-26 10:58:11 +02:00
parent 7dc44812c1
commit e57edd71dd
4 changed files with 11 additions and 18 deletions

View File

@ -27,7 +27,6 @@ import org.apache.olingo.client.core.ODataClientFactory;
import org.apache.olingo.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.commons.api.edm.Edm;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class BasicITCase {
@ -50,7 +49,6 @@ public class BasicITCase {
}
@Test
@Ignore
public void readMetadata() {
EdmMetadataRequest request = odata.getRetrieveRequestFactory().getMetadataRequest(BASE_URI + "/$metadata");
assertNotNull(request);

View File

@ -49,8 +49,8 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler {
private ODataHandler handler;
public ODataHttpHandlerImpl(final OData server, final Edm edm) {
handler = new ODataHandler(server, edm);
public ODataHttpHandlerImpl(final OData odata, final Edm edm) {
handler = new ODataHandler(odata, edm);
}
@Override

View File

@ -529,14 +529,14 @@ public class MetadataDocumentXmlSerializer {
}
private void appendReference(final XMLStreamWriter writer) throws XMLStreamException {
writer.writeStartElement(NS_EDMX, "Reference");
// TODO: Where is this value comming from?
writer.writeAttribute("Uri", "http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml");
writer.writeEmptyElement(NS_EDMX, "Include");
// TODO: Where is this value comming from?
writer.writeAttribute(XML_NAMESPACE, "Org.OData.Core.V1");
// TODO: Where is this value comming from?
writer.writeAttribute(XML_ALIAS, "Core");
writer.writeEndElement();
// writer.writeStartElement(NS_EDMX, "Reference");
// // TODO: Where is this value comming from?
// writer.writeAttribute("Uri", "http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml");
// writer.writeEmptyElement(NS_EDMX, "Include");
// // TODO: Where is this value comming from?
// writer.writeAttribute(XML_NAMESPACE, "Org.OData.Core.V1");
// // TODO: Where is this value comming from?
// writer.writeAttribute(XML_ALIAS, "Core");
// writer.writeEndElement();
}
}

View File

@ -374,11 +374,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
</plugin>
<plugin>
<groupId>com.keyboardsamurais.maven</groupId>
<artifactId>maven-timestamp-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</pluginManagement>