Hi,
have a look here
http://cxf.apache.org/docs/secure-jax-rs-services.html#SecureJAX-RSServices-Configuringclients
Sergey
On 26/06/12 09:45, Himanshu Gupta wrote:
Try adding your server certificate (on which https is based) to the jdk
default keystore on the web client ... that is at /jre/lib/security/cacerts
... May be this works.
If yes, then you could use any keystore with this certificate to set it as
a default keystore using the -Djavax.net.ssl.*keyStore ...*
*
*
Cheers ..
On Tue, Jun 26, 2012 at 7:16 AM, kdesin<[email protected]> wrote:
Hi Sergey,
I have achieved my requirement using the WebClient API and with the inputs
from this forum.
Thanks for that.
Currently I am facing problem to post to a https URL.(Every thing works
fine
if I post to the same URL without the secure scheme..i.e without https)
Is there any additional config to be done for posting to secure scheme.
*Stack Trace:*
javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking
https://myURL/path: sun.security.validator.ValidatorException: No trusted
certificate found
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1457)
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1442)
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:795)
org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:743)
org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:717)
org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:262)
org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:271)
com.rest.test.MyClass.myMethod(MyClass.java:158)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Saludos
Kartheek
-----
Saludos
Kartheek
--
View this message in context:
http://cxf.547215.n5.nabble.com/XML-HTTP-without-SOAP-in-CXF-tp5710174p5710286.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com