I gave this a try, but it results in a NullPoiinterException as described below:

On receipt of the asynchronous response, a NullPointerException is thrown from the following line:

RampartMessageData, line 221:

msgCtx.getServiceContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,
   this.servicePolicy);


this happens since serviceContext in the messageContext is null.

Here is a stack trace of sorts:

RampartMessageData(MessageContext, boolean) : 221
RampartEngine.process() : 38
RampartReceiver.invoke() : 71
Phase.invoke() 383
AxisEngine.invoke() : 203
AxisEngine.receive() : 131

Please let me know if you need more information about the problem I am encountering.

Thanks again for the help,

Mark

From: Dimuthu <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Using asynchronous messaging with Rampart (axis-users)
Date: Wed, 25 Jul 2007 09:44:55 +0530

Hi Mark,

In this situation the only option you have is to set the policy in the
Configuration context.

ConfigurationContext configCxt =
serviceClient.getServiceContext().getConfigurationContext();
configCxt.setProperty(RampartMessageData.KEY_RAMPART_POLICY,securityPolicy);

Regards,
Dimuthu.


On Tue, 2007-07-24 at 10:48 -0500, Mark H wrote:
> 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: axis-user@ws.apache.org
> >To: axis-user@ws.apache.org
> >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]
>


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


_________________________________________________________________
Need a brain boost? Recharge with a stimulating game. Play now!  http://club.live.com/home.aspx?icid=club_hotmailtextlink1


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

Reply via email to