You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Valerio Schiavoni <va...@gmail.com> on 2007/09/21 14:04:45 UTC

cannot reach webservice (SimplefrontEnd related ?)

Hello everyone,
i'm a newbie of CXF and webservices in general, so sorry if my
question is somehow dumb.

I create a webservice using the SimpleFrontEnd. Once
wsServerFactoryBean.create() method is invoked, the corresponding wsdl
is made available at the expected address.

Also, i see this output :

21-set-2007 13.42.55
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Refreshing
org.apache.cxf.bus.spring.BusApplicationContext@e3043b: display name
[org.apache.cxf.bus.spring.BusApplicationContext@e3043b]; startup date
[Fri Sep 21 13:42:55 CEST 2007]; root of context hierarchy
21-set-2007 13.42.55 org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
INFO: Could not find the configuration file cxf.xml on the classpath.
21-set-2007 13.42.55
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf.xml]
21-set-2007 13.42.55
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf-extension-soap.xml]
21-set-2007 13.42.55
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf-extension-xml.xml]
21-set-2007 13.42.56
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf-extension-http-jetty.xml]
21-set-2007 13.42.56
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource
[META-INF/cxf/cxf-extension-http.xml]
21-set-2007 13.42.56
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Bean factory for application context
[org.apache.cxf.bus.spring.BusApplicationContext@e3043b]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@652020
21-set-2007 13.42.56
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example:
not eligible for auto-proxying)
21-set-2007 13.42.56
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'cxf' is not eligible for getting processed by all
BeanPostProcessors (for example: not eligible for auto-proxying)
21-set-2007 13.42.56
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is
not eligible for getting processed by all BeanPostProcessors (for
example: not eligible for auto-proxying)
21-set-2007 13.42.56
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@652020:
defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder];
root of factory hierarchy
21-set-2007 13.42.57
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://connectors.bf.fractal.objectweb.org/}Service from class
org.objectweb.fractal.bf.connectors.Service
21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log)
via org.mortbay.log.Slf4jLog
21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: jetty-6.1.3
21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Started SelectChannelConnector @ 0.0.0.0:8080

Opening a browser at http://localhost:8080/Service?wsdl permits to see
the WSDL as expected.

Then, with the followin code for the client:
<code>
 ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
     factory.setServiceClass( Service.class);
     factory.setAddress("http://localhost:8080/Service");
     Service client = (Service) factory.create();
     client.print();
</code>

I get this stacktrace:
INFO: Interceptor has thrown exception, unwinding now
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.endpoint.ClientImpl.invoke(ClientImpl.java:179)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:199)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:185)
	at org.objectweb.fractal.bf.connectors.ws.WsConnectorTest.testCreateAndRunSkel(WsConnectorTest.java:60)
	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:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	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.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:939)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1772)
	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)
	... 23 more

Where the problem could come from ?

Thanks a lot,
Valerio

-- 
http://valerioschiavoni.blogspot.com
http://jroller.com/vschiavoni

Re: cannot reach webservice (SimplefrontEnd related ?)

Posted by Valerio Schiavoni <va...@gmail.com>.
Hello Ning, thanks for your reply

On 9/22/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
> You need to set the factory with the address that you got from the wsdl (http://localhost:8080/Service?wsdl).
> It must be something like this "http://localhost:8080/Service/***"

the solution you proposed actually works (with 2 * instead of 3).

 But I dont understand why. The WSDL reports:

 <soap:address location="http://localhost:8080/Service"/>

Is this a WSDL specific issue, which I might solve simply by reading a
bit more about WS ?

Follows the full WSDL, in case

<?xml version="1.0" encoding="utf-8"?><wsdl:definitions
xmlns:ns1="http://connectors.bf.fractal.objectweb.org/"
xmlns:ns2="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Service"
targetNamespace="http://connectors.bf.fractal.objectweb.org/">
  <wsdl:types>
<xsd:schema xmlns="http://connectors.bf.fractal.objectweb.org/"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://connectors.bf.fractal.objectweb.org/">
<xsd:element name="printAndAnswer" type="printAndAnswer"/>
<xsd:complexType name="printAndAnswer">
<xsd:sequence/>
</xsd:complexType>
<xsd:element name="printAndAnswerResponse" type="printAndAnswerResponse"/>
<xsd:complexType name="printAndAnswerResponse">
<xsd:sequence>
<xsd:element minOccurs="0" name="return" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="print" type="print"/>
<xsd:complexType name="print">
<xsd:sequence/>
</xsd:complexType>
<xsd:element name="printResponse" type="printResponse"/>
<xsd:complexType name="printResponse">
<xsd:sequence/>
</xsd:complexType>
</xsd:schema>
  </wsdl:types>
  <wsdl:message name="printAndAnswerResponse">
    <wsdl:part element="ns1:printAndAnswerResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="print">
    <wsdl:part element="ns1:print" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="printResponse">
    <wsdl:part element="ns1:printResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="printAndAnswer">
    <wsdl:part element="ns1:printAndAnswer" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ServicePortType">
    <wsdl:operation name="printAndAnswer">
      <wsdl:input message="ns1:printAndAnswer" name="printAndAnswer">
    </wsdl:input>
      <wsdl:output message="ns1:printAndAnswerResponse"
name="printAndAnswerResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="print">
      <wsdl:input message="ns1:print" name="print">
    </wsdl:input>
      <wsdl:output message="ns1:printResponse" name="printResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoapBinding" type="ns1:ServicePortType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="printAndAnswer">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="printAndAnswer">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="printAndAnswerResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="print">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="print">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="printResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port binding="ns1:ServiceSoapBinding" name="ServicePort">
      <soap:address location="http://localhost:8080/Service"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

-- 
http://valerioschiavoni.blogspot.com
http://jroller.com/vschiavoni

RE: cannot reach webservice (SimplefrontEnd related ?)

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi, 
You need to set the factory with the address that you got from the wsdl (http://localhost:8080/Service?wsdl).
It must be something like this "http://localhost:8080/Service/***" 

Willem.

-----Original Message-----
From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com]
Sent: Sat 9/22/2007 0:07
To: cxf-user@incubator.apache.org
Subject: Re: cannot reach webservice (SimplefrontEnd related ?)
 
A little update, to enforce that the web-service is actually up&running.
I wrote this simple groovy-based ws-client:

import groovy.net.soap.SoapClient
def proxy = new SoapClient("http://localhost:8080/Service?wsdl")
result = proxy.printAndAnswer()
print(result)

and everything goes pretty well..

On 9/21/07, Valerio Schiavoni <va...@gmail.com> wrote:
> Hello everyone,
> i'm a newbie of CXF and webservices in general, so sorry if my
> question is somehow dumb.
>
> I create a webservice using the SimpleFrontEnd. Once
> wsServerFactoryBean.create() method is invoked, the corresponding wsdl
> is made available at the expected address.
>
> Also, i see this output :
>
> 21-set-2007 13.42.55
> org.springframework.context.support.AbstractApplicationContext refresh
> INFO: Refreshing
> org.apache.cxf.bus.spring.BusApplicationContext@e3043b: display name
> [org.apache.cxf.bus.spring.BusApplicationContext@e3043b]; startup date
> [Fri Sep 21 13:42:55 CEST 2007]; root of context hierarchy
> 21-set-2007 13.42.55 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: Could not find the configuration file cxf.xml on the classpath.
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf.xml]
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml]
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-xml.xml]
> 21-set-2007 13.42.56
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-http-jetty.xml]
> 21-set-2007 13.42.56
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-http.xml]
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext refresh
> INFO: Bean factory for application context
> [org.apache.cxf.bus.spring.BusApplicationContext@e3043b]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@652020
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
> eligible for getting processed by all BeanPostProcessors (for example:
> not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'cxf' is not eligible for getting processed by all
> BeanPostProcessors (for example: not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is
> not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> preInstantiateSingletons
> INFO: Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@652020:
> defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder];
> root of factory hierarchy
> 21-set-2007 13.42.57
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service
> {http://connectors.bf.fractal.objectweb.org/}Service from class
> org.objectweb.fractal.bf.connectors.Service
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log)
> via org.mortbay.log.Slf4jLog
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: jetty-6.1.3
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: Started SelectChannelConnector @ 0.0.0.0:8080
>
> Opening a browser at http://localhost:8080/Service?wsdl permits to see
> the WSDL as expected.
>
> Then, with the followin code for the client:
> <code>
>  ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>      factory.setServiceClass( Service.class);
>      factory.setAddress("http://localhost:8080/Service");
>      Service client = (Service) factory.create();
>      client.print();
> </code>
>
> I get this stacktrace:
> INFO: Interceptor has thrown exception, unwinding now
> 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.endpoint.ClientImpl.invoke(ClientImpl.java:179)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:199)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:185)
>         at org.objectweb.fractal.bf.connectors.ws.WsConnectorTest.testCreateAndRunSkel(WsConnectorTest.java:60)
>         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:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>         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.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>         at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>         at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
>         at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:939)
>         at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1772)
>         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)
>         ... 23 more
>
> Where the problem could come from ?
>
> Thanks a lot,
> Valerio
>
>
> --
> http://valerioschiavoni.blogspot.com
> http://jroller.com/vschiavoni
>


-- 
http://valerioschiavoni.blogspot.com
http://jroller.com/vschiavoni


Re: cannot reach webservice (SimplefrontEnd related ?)

Posted by Valerio Schiavoni <va...@gmail.com>.
A little update, to enforce that the web-service is actually up&running.
I wrote this simple groovy-based ws-client:

import groovy.net.soap.SoapClient
def proxy = new SoapClient("http://localhost:8080/Service?wsdl")
result = proxy.printAndAnswer()
print(result)

and everything goes pretty well..

On 9/21/07, Valerio Schiavoni <va...@gmail.com> wrote:
> Hello everyone,
> i'm a newbie of CXF and webservices in general, so sorry if my
> question is somehow dumb.
>
> I create a webservice using the SimpleFrontEnd. Once
> wsServerFactoryBean.create() method is invoked, the corresponding wsdl
> is made available at the expected address.
>
> Also, i see this output :
>
> 21-set-2007 13.42.55
> org.springframework.context.support.AbstractApplicationContext refresh
> INFO: Refreshing
> org.apache.cxf.bus.spring.BusApplicationContext@e3043b: display name
> [org.apache.cxf.bus.spring.BusApplicationContext@e3043b]; startup date
> [Fri Sep 21 13:42:55 CEST 2007]; root of context hierarchy
> 21-set-2007 13.42.55 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: Could not find the configuration file cxf.xml on the classpath.
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf.xml]
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml]
> 21-set-2007 13.42.55
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-xml.xml]
> 21-set-2007 13.42.56
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-http-jetty.xml]
> 21-set-2007 13.42.56
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-http.xml]
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext refresh
> INFO: Bean factory for application context
> [org.apache.cxf.bus.spring.BusApplicationContext@e3043b]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@652020
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
> eligible for getting processed by all BeanPostProcessors (for example:
> not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'cxf' is not eligible for getting processed by all
> BeanPostProcessors (for example: not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
> postProcessAfterInitialization
> INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is
> not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
> 21-set-2007 13.42.56
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> preInstantiateSingletons
> INFO: Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@652020:
> defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder];
> root of factory hierarchy
> 21-set-2007 13.42.57
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service
> {http://connectors.bf.fractal.objectweb.org/}Service from class
> org.objectweb.fractal.bf.connectors.Service
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log)
> via org.mortbay.log.Slf4jLog
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: jetty-6.1.3
> 21-set-2007 13.42.58 sun.reflect.NativeMethodAccessorImpl invoke0
> INFO: Started SelectChannelConnector @ 0.0.0.0:8080
>
> Opening a browser at http://localhost:8080/Service?wsdl permits to see
> the WSDL as expected.
>
> Then, with the followin code for the client:
> <code>
>  ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>      factory.setServiceClass( Service.class);
>      factory.setAddress("http://localhost:8080/Service");
>      Service client = (Service) factory.create();
>      client.print();
> </code>
>
> I get this stacktrace:
> INFO: Interceptor has thrown exception, unwinding now
> 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.endpoint.ClientImpl.invoke(ClientImpl.java:179)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:199)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:185)
>         at org.objectweb.fractal.bf.connectors.ws.WsConnectorTest.testCreateAndRunSkel(WsConnectorTest.java:60)
>         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:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>         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.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>         at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>         at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
>         at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:939)
>         at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1772)
>         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)
>         ... 23 more
>
> Where the problem could come from ?
>
> Thanks a lot,
> Valerio
>
>
> --
> http://valerioschiavoni.blogspot.com
> http://jroller.com/vschiavoni
>


-- 
http://valerioschiavoni.blogspot.com
http://jroller.com/vschiavoni