cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Stolzenberg" <h.stolzenb...@ewerk.com>
Subject [2.0.4] Service unit tests fail after upgrade from 2.0.2
Date Thu, 21 Feb 2008 12:43:54 GMT
We are using CXF for a shop backend. After we upgraded from 2.0.2 -> 2.0.4 the unit tests
(TestNG) for the CXF services all fail with the same exception like the one below:

FAILED: testSaveCustomer
javax.xml.ws.soap.SOAPFaultException: Could not send Message.
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
	at $Proxy78.saveCustomer(Unknown Source)
	at com.ewerk.shop.backend.wsapi.customer.CustomerServiceTest.testSaveCustomer(CustomerServiceTest.java:246)
Caused by: 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:208)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 24 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1863)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:157)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 29 more

The services STILL just work fine from the backend system (a webapp), only the tests fail.

----------------------------------------------------------------------------------------------------------------------------------------------------------

The unit test setup is the following:

Maven dependencies: cxf-rt-frontend-jaxws, cxf-rt-transports-http (2.0.4)

<SNIP Service interface>

	@WebService( name = "CustomerService" )
	public interface ICustomerService	
	{
		@WebMethod( operationName = "saveCustomer" )
		@WebResult( name = "saveCustomerResult" )
		public BackendServiceStatus saveCustomer( @WebParam( name = "auth" ) ServiceAuthentication
auth,
								 	@WebParam( name = "customer" ) Customer customer );
	}

</SNIP>


<SNIP CXF Server>

	JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean ();
	sf.setServiceClass( ICustomerService.class ); 
	sf.setServiceBean( getServiceImplementation() ); --> returns the service impl bean from
spring context ('CustomerServiceImpl')
	sf.setAddress( "http://localhost:8080/Shop_Backend/wsapi/CustomerService" );

	// additionally setup JAXB context

	Server server = sf.create();

</SNIP>

<SNIP CXF Client>

	JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
	factory.setServiceClass( ICustomerService.class );
	factory.setAddress( "http://localhost:8080/Shop_Backend/wsapi/CustomerService" );
	ICustomerService client = (ICustomerService)factory.create();

	// call service
	BackendServiceStatus status = customerServiceProxy.saveCustomer( auth, customer );

</SNIP>

<SNIP spring context>

	<bean id="CustomerServiceImpl" class="com.ewerk.shop.backend.wsapi.customer.CustomerServiceImpl"
/>
	<jaxws:server	id="CustomerService"
				serviceBean="#CustomerServiceImpl" 
				address="/CustomerService">
	</jaxws:server>
</SNIP>

----------------------------------------------------------------------------------------------------------------------------------------------------------

Any solution is really appreciated. Thanks in advance.

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:h.stolzenberg@ewerk.com
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 

Mime
View raw message