cxf客户端调用报空指针,求大神解决

逆风吃稀饭 发布于 2015/08/25 15:44
阅读 194
收藏 0

错误日志:

2015-08-25 15:21:41 ERROR [DefaultQuartzScheduler_Worker-4] org.apache.log4j.Logger.error(Logger.java:249) - java.lang.NullPointerException
ExceptionStackTrace: ---------------start------------------------
org.apache.cxf.jaxrs.client.AbstractClient.createMessage(AbstractClient.java:543)
org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:564)
org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:553)
org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:290)
org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:326)
com.asiainfo.sa.bace.util.WebserviceClient.callRESTService(WebserviceClient.java:72)

客户端实现代码:

client = WebClient.create(serviceUrl);
client.path(method).accept("application/xml");
retMsg = client.post(content, String.class);

serviceUrl,method,content参数没有问题

错误发生在 retMsg = client.post(content, String.class);

请大神帮忙看下,在线等,急~

加载中
返回顶部
顶部