ジャージを使用してjsonをリモートphpアプリに投稿しようとしています。PHPアプリが投稿を受信していないようです。ヘッダーを見ると、そこにあるように見えます。誰かが私が間違っているかもしれないことを知っているだろうか?
Javaジャージーコード
String url = "http://support.mydomain.co/remoteapi/mydomain/index.php";
WebResource webResource = client.resource(url);
webResource.queryParam("action", Constant.CREATE_TICKET.name());
Company company = companyDAO.findCompanyById(1);
client.addFilter(new LoggingFilter(System.out));
ClientResponse response = webResource.accept("application/json")
.entity(company, MediaType.APPLICATION_JSON)
.post(ClientResponse.class);
if (response.getStatus() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ response.getStatus());
}
String output = response.getEntity(String.class);
ヘッダ
1 * Client out-bound request
1 > POST http://support.mydomain.co/remoteapi/mydomain/index.php?action=CREATE_TICKET
1 > Accept: application/json
1 > Content-Type: application/json
{"name":"Test Company","phones":[],"street1":null,"street2":null,"city":null,"stateName":{"name":"Florida"},"companyCategory":{"name":"hotel"},"zip":"12095","accountNumber":"00000002"}
1 * Client in-bound response
1 < 200
1 < Date: Wed, 13 Mar 2013 22:51:06 GMT
1 < Transfer-Encoding: chunked
1 < Keep-Alive: timeout=5, max=100
1 < Connection: Keep-Alive
1 < Content-Type: application/json
1 < Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6.3 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
1 < X-Powered-By: PHP/5.3.17
1 <
PHP
print_r($_REQUEST);