0
私はdropwizardとjersey2残りのクライアントを使用していると私は、ロギングをオンにしたとき、私は、私はこの応答をデシリアライズすることができますどのように私は返すことjersey2できないレスポンスオブジェクト
DEBUG [2016-04-25 05:17:10,196] org.apache.http.wire:
http-outgoing-0 << "{"apiVersion":"v1","timestamp":"April 24, 2016,
10:17 pm","error":{"asiErrorCode":"12002","message":"A
message","moreInfo":"http:\/\/bar.foo.net"}}" INFO [2016-04-25
05:17:10,197] unknown.jul.logger: 1 * Client response received on
thread main 1 < 400 1 < Access-Control-Allow-Headers: Accept,
Content-Type, Authorization 1 < Access-Control-Allow-Methods: GET,
POST, PUT, DELETE 1 < Access-Control-Allow-Origin: * 1 < Allow:
OPTIONS,GET,POST,PUT,DELETE 1 < Cache-Control: no-cache, no-store,
must-revalidate 1 < Connection: close 1 < Content-Length: 265 1 <
Content-Type: application/json 1 < Date: Mon, 25 Apr 2016 05:17:10
GMT 1 < Expires: 0 1 < Pragma: no-cache 1 < Server: Apache/2.4.12
(Win32) OpenSSL/1.0.1m mod_jk/1.2.40 PHP/5.6.14
{"apiVersion":"v1","timestamp":"April 24, 2016, 10:17
pm","error":{"asiErrorCode":"12002","message":"A
message","moreInfo":"http:\/\/foo.bar.net"}}
を参照してください、しかし
javax.ws.rs.BadRequestException: HTTP 400 Bad Request
を取得ちょうど400を得るのではなく?
私のコードは
return client.target(URL).get(AsiAccounts.class);
そしてAsiAccountsのように見えますが、私はAsiAccountsにapiVerson、タイムスタンプとエラーを追加しましたが、それはまだ動作しません。基本的に
@JsonIgnoreProperties
public class AsiAccounts
}
空です。どんな助けもありがとうございます。
おかげで、あなたは詳細をもっと提供する心を使用することができますか?私は理解しているとは分かりません – user2395365
これを訪問してください: http://kielczewski.eu/2013/05/developing-restful-web-services-using-dropwizard-part-ii/ –