나는 Modeshape rest server을 사용하고 있습니다. Modeshape의 버전은 2.8.2입니다.Modeshape 나머지 서버에 DELETE 요청
과 같은 노드에 GET 요청을 보내면 노드에 대한 정보가 반환됩니다.
그러나 동일한 주소에서 DELETE 요청 (예 : 피들러 사용)을 보내면 405 Method Not Allowed
을 반환합니다. documentation에 따르면이 같은 주소는 DELETE 요청을 지원해야합니다.
자세한 내용. 나는
DELETE http://localhost:8080/modeshape-server/repo/workspace1/items/uploads/file HTTP/1.1 User-Agent: Fiddler Host: localhost:8080
나는 내가 뭔가 잘못하고 있습니까 나머지-server.war에게
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <properties> <modeshape.version>2.8.2.Final</modeshape.version> </properties> <parent> <artifactId>modeshape</artifactId> <groupId>org.modeshape</groupId> <version>2.8.2.Final</version> </parent> <groupId>modeshape.demo</groupId> <version>0.1</version> <artifactId>modeshape-server</artifactId> <packaging>war</packaging> <name>Modeshape rest server</name> <description>ModeShape servlet that provides RESTful access to JCR items</description> <url></url> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-web-jcr</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-jcr-api</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-jcr</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-search-lucene</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-cnd</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-repository</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-graph</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-common</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-web-jcr-rest</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-connector-jdbc-metadata</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.modeshape</groupId> <artifactId>modeshape-connector-filesystem</artifactId> <version>${modeshape.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </dependency> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-jaxrs</artifactId> <version>1.2.1.GA</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> </dependencies> <repositories> <repository> <id>jboss</id> <url>http://repository.jboss.org/nexus/content/groups/public</url> </repository> </repositories> <build> <finalName>rest-server</finalName> </build> </project>
를 구축 사용하고
HTTP/1.1 405 Method Not Allowed Server: Apache-Coyote/1.1 Allow: POST, OPTIONS Content-Type: text/html;charset=utf-8 Content-Length: 984 Date: Tue, 04 Sep 2012 14:16:38 GMT <html><head><title>JBoss Web/7.0.13.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource().</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.13.Final</h3></body></html>
의 pom.xml을받을 보내?
JBoss-as-7.1.1도 사용하고 있습니다. 그러나 응답으로 서면 7.0.13.
또한 Modeshape를 서비스로 사용하지 않습니다. 나는 일반적으로 배포 된 응용 프로그램으로 사용하고 있습니다. (유감 스럽지만 응용 프로그램 유형에 익숙하지 않아 JBoss-as에 일부 서비스가 있다고 들었습니다. 어쨌든 사용하고 있지 않습니다.)
ModeShape의 REST 서비스는 명시 적으로 405 오류를 생성하지 않으며 'DELETE' 메소드를 지원합니다. 전체 HTTP 요청 및 응답 메시지를 추가 할 수 있습니까? –
@RandallHauch 내 질문을 편집했습니다. 관심을 가져 주셔서 감사합니다. –