80,351
社区成员
发帖
与我相关
我的任务
分享
Encoding: GBK
Http-Method: POST
Content-Type: text/xml
Headers: {connection=[Keep-Alive], Content-Length=[12], content-type=[text/xml], host=[192.168.0.136:8080], user-agent=[Apache-HttpClient/UNAVAILABLE (java 1.4)]}
Payload: asdasdasdasd
六月 29, 2015 6:37:17 下午 org.apache.cxf.jaxrs.utils.JAXRSUtils findTargetMethod
警告: No operation matching request path "/hyt06/ivo/list/auction" is found, Relative Path: /auction, HTTP Method: POST, ContentType: text/xml, Accept: */*,. Please enable FINE/TRACE log level for more details.
六月 29, 2015 6:37:17 下午 org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
警告: WebApplicationException has been caught : no cause is available
六月 29, 2015 6:37:17 下午 org.apache.cxf.interceptor.LoggingOutInterceptor
信息: Outbound Message
---------------------------
ID: 7
Response-Code: 415
Content-Type: text/xml
Headers: {Date=[Mon, 29 Jun 2015 10:37:17 GMT], Content-Length=[0]}
@POST
@Path("/auction")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)
public String postanction(String str);
@Override
public String postanction(String str) {
String sssString = "abc";
return sssString;
}
String URL = "xxxxxxxxxx";
HttpPost httpPost = new HttpPost(URL);
httpPost.setHeader(HTTP.CONTENT_TYPE, "text/xml");
try {
List params2 = new ArrayList<String>();
params2.add("ssssss");
StringEntity entity = new StringEntity("asdasdasdasd", HTTP.UTF_8);
httpPost.setEntity(entity);
HttpResponse httpResponse = new DefaultHttpClient()
.execute(httpPost);
if (httpResponse.getStatusLine().getStatusCode() == 200) {
result = EntityUtils.toString(httpResponse.getEntity());
}
} catch (Exception e) {
e.printStackTrace();
}