Thanks, for the help Dimuthu, but this did not seem to solve the problem.

It seems that since the asynchronous response is being received on a separate thread, Axis does not have the original ServiceContext; it actually seems to build everything from the incoming message. It does not tell Rampart to process the security headers, so when it gets to the security headers and they are not processed, it fails.

Worse, as a result of the failure, Axis feels as though it should propagate this failure not by throwing an exception, but by sending an AxisFault on the connection. Since this happens on receipt of an asynchronous response to a request, noone is listening on the other end of the connection and this appears to happen silently (i.e. I see no notification through logs, etc. that the asynchronous response was received and failed).

Do you have any other insight?

Thanks for your help.

-Mark

From: Dimuthu <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: Using asynchronous messaging with Rampart (axis-users)
Date: Mon, 23 Jul 2007 12:18:38 +0530

Hi Mark,

options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
securityPolicy);

Replace the above with the following.

ServiceContext context = serviceClient.getServiceContext();
context.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
securityPolicy);

Regards,
Dimuthu

On Wed, 2007-07-18 at 18:11 -0500, Mark H wrote:
> Hi,
>
> Sent originally to incorrect mailing list, sorry....
>
> I have a question concerning the use of Rampart while using asynchronous
> messaging in Axis 2 (version 1.2). In short, I am having problems on the
> client side when the client receives the asynchronous response from the
> service, in that the response is secured (which is what is needed), but the
> client does not appear to be configured to receive secured messages.
>
> The service gets the secured request, processes, and send the response back
> secured asynchronously.  However, Rampart appears to believe that the
> listener is not configured and does not process the Security header of the
> SOAP message, causing Axis to throw an AxisFault when it reaches a
> mustUnderstand on the Security header that has not been processed by
> Rampart.
>
> I am using my own ListenerManager set on the ServiceClient so that I can
> control the port on which the client listens.  Below is the async client
> invocation of the service (the service works fine when invoked
> synchronously):
>
> Options options = new Options();
> ConfigurationContext configCntxt =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
> null);
> ListenerManager lm = new ListenerManager();
> lm.init(configCntxt);
> TransportInDescription listener = new SimpleHTTPServer(configCntxt, 11196);
> td.setReceiver(listener);
> lm.addListener(td, false);
> options.setListener(listener);
> options.setTransportIn(td);
> options.setUseSeparateListener(true);
> options.setTo(new EndPointReference(endPoint));
> options.setAction(action);
>
> options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, securityPolicy);
> ServiceClient client = new ServiceClient(configCntxt, null);
> client.engageModule(ADDRESSING);
> client.engageModule(SECURITY);
> client.setOptions(options);
>
> client.sendReceiveNonBlocking();
>
>
> Is there something that I have not configured properly? I am not sure how > the client's listener is expected to handle security policy. Any help would
> be appreciated.
>
> Thanks,
>
> Mark
>
> _________________________________________________________________
> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
http://liveearth.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to