Hi,
I am using axis 1.4 do develop web services. Is there any way to set
custom properties to stub while invoking the web service and retrieve
these values from MessageContext object with in the web service methods.
I am setting USERNAME_PROPERTY and PASSWORD_PROPERTY for authentication
at the web container ( Tomcat JNDI Relam ) layer. I want to set my own
properties along with these two.
TestServiceInterfaceService service = new
TestServiceInterfaceServiceLocator();
TestServiceInterface testService = service.getTestService();
javax.xml.rpc.Stub stub = (javax.xml.rpc.Stub) testService;
stub._setProperty(Stub.USERNAME_PROPERTY, "username");
stub._setProperty(Stub.PASSWORD_PROPERTY, "password");
stub._setProperty("CUSTOM_PROPERTY","value"); ( This is not working )
The following code is to retrieve the properties set
MessageContext context = MessageContext.getCurrentContext();
String user=context.getUsername();
String password = context.getPassword();
String value = context.getProperty("CUSTOM_PROPERTY"); ( This returns
null ).
Thanks in advance.
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com