Java cxf运行时异常未知客户端异常
我正在使用一个简单的mule流,它将springbean作为一个组件,并使用quartz端点定期执行它。我的cxf客户端和配置在我看来都很好,但由于某种原因,我在尝试发送请求时出现了异常 我的班级如下:Java cxf运行时异常未知客户端异常,java,mule,Java,Mule,我正在使用一个简单的mule流,它将springbean作为一个组件,并使用quartz端点定期执行它。我的cxf客户端和配置在我看来都很好,但由于某种原因,我在尝试发送请求时出现了异常 我的班级如下: @Component @DependsOn("restfulClient") public class Transmitter implements Callable{ private static final Logger logger = LoggerFactory.ge
@Component
@DependsOn("restfulClient")
public class Transmitter implements Callable{
private static final Logger logger =
LoggerFactory.getLogger(Transmitter.class);
@Autowired
private RestfulClient restfulClient;
public Object onCall(MuleEventContext eventContext) throws Exception {
logger.info("In Transmitter");
try {
String result = restfulClient.ping();
logger.info("Result: {}" , result);
} catch (Exception e){
logger.error("Exception in Transmitter" ,e);
}
return null;
}
}
我的客户:
@Produces({"text/plain"})
@Path("/subscription")
public interface RestfulClient {
@GET
@Path("/ping")
public String ping();
}
在applicationContext.xml中,我定义了cxf bean并启用了cxf日志记录:
<jaxrs:client id="restfulClient"
serviceClass="com.ws.RestfulClient"
address="${prop.restful.url}">
<jaxrs:features>
<cxf:logging/>
</jaxrs:features>
</jaxrs:client>
我发现了问题。问题在于
<jaxrs:features>
<cxf:logging/>
</jaxrs:features>
属于格式错误的架构的。。。老实说,我想知道为什么mule不给这样一个错误命名,而不是模糊的未知客户端异常
<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf
<!-- -->
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.mulesoft.org/schema/mule/cxf
http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd" >
最后一个链接未找到 嗨,你能分享你完整的mule flow xml吗?
<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf
<!-- -->
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.mulesoft.org/schema/mule/cxf
http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd" >