I recommend patching your own version of SimpleSoapClient its the
easiest solution. This would also allow you to use HttpClient
directly.
If you are using Muse within a war you can simply use the classes dir
to override the definition, just ensure you maintain binary
compatibility of the interfaces.
On Wed, Mar 18, 2009 at 11:04 PM, Satyavrat A. Prabhune
<
satyavrat_prabhune@...> wrote:
> Thanks for your response.
>
>
> So looks like I would have to do following:
> 1. Write MyResourceClient that will extend AbstractResourceClient. How does Muse know about MyResourceClient? How can I register it?
> 2. Use code in SimpleSoapClient similar to the one noted in patch (
https://issues.apache.org/jira/secure/attachment/12356606/muse-223-patch.txt). We are on Muse 2.2.0. But file noted in patch link is not available in 2..2.0.
>
> Thanks.
>
>
>
>
> ________________________________
> From: Chris Twiner <
chris.twiner@...>
> To:
muse-user@...
> Sent: Wednesday, March 18, 2009 1:01:16 PM
> Subject: Re: Notification fails in secure mode
>
> 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.
>>
>>
>>
>>
>
>
>
>