This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Access Axis2 properties inside class that generates WebService server
posted 3 years ago
I'm using a Java class to build a WebService, using Axis2 and Eclipse. From Eclipse, Axis2 creates whole WebService project, including WSDL, then I use Eclipse to deploy the war file that I'll use in Tomcat.
But I need to access Axis2 properties from inside that class, including Rampart WS-Security and HTTP properties. Since that class is used to build WebService, it has no knowledge of Axis2, Servlet, etc, it's just a plain old Java class.
I know that I could build a WSDL myself and use it for Axis2 to create the class I'll use, and that class would be able to access Axis2 properties. But that makes WebService development more troubling, I'd need to mix code developed by me into Axis2 code, etc.
Is there a way to keep my class the starting point for the WebService, and still be able to access Axis2? maybe use annotation to define a special method in the class that would be extended by Axis2 and would return its properties :p