Hi Beoh,

I also had a similar problem. This is what I could make out of it. Method getOption 
will only retrieve the parameter defined in your handler definition. It will not get 
the parameter value defined in the handler inside the service definition (the way you 
did). There are two work arounds:

1) If the parameter value is same for all your services, then move the parameter into 
your handler definition:
 <handler name="AuditTrailHandler" type="java:com.mycom.AuditTrailHandler">
    <parameter name="DIRECTORY" value="D:\\work\\components\\messages"/>
 </handler>

and your service wsdd would look like this:
<service name="AttachmentService" provider="java:RPC">
  <requestFlow>
   <handler type="AuditTrailHandler"/>
  </requestFlow>
  .
  .

2) If you want to pass different values for different services, then you would have to 
define your handler inside the service definition like this:

<service name="AttachmentService" provider="java:RPC">
  <requestFlow>
   <handler name="AuditTrailHandler" type="java:com.mycom.AuditTrailHandler">
    <parameter name="DIRECTORY" value="D:\\work\\components\\messages"/>
   </handler>
  </requestFlow>

I am not sure whether it is a bug or it is by design.

Sanjesh

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, July 04, 2003 4:09 AM
To: [EMAIL PROTECTED]
Subject: getOption returns Null in Handler


Hi,

I encountered a strange problem. I am not able to retrieve the parameter
from the delpoyed handler. In my handler code, it just returned me Null.
I have absolutely no idea what went wrong. Anyone has any clue ?

This is my deployed service,

<service name="AttachmentService" provider="java:RPC">
  <requestFlow>
   <handler type="AuditTrailHandler">
    <parameter name="DIRECTORY" value="D:\\work\\components\\messages"/>
   </handler>
  </requestFlow>
  <parameter name="allowedMethods" value="receiveAttachment
receiveEncryptedAttachment pullAttachment"/>
  <parameter name="className" value="ws.attachment.AttachmentService"/>
  <typeMapping
deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory
" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
qname="ns1:DataHandler"
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
type="java:javax.activation.DataHandler" xmlns:ns1="AttachmentService"/>
</service>

I am not able to retrieve parameter 'DIRECTORY' from in my
AuditTrailHandler code.


Thanks,
Beoh




**********************************************************************
This e-mail is the property of Enron Corp. and/or its relevant affiliate and may 
contain confidential and privileged material for the sole use of the intended 
recipient (s). Any review, use, distribution or disclosure by others is strictly 
prohibited. If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and 
delete all copies of the message. This e-mail (and any attachments hereto) are not 
intended to be an offer (or an acceptance) and do not create or evidence a binding and 
enforceable contract between Enron Corp. (or any of its affiliates) and the intended 
recipient or any other party, and may not be relied on by anyone as the basis of a 
contract by estoppel or otherwise. Thank you. 
**********************************************************************

Reply via email to