« Return to Thread: Notification fails in secure mode

Re: Notification fails in secure mode

by Chris Twiner :: Rate this Message:

Reply to Author | View in Thread

hiya,

Muse by default does not use httplient, but normal/simple urlconnections.

https://issues.apache.org/jira/browse/MUSE-223

Depending on your needs you can implement your own SoapClient and and
c+p your particular isolation layer (osgi, soapmini j2ee, axis2) to
supply an HttpClient based implementation.

cheers,
Chris

On Wed, Mar 18, 2009 at 8:49 PM, Satyavrat A. Prabhune
<satyavrat_prabhune@...> wrote:

> Hi,
>
> I am using Muse 2.2.0 for generating notifications.
>
> When consumer registers with "http" address for callback notification, notifications go through as expected.  But when consumer registers with "https" address, notification fails on server side with following message in muse.log:
>
> =======
> INFO: There was an error while processing a request:
>
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
>
>        org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
>        org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>        org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:99)
>        org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish(SimpleSubscriptionManager.java:267)
>        org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish(SimpleNotificationProducer.java:445)
>        org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish(SimpleNotificationProducer.java:420)
>        com.mycompany.api.impl.APINotificationProducer.publish(APINotificationProducer.java:171)
> =======
>
> I have registered my socket factory using following code:
>        Protocol myHttps = new Protocol("https", MyHttpsSocketFactory.getInstance(), 443);
>        Protocol.registerProtocol("https", myHttps);
>
> I tested secure call to tomcat on consumer machine using following code and it works as expected (so there is no issue with certificate and certificate store):
>        HttpClient httpclient = new HttpClient();
>        GetMethod httpget = new GetMethod("https://tsbu-ctmpc2:8443/");
>        try {
>            init(); // register socket factory.
>            httpclient.executeMethod(httpget);
>            System.out.println("responser=" + httpget.getStatusLine());
>        } catch(Exception ex) {
>            System.out.println(ex);
>            ex.printStackTrace();
>        } finally {
>            httpget.releaseConnection();
>        }
>
> Any pointers on how to resolve this?
>
> Thanks.
>
>
>
>

 « Return to Thread: Notification fails in secure mode