axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Barrett <barre...@us.ibm.com>
Subject [Axis2] New DescriptionFactory method for server side
Date Wed, 28 Feb 2007 19:07:46 GMT
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: barrettj@us.ibm.com
----- Forwarded by Jeff Barrett/Austin/IBM on 02/28/2007 10:37 AM -----

Jeff Barrett/Austin/IBM@IBMUS 
02/23/2007 08:57 AM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org
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: barrettj@us.ibm.com



"Davanum Srinivas" <davanum@gmail.com> 
02/22/2007 05:33 PM
Please respond to
axis-dev@ws.apache.org


To
axis-dev@ws.apache.org
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 <barrettj@us.ibm.com> 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: barrettj@us.ibm.com
>
>
>
> "Davanum Srinivas" <davanum@gmail.com>
> 02/22/2007 03:21 PM
> Please respond to
> axis-dev@ws.apache.org
>
>
> To
> axis-dev@ws.apache.org
> 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 <barrettj@us.ibm.com> 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: barrettj@us.ibm.com
> >
> >
> >
> > Deepal Jayasinghe <deepal@opensource.lk>
> > 02/22/2007 02:11 AM
> > Please respond to
> > axis-dev@ws.apache.org
> >
> >
> > To
> > "axis-dev@ws.apache.org" <axis-dev@ws.apache.org>
> > 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: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services 
Developers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message