Modeshape rest serverを使用しています。Modeshape のバージョンは 2.8.2 です。
GET リクエストをノードに送信するとhttp://localhost:8080/modeshape-server/repo/workspace1/items/file、ノードに関する情報が返されます。
しかし、同じアドレスで (たとえば Fiddler を使用して) DELETE 要求を送信すると、405 Method Not Allowed. ドキュメントによると、このようなアドレスは DELETE リクエストをサポートする必要があります。
より詳細な。私は送る
削除 http://localhost:8080/modeshape-server/repo/workspace1/items/uploads/file HTTP/1.1 ユーザーエージェント: Fiddler ホスト: ローカルホスト:8080
私は得る
HTTP/1.1 405 メソッドは許可されていません
サーバー: Apache-コヨーテ/1.1
許可: POST、OPTIONS
コンテンツ タイプ: text/html;charset=utf-8
コンテンツの長さ: 984
日付: 2012 年 9 月 4 日 (火) 14:16:38 GMT
<html><head><title>JBoss Web/7.0.13.Final - エラー報告</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 ステータス405 - </h1><HR size="1" noshade="noshade"><p><b>type</b> ステータス レポート</p><p><b>メッセージ</b> <u></u></p><p><b>説明</b> <u>指定された HTTPメソッドは、要求されたリソース () に対して許可されていません。</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.13.Final</h3></body ></html>
rest-server.war のビルドに使用している pom.xml
<?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>
<プロパティ>
<modeshape.version>2.8.2.Final</modeshape.version>
</プロパティ>
<親>
<artifactId>modeshape</artifactId>
<groupId>org.modeshape</groupId>
<version>2.8.2.Final</version>
</親>
<groupId>modeshape.demo</groupId>
<バージョン>0.1</バージョン>
<artifactId>modeshape-server</artifactId>
<packaging>戦争</packaging>
<name>Modeshape レスト サーバー</name>
<description>JCR アイテムへの RESTful アクセスを提供する ModeShape サーブレット</description>
<url></url>
<依存関係>
<依存関係>
<groupId>javax.servlet</groupId>
<artifactId>サーブレット-api</artifactId>
<バージョン>2.5</バージョン>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-web-jcr</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-jcr-api</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-jcr</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-search-lucene</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-cnd</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-リポジトリ</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-graph</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-common</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-web-jcr-rest</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-connector-jdbc-metadata</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<バージョン>5.1.6</バージョン>
<scope>コンパイル</scope>
</依存>
<依存関係>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-connector-filesystem</artifactId>
<version>${modeshape.version}</version>
</依存>
<依存関係>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</依存>
<依存関係>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<バージョン>1.2.1.GA</バージョン>
</依存>
<依存関係>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<バージョン>4.10</バージョン>
<scope>テスト</scope>
</依存>
</依存関係>
<リポジトリ>
<リポジトリ>
<id>jboss</id>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</リポジトリ>
</リポジトリ>
<ビルド>
<finalName>レストサーバー</finalName>
</ビルド>
</プロジェクト>
私は何か間違ったことをしていますか?
また、JBoss-as-7.1.1 も使用しています。しかし、それに応じて7.0.13を書きました。
また、サービスとしてではなく Modeshape レストを使用しています。私は通常展開されたアプリケーションとして使用しています。(申し訳ありませんが、私はアプリケーションの種類にあまり詳しくありません。JBoss-as にはいくつかのサービスがあると聞きました。とにかく使用していません)