cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <ning.ji...@iona.com>
Subject Re: [U] RE: No Service found
Date Fri, 31 Aug 2007 07:14:54 GMT
Hi Frankie,

It just looks like there is no observer of  
"http://localhost/website2/ws/HelloWorld",
No I can't figure out the reason of this issue, the configuration is right.

Please check the below things:
1. Does your war name  be " website2.war "?
2. Can you tell the version number of the CXF that you used? I
3. How do you publish the service? Did you just do like the wiki said?


Willem.



 
FrankieHuang wrote:
> Hi Willem,
>
>    I got the "No service was found." at url
> "http://localhost/website2/ws/HelloWorld/services" and
> "http://localhost/website2/ws/services".
>    and I try to access this service via a client code, I got a "Fault":
> ---------------------------------------------------------------------------------------
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
> 	at $Proxy14.sayHi(Unknown Source)
> 	at test.ws.ClientTest.testSayHiWithSpringConfig(ClientTest.java:31)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
> 	at
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
> 	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
> 	at
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
> 	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
> 	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
> 	at
> org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
> 	at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
> 	at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
> 	at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
> 	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
> 	at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> 	at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.io.IOException: Not Found
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1781)
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 29 more
>
> -----------------------------------------------------------------------------------------------
>
>    and server side tomcat console a warnning:
> ----------------------------------------------------------------------------------------
> 2007-8-31 14:02:23 org.apache.cxf.transport.servlet.ServletController invoke
> WARN: Can't find the the request for
> http://localhost/website2/ws/HelloWorld's Observer
> ----------------------------------------------------------------------------------------
>
>    My client test code:
> ----------------------------------------------------------------------------------------
> package test.ws;
>
> import static org.junit.Assert.assertEquals;
>
> import org.junit.AfterClass;
> import org.junit.BeforeClass;
> import org.junit.Test;
> import org.springframework.context.support.ClassPathXmlApplicationContext;
>
> import com.hiany.accounts.ws.HelloWorld;
>   
> public final class ClientTest {   
>   
>     private static ClassPathXmlApplicationContext context;   
>   
>     @BeforeClass  
>     public static void beforeClass() {   
>         context = new ClassPathXmlApplicationContext(   
>                 new String[] { "client-beans.xml" });   
>     }   
>   
>     @AfterClass  
>     public static void afterClass() {   
>         context = null;   
>     }   
>   
>     @Test  
>     public void testSayHiWithSpringConfig() throws Exception {   
>         HelloWorld client = (HelloWorld) context.getBean("client");   
>   
>         String response = client.sayHi("Joe");   
>         assertEquals("Hello Joe", response);   
>     }
> } 
> -----------------------------------------------------------------------------------------------
>    
>    the client-beans.xml:
> ----------------------------------------------------------------------------------------------
> <beans xmlns="http://www.springframework.org/schema/beans"  
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>     xmlns:jaxws="http://cxf.apache.org/jaxws"  
>     xsi:schemaLocation="   
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd   
> http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">  
>   
>     <bean id="aegisBean"  
>         class="org.apache.cxf.aegis.databinding.AegisDatabinding" />  
>            
>     <bean id="serviceFactoryBean"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">  
>         <property name="dataBinding" ref="aegisBean" />  
>     </bean>  
>   
>     <bean id="client" class="com.hiany.accounts.ws.HelloWorld"  
>         factory-bean="clientFactory" factory-method="create" />  
>   
>     <bean id="clientFactory"  
>         class="org.apache.cxf.frontend.ClientProxyFactoryBean">  
>         <property name="serviceFactory" ref="serviceFactoryBean" />  
>         <property name="serviceClass"  
>             value="com.hiany.accounts.ws.HelloWorld" />  
>         <property name="address"  
>             value="http://localhost/website2/ws/HelloWorld" />  
>     </bean>  
>   
> </beans>
> ------------------------------------------------------------------------------------------------
>
>   Thanks again!
>   

Mime
View raw message