RE: Problems in using TLS

2008-04-01 Thread Brendan Maguire (brmaguir)
Thanks for the reply Daniel.

I tried using the 2.0.5 libraries but am still getting the exact same
errors.

Am I setting it up correctly using the cxf.xml file? Any other ideas on
what the problem could be?

Cheers,
Brenan

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2008 18:38
To: cxf-user@incubator.apache.org
Cc: Brendan Maguire (brmaguir)
Subject: Re: Problems in using TLS


I don't suppose there would be any chance of you trying the 2.0.5 stuff
we're voting on?
http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/

I made some changes to the TLS stuff in 2.0.5 to make it work better and
with less configuration.

Dan



On Thursday 27 March 2008, brmaguir wrote:
 Hey,

 I'm trying to communicate with a web service using Apache CXF using 
 TLS. When I specify TLS in the cxf.xml file using:

 http-conf:tlsClientParameters 
 secureSocketProtocol=TLS sec:trustManagers
   sec:keyStore password=password
 url=file:\C:/path/to/keystore/ /sec:trustManagers
   sec:cipherSuitesFilter
   sec:include.*.*./sec:include
   /sec:cipherSuitesFilter
   /http-conf:tlsClientParameters

 it is failing with the following error:

 27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain
 doIntercept INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: Connection reset
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
s(AbstractOutDat abindingInterceptor.java:75)
   at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt
erceptor.java:68 )
   at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:207) at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
 org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135
) at $Proxy35.login(Unknown Source)
   at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
   at thirdPartyAPI.test.Test.main(Test.java:61)
 Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
   at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
s(AbstractOutDat abindingInterceptor.java:73)
   ... 9 more
 Caused by: java.net.SocketException: Connection reset
   at java.net.SocketInputStream.read(Unknown Source)
   at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown
Source)
   at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
 Source) at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unk
nown Source)
   at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
 Source)
   at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
 Source)
   at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
 Source) at
 sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(
Unknown Source)
   at
 sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
 Source)
   at
 sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unkn
own Source)
   at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHe
adersTrustCachin g(HTTPConduit.java:1766)
   at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstW
rite(HTTPConduit .java:1734)
   at
 org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOut
putStream.java:4 2)
   at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
   at
 com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
 ... 10 more
 Exception in thread main javax.xml.ws.soap.SOAPFaultException:
 Connection reset
   at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175
) at $Proxy35.login(Unknown Source)
   at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
   at thirdPartyAPI.test.Test.main(Test.java:61)
 Caused by: org.apache.cxf.interceptor.Fault: Connection reset
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
s(AbstractOutDat abindingInterceptor.java:75)
   at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt
erceptor.java:68 )
   at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:207) at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
 org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73

Re: Problems in using TLS

2008-04-01 Thread brmaguir


Thanks for the reply Daniel.

I tried using the 2.0.5 libraries but am still getting the exact same
errors.

Am I setting it up correctly using the cxf.xml file? Any other ideas on what
the problem could be?

Cheers,
Brenan


brmaguir wrote:
 
 Hey,
 
 I'm trying to communicate with a web service using Apache CXF using TLS.
 When I specify TLS in the cxf.xml file using:
 
 http-conf:tlsClientParameters secureSocketProtocol=TLS
   sec:trustManagers
   sec:keyStore password=password 
 url=file:\C:/path/to/keystore/
   /sec:trustManagers
   sec:cipherSuitesFilter
   sec:include.*.*./sec:include
   /sec:cipherSuitesFilter
   /http-conf:tlsClientParameters
 
 it is failing with the following error:
 
 27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain
 doIntercept
 INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: Connection reset
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
 abindingInterceptor.java:75)
   at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68
 )
   at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
   at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
   at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
   at $Proxy35.login(Unknown Source)
   at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
   at thirdPartyAPI.test.Test.main(Test.java:61)
 Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
   at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
 abindingInterceptor.java:73)
   ... 9 more
 Caused by: java.net.SocketException: Connection reset
   at java.net.SocketInputStream.read(Unknown Source)
   at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
   at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
   at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
 Source)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
 Source)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
 Source)
   at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
   at
 sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
 Source)
   at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
 Source)
   at
 sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown
 Source)
   at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCachin
 g(HTTPConduit.java:1766)
   at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit
 .java:1734)
   at
 org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:4
 2)
   at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
   at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
   at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
   ... 10 more
 Exception in thread main javax.xml.ws.soap.SOAPFaultException:
 Connection reset
   at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
   at $Proxy35.login(Unknown Source)
   at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
   at thirdPartyAPI.test.Test.main(Test.java:61)
 Caused by: org.apache.cxf.interceptor.Fault: Connection reset
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
 abindingInterceptor.java:75)
   at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68
 )
   at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
   at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
   at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
   ... 3 more
 Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
   at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
   at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
 abindingInterceptor.java:73)
   ... 9 more

Problems in using TLS

2008-03-27 Thread brmaguir

Hey,

I'm trying to communicate with a web service using Apache CXF using TLS.
When I specify TLS in the cxf.xml file using:

http-conf:tlsClientParameters secureSocketProtocol=TLS  
sec:trustManagers
sec:keyStore password=password 
url=file:\C:/path/to/keystore/
/sec:trustManagers
sec:cipherSuitesFilter
sec:include.*.*./sec:include
/sec:cipherSuitesFilter
/http-conf:tlsClientParameters

it is failing with the following error:

27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Connection reset
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
abindingInterceptor.java:75)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68
)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at $Proxy35.login(Unknown Source)
at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
at thirdPartyAPI.test.Test.main(Test.java:61)
Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
abindingInterceptor.java:73)
... 9 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
Source)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown
Source)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCachin
g(HTTPConduit.java:1766)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit
.java:1734)
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:4
2)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
... 10 more
Exception in thread main javax.xml.ws.soap.SOAPFaultException: Connection
reset
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
at $Proxy35.login(Unknown Source)
at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
at thirdPartyAPI.test.Test.main(Test.java:61)
Caused by: org.apache.cxf.interceptor.Fault: Connection reset
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
abindingInterceptor.java:75)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68
)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 3 more
Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat
abindingInterceptor.java:73)
... 9 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
at 

JAX-RS maturity

2008-01-23 Thread brmaguir

Hi,

I'm currently deciding on a REST framework to use for an upcoming project
and have been looking at a number of possibilities including CXF.

Just a few quick questions. How mature is the JAX-RS implementation? Will
there be a lot of changes in the near future? Have any of you had experience
with the Jersey implementation of the JSR311 standard, and if so how does it
compare to the CXF implementation?

At the moment I'm siding towards using JAX-RS via the CXF implementation
provided it is pretty stable.

Cheers.
-- 
View this message in context: 
http://www.nabble.com/JAX-RS-maturity-tp15039120p15039120.html
Sent from the cxf-user mailing list archive at Nabble.com.



@ProduceMime support

2008-01-23 Thread brmaguir

Hi,

Does CXF support the JSR311 @ProduceMime annotation fully? Here's the code:

import com.sun.ws.rest.api.ConsumeMime;
import com.sun.ws.rest.api.HttpMethod;
import com.sun.ws.rest.api.ProduceMime;
import com.sun.ws.rest.api.UriTemplate;

@UriTemplate(/sampleservlet)
public class SampleServlet {

@HttpMethod(PUT)
@ConsumeMime(text/plain)
@ProduceMime(application/xml)
public void getXML() {
System.out.println(### Handle PUT for sampleservlet: XML ###);
}

@HttpMethod(PUT)
@ConsumeMime(text/plain)
@ProduceMime(application/json)
public void getJSON() {
System.out.println(### Handle PUT for sampleservlet: JSON 
###);
}
}

When the client specifies the Accept parameter in the http header as
application/json or application/xml I would expect the corresponding method
to be called according to the @ProduceMime specified before the method. Is
this supported? It doesn't seem to be working as expected for me.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/%40ProduceMime-support-tp15043754p15043754.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: JAX-RS maturity

2008-01-23 Thread brmaguir

Okay. Thanks for the replies.
-- 
View this message in context: 
http://www.nabble.com/JAX-RS-maturity-tp15039120p15043875.html
Sent from the cxf-user mailing list archive at Nabble.com.