Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/346.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在camel cxf中命中Rest_Java_Rest_Apache Camel - Fatal编程技术网

Java 无法在camel cxf中命中Rest

Java 无法在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

我正在尝试使用camel cxfRs服务器创建rest服务,但是当我尝试使用soapUi时,它显示“请求的资源不可用”我的端点是“/customers/gold?active=true”,我也尝试了这个。 “CxfRsRouterTest/rest/customers/gold?active=true”。下面是cxfConfig.xml

<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;
    }