users@glassfish.java.net

Re: WS: Logicalhandler setPayload doesn't work

From: Rama Pulavarthi <Rama.Pulavarthi_at_Sun.COM>
Date: Fri, 01 Feb 2008 10:19:16 -0800

How are you configuring the handlers? Is this handler invoked at all?
Is this handler configured for client or server?

It should have worked. Can you give more details about the binding etc

thanks,
Rama Pulavarthi
glassfish_at_javadesktop.org wrote:
> I have a LogicalHandler for my WS where I am trying to set the Message PayLoad as follows. But the setPayLoad method doesn't seem to have any impact. The original payload is being returned to the client. Am I doing anything wrong here?
>
> public boolean handleMessage(LogicalMessageContext context) {
> LogicalMessage msg = context.getMessage();
> Boolean outboundProperty = (Boolean)
> context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
>
> if (outboundProperty)
> {
> out.println("Outbound message:");
> LogicalMessage lm = context.getMessage();
> Source payload = lm.getPayload();
>
> Source pLoad = new StreamSource(new StringReader(_payLoad));
> lm.setPayload(pLoad);
>
> }
> else
> {
> out.println("Inbound message:");
> }
> return true;
> }
> [Message sent by forum member 'i_srini' (i_srini)]
>
> http://forums.java.net/jive/thread.jspa?messageID=257046
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>