Along these lines I have always wondered about the following: Every example I have seen related to SOAP or Axis either doesn't define a constructor or defines a constructor that does nothing. What are the reasons for this?
What about constructors that require parameters? I had a discussion with Rob Englander, author of Java and SOAP, that a class implementing request level scope requires a no parameter constructor. This is because of the way Java implements dynamic loading. Does this apply to session and application level scope as well? I have implemented an init method in my class which is always called before any other method. Is there a better approach? Neil -----Original Message----- From: Almeida, Timothy [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 11:06 AM To: '[EMAIL PROTECTED]' Subject: RE: Newbie requests help with developing service classes on Axis There's always the constructor... ;) I guess the absence of a notion like an init() method is a consequence of Axis not enforcing implementation of a specific interface [by your service handler] -- which is nice. Can you think of a reason why the constructor would not work for you as a place to do initialization? -----Original Message----- From: Milind Gadre [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 9:59 AM To: [EMAIL PROTECTED] Subject: Newbie requests help with developing service classes on Axis Hi, I am new to Axis and wanted to better understand the protocol for initializing the object that actually services the SOAP request? Example, in my deploy.wsdd file I have <service name="MyMsgService" style="message"> <parameter name="className" value="MyMsgServiceClass" /> <parameter name="allowedMethods" value="processRequest" /> </service> Just like with a Servlet, I would like to have some initialization control over an instance of MyMsgServiceClass. According to the samples.message.TestMsg class that ships with Axis, there is no initialization control. Example: we have the Servlet.init() method that allows the servlet object to be initialized before any methods are accessed. Is there a similar protocol for service handlers?? Regards... Milind Gadre VP Product Development ecPlatforms, Inc 901 Mariner's Island Blvd, Suite 565 San Mateo, CA 94404 C: 510.919.0596 E: [EMAIL PROTECTED]
