Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 24580 invoked from network); 9 Aug 2004 13:30:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Aug 2004 13:30:10 -0000 Received: (qmail 35583 invoked by uid 500); 9 Aug 2004 13:29:45 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 35532 invoked by uid 500); 9 Aug 2004 13:29:44 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 35503 invoked by uid 99); 9 Aug 2004 13:29:44 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_20_30,HTML_MESSAGE X-Spam-Check-By: apache.org Received: from [216.155.196.127] (HELO web61203.mail.yahoo.com) (216.155.196.127) by apache.org (qpsmtpd/0.27.1) with SMTP; Mon, 09 Aug 2004 06:29:42 -0700 Message-ID: <20040809132940.91081.qmail@web61203.mail.yahoo.com> Received: from [65.242.116.80] by web61203.mail.yahoo.com via HTTP; Mon, 09 Aug 2004 06:29:40 PDT Date: Mon, 9 Aug 2004 06:29:40 -0700 (PDT) From: Jeff Phelps Subject: RE: MessageContext.setProperty() in a handler To: axis-user@ws.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1754108440-1092058180=:89661" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1754108440-1092058180=:89661 Content-Type: text/plain; charset=us-ascii I do have my client-config.wsdd configured and setup. It looks like this: .... I think maybe the cachedProperties on the Stub object never get updated after the call to invoke()? Jeff egemen kalyoncu 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. --0-1754108440-1092058180=:89661 Content-Type: text/html; charset=us-ascii
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. --0-1754108440-1092058180=:89661--