axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Phelps <phelps_j...@yahoo.com>
Subject RE: MessageContext.setProperty() in a handler
Date Mon, 09 Aug 2004 13:29:40 GMT
I do have my client-config.wsdd configured and setup.  It looks like this:
 

<?xml version="1.0" encoding="UTF-8"?>

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<globalConfiguration>

....

<requestFlow>

<handler type="java:myClientHandler">

</handler>

</requestFlow>

<responseFlow>

<handler type="java:myClientHandler">

</handler>

</responseFlow>

</globalConfiguration>

<transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>

<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>

<transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>

</deployment>
I think maybe the cachedProperties on the Stub object never get updated after the call to
invoke()?
 
Jeff

egemen kalyoncu <egemenkalyoncu@hotmail.com> wrote:

Jeff it seems you didn't register your client side handlers in the 
client-config.wsdd.
article below can help you about handlers
http://www-106.ibm.com/developerworks/webservices/library/ws-devettk2.html


>From: Jeff Phelps 

>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: MessageContext.setProperty() in a handler
>Date: Mon, 9 Aug 2004 05:06:02 -0700 (PDT)
>
>I'm trying to set a custom property on the
>MessageContext in the response flow of a handler and
>have that be passed back to the client. But this
>doesn't seem to work. If the client calls
>getProperty() they get null or if they have already
>set the property they get the value they previously
>set.
>
>The handler code looks like this:
>
>public void invoke(MessageContext inContext)
>{
> ...
> inContext.setProperty("PropertyToSet",
>"valueToSendToClient");
> ....
>}
>
>On the client side (created from a WSDL):
>
>...
> Stub stubby = (Stub)vsl.getVersion();
> Version v = (Version)stubby;
>
> // the actual call is here
> System.out.println(v.getVersion());
>
> Object obj =
>stubby._getProperty("PropertyToSet");
> System.out.println("obj is: " + obj);
>...
>
>'obj' is null. It looks like the client code pulls
>the properties from an internal HashMap, but the
>HashMap never gets updated.
>
>Is it possible to send a property back to the client
>from a handler? Am I doing something wrong?
>
>Thanks,
>Jeff
>
>
>
>
>
>
>
>
>
>_______________________________
>Do you Yahoo!?
>Express yourself with Y! Messenger! Free. Download now.
>http://messenger.yahoo.com

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


		
---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
Mime
View raw message