Mega Web Service ---------------- Introduction: There are many tools, wizards and IDEs that can easily create a simple web service. They allow one to flip a flag, click few buttons and within few sec come up with the best hello world web service ever. In this approach the complexity in creating a web service is hidden behind the tools and this makes creating a simple webservice quite easy. There is a down side to this approach though. When the web service is complex (depends on other components/resources, need to support fixed schema/wsdl, needs iterative development, custom XML serialization, custom packaging, etc), the auto-magic tools simply cant do the job, because they hide too much from the user. In short, tools that simplify web service development also restrict one to write simple web services. So Mega web service example takes a different approach. It shows how to write a complex web service application. How to build: - setup env - cd to examples\mega directory - edit build.xml to set the application directory for WLS - type: ant How to run: - cd to examples\mega\client directory - edit build.xml file to set the host name and port - type: ant run List of features used by Mega Web Service and where to find them in the source code: Writing Web Service for an existing WSDL. - examples\mega\simple Web Service using EJB as backend Component - examples\mega\ejb Web Service using Java class as backend component - examples\mega\basic Generating Java value objects and codecs from schema/wsdl - examples\mega\simple\build.xml Makeing a web service method one-way - examples\mega\basic\MegaService.oneWayCall() Not exposing a public method - examples\mega\basic\MegaService.dontExposeThisMethod() Makeing a web service method one-way - examples\mega\basic\MegaService.oneWayCall() Overloaded method - examples\mega\basic\MegaService.overloadedMethod() SOAP Headers - examples\mega\basic\MegaService.methodWithHeaders() SOAP Attachments - examples\mega\basic\MegaService.methodWithAttachments() SOAP Fault - examples\mega\basic\MegaService.methodThrowingRuntimeException() - examples\mega\basic\MegaService.methodThrowingSoapFault() - examples\mega\basic\MegaService.methodThrowingCustomException() IN-OUT parameters - examples\mega\basic\MegaService.primitiveInOut() OUT parameters - examples\mega\basic\MegaService.primitiveOut() Server side Handler chain - examples\mega\basic\MegaService.methodWithHandlerChain() Invoke external web service - examples\mega\basic\MegaService.sayHiToExternalService() Stub client to invoke web service - examples\mega\client Browse WSDL using Call API extensions - examples\mega\client\BrowserClient Dynamic client with wsdl - examples\mega\client\DynamicClient TO DO: - add resources files to the war file - security - RM - async - soap 1.2 - jms transport - add security constraints in web.xml - add security constraints for ejbs - SSL - Dyn client without wsdl - custom ser/deser - WebServiceContext - implicit headers - new schema features