Howdy All, I've just commited a new metadata DescriptionFactory method that takes a single annotated web service implementation class and returns a single ServiceDescription. Commited revision 512819.
The returned ServiceDescription will have an AxisService hierachy created and attached. Note that at this point, only annotations are used to create the descriptioni objects. If the service implementation contains a wsdlLocation reference, it is currently ignored. I will open a Jira to add support to the converter to try to create a WSDL Definition and set it on the DBC. So, from Dim's note below, here's how you would use this to get the ServiceDescription and AxisService: ServiceDescription svcDesc = DescriptionFactory.createService(MyServiceImpl.class); EndpointDescription[] edArray = svcDesc.get(0).getEndpointDescriptions(); AxisService myAxisService = ed[0].getAxisService(); configCtx.getAxisConfiguration().addService(myAxisService); Thanks, Jeff IBM Software Group - WebSphere Web Services Development Phone: 512-838-4587 or Tie Line 678-4587 Internet e-mail and Sametime ID: [EMAIL PROTECTED] ----- Forwarded by Jeff Barrett/Austin/IBM on 02/28/2007 10:37 AM ----- Jeff Barrett/Austin/[EMAIL PROTECTED] 02/23/2007 08:57 AM Please respond to [email protected] To [email protected] cc Subject Re: [Axis2] POJO annotation All, I'm adding the factory method described below and doing a little refactoring of the Factory class; should be done soon. Thanks, Jeff IBM Software Group - WebSphere Web Services Development Phone: 512-838-4587 or Tie Line 678-4587 Internet e-mail and Sametime ID: [EMAIL PROTECTED] "Davanum Srinivas" <[EMAIL PROTECTED]> 02/22/2007 05:33 PM Please respond to [email protected] To [email protected] cc Subject Re: [Axis2] POJO annotation Sounds good Jeff :) > For a simple environment, though, adding a method that takes a single > class and returns a single ServiceDescription is a good idea. Thanks, dims On 2/22/07, Jeff Barrett <[EMAIL PROTECTED]> wrote: > Hi Dims, > > Simple answer: Yes, that looks about right. > > Slightly Longer answer: Maybe there should be an additonal factory method > that takes just a single service impl class and does the DBC conversion > and returns a single ServiceDescription for the simple case. As you point > out, that would be very useful in testing and in simple environments. > > Even Slightly Longer answer: Yeah, that is a bit more code, isn't it? :-) > The DBC is there so that, in a server environment: > - We do not require all the classes be loaded at startup time and some > other high-performance byte scanning technology could be used to load the > annotations and create the DBCs. > - We can process multiple service implementations at one time, for example > an archive file that contained a bunch of web services could all be > processed from a single DBC hashmap. > For a simple environment, though, adding a method that takes a single > class and returns a single ServiceDescription is a good idea. > > Thanks, > Jeff > > IBM Software Group - WebSphere Web Services Development > Phone: 512-838-4587 or Tie Line 678-4587 > Internet e-mail and Sametime ID: [EMAIL PROTECTED] > > > > "Davanum Srinivas" <[EMAIL PROTECTED]> > 02/22/2007 03:21 PM > Please respond to > [email protected] > > > To > [email protected] > cc > > Subject > Re: [Axis2] POJO annotation > > > > > > > Jeff, > > So instead of calling > > ServiceDescription sd = > DescriptionFactory.createServiceDescriptionFromServiceImpl(myClazz, > myAxisService) > configCtx.getAxisConfiguration().addService(myAxisService); > > We should do the following? > JavaClassToDBCConverter converter = new JavaClassToDBCConverter(myClazz); > HashMap<String, DescriptionBuilderComposite> dbcMap = > converter.produceDBC(); > List<ServiceDescription> serviceDescList = > DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap); > EndpointDescription[] edArray = > serviceDescList.get(0).getEndpointDescriptions(); > AxisService service = ed[0].getAxisService(): > configCtx.getAxisConfiguration().addService(myAxisService); > > In other words, how do we get a fully configured AxisService from a > given class? :) > > thanks, > dims > > On 2/22/07, Jeff Barrett <[EMAIL PROTECTED]> wrote: > > Hi Deepal, > > > > You may not have seen it yet, but I replied yesterday to your note on > not > > getting the AxisOperations when you used the metadata layer. I believe > > that had to do with which DescriptionFactory method you were using. I'm > > just about to commit updates to the javadoc in that class and tagging > the > > method you were using as deprecated. Sorry the javadoc wasn't better in > > there to begin with! > > > > The metadata module will build up the full AxisService description > > hierachy given just annotations (no WSDL), or annotations and WSDL. > > Currently the metadata layer does NOT generate the correct schema if > > there's no WSDL; that is something it should probably do. > > > > Other than that, if the POJODeployer were to create a > > DescriptionBuilderComposite (using the JavaReflection to DBC converter > in > > the metadata package, at least for now), it should be able to use the > > metadata layer for both the WSDL-provided and > no-WSDL-provided/annotations > > only case. > > > > Thanks, > > Jeff > > > > IBM Software Group - WebSphere Web Services Development > > Phone: 512-838-4587 or Tie Line 678-4587 > > Internet e-mail and Sametime ID: [EMAIL PROTECTED] > > > > > > > > Deepal Jayasinghe <[EMAIL PROTECTED]> > > 02/22/2007 02:11 AM > > Please respond to > > [email protected] > > > > > > To > > "[email protected]" <[email protected]> > > cc > > > > Subject > > [Axis2] POJO annotation > > > > > > > > > > > > > > Hi all; > > > > As I mentioned before last few days I was working on POJO annotation > > support and there I was thinking to use matadata and jaxws module to > > have this feature. When I start implementing annotation support I found > > that the created AxisService from metadata module does not have any > > operation in it (though I have annotated the service impl class > > correctly). > > > > In the meantime I had a big issue in Java2WSDL support when annotation > > present in the POJO , the only option was to re-write or duplicate > > ScheamGenerator logic. And I realized that going to be a big code change > > so what I did was, use JAM (annogen) to have annotation support in > > SchemaGenerator. > > > > With the above I have implemented pojo annotation support in axis2. So I > > have written a Deployer called POJODeployer and you can deploy POJO as > > .class file and it will make that to an AxisService and will generate > > correct schema (so you will see the correct wsdl at the runtime). > > > > If the WebService has wsdllocation annotation then it will call metadata > > module to create AxisService (this path has few TODO items) > > > > please comment on my implementation , and I will commit the code you can > > go though that and find out if I have done something wrong. > > > > P.S:- Implementation is not completed yet need few more items to > complete. > > > > Thanks > > Deepal > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
