WS02 APIマネージャを使用してAPIを作成し、独自のJava Restful Serviceをエンドポイントとして追加しました。サービスエンドポイントをテストするとうまくいきました。 私はきちんとAPIに加入したが、それは以下の本文の内容を返します闊歩してAPIを呼び出すとき:wso2 APIマネージャ、swaggerを使用してAPIを呼び出すときにRestfullエンドポイントが見つかりません
<!DOCTYPE html>
<html>
<head>
<title>Apache Tomcat/8.0.45 - Error report</title>
<style type="text/css">
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;
}
.line {
height: 1px;
background-color: #525D76;
border: none;
}
</style>
</head>
<body>
<h1>HTTP Status 406 - Not Acceptable</h1>
<div class="line"></div>
<p><b>type</b> Status report</p>
<p><b>message</b> <u>Not Acceptable</u></p>
<p><b>description</b> <u>The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.</u></p>
<hr class="line">
<h3>Apache Tomcat/8.0.45</h3>
</body>
</html>
アプリケーション/ xmlのメディアタイプが返されることになっています!ここで
は私の闊歩のスクリーンショットはここ
APIを呼び出した後で、私も変更されているブラウザーから直接
をサービスを呼び出すときの応答でありますapplication/jsonへの応答メディアのタイプですが、それでもまだ動作しませんでした。
誰かがこの問題を解決するのに手伝ってください。
です。ご提案いただきありがとうございます。私はエンドポイントをhttp:// localhost:8080/messenger/webapi /に変更しましたが、私はまだ同じエラーコードを取得しています。 – edwing
ワイヤーログを有効にして、質問をログで更新してください。 http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html – Bee