Java 无法在camel cxf中命中Rest
我正在尝试使用camel cxfRs服务器创建rest服务,但是当我尝试使用soapUi时,它显示“请求的资源不可用”我的端点是“/customers/gold?active=true”,我也尝试了这个。 “CxfRsRouterTest/rest/customers/gold?active=true”。下面是cxfConfig.xmlJava 无法在camel cxf中命中Rest,java,rest,apache-camel,Java,Rest,Apache Camel,我正在尝试使用camel cxfRs服务器创建rest服务,但是当我尝试使用soapUi时,它显示“请求的资源不可用”我的端点是“/customers/gold?active=true”,我也尝试了这个。 “CxfRsRouterTest/rest/customers/gold?active=true”。下面是cxfConfig.xml <jaxrs:server id="restService" address="http://localhost:8080/CxfRsRouterTes
<jaxrs:server id="restService"
address="http://localhost:8080/CxfRsRouterTest/rest" staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="customerService"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"></bean>
<bean id="customerService" class="com.infy.CustomerService"></bean>
<cxf:rsServer id="rsServer"
address="http://localhost:8080/CxfRsRouterTest/route"
serviceClass="com.infy.CustomerService"
loggingFeatureEnabled="true" loggingSizeLimit="20" >
<cxf:providers>
<ref bean="jsonProvider"/>
</cxf:providers>
</cxf:rsServer>
这是我的服务课
@POST@Path("/customer/{type}")
public Response newCustomer(Customer customer,@PathParam("type") String type,@QueryParam("active") @DefaultValue("true") boolean active){
return null;
}
响应是jxrs响应类
我正在使用Tomcat8进行部署。请帮我找出我在这方面的错误。我刚开始学习camel cxf
@POST@Path("/customer/{type}")
public Response newCustomer(Customer customer,@PathParam("type") String type,@QueryParam("active") @DefaultValue("true") boolean active){
return null;
}