On Fri, Apr 26, 2013 at 12:10 AM, Shameera Rathnayaka <
shameerai...@gmail.com> wrote:

> Hi devs,
>
> According to my inspection,
> There is no way to create a new instance from a class, which hasn't
> nullary constructor by an ObjectSupplier. see the getObject method
> declaration.
>
> Object getObject(Class clazz) throws AxisFault; This is an limitation.
>
> adding anothe abstact method getObject(Class clazz , Class[] parameters ,
> Object[] initargs) throw AxisFault; to ObjectSupplier would be the
> solution. DefaultObjectSupplier is the one and only concrete class of this
> interface.It will implement the logic.
>
> Other than that, If we see the services.xsd there is no way to define
> custom ObjectSuppliers in services.xml but in ServiceBuilder it check for
> ObjectSupplier in sevice discription this alway return null.
>
> String objectSupplierValue = (String) service
> .getParameterValue(TAG_OBJECT_SUPPLIER);
>
> we can define a new element for objectSupplier as last child of  service
> element to fix this.
>
> If everyone ok with this , i will open an issue and proceed with this.
>

I'm not sure whether we are having duplicate features here, usually we can
provide custom objects using "ServiceObjectSupplier" [1] parameter within
services.xml file. This is how we supported to Spring[2] and i used same
concept to support Guice [2] too. Cant we simply use ServiceObjectSupplier
in your requirement ?

[1] -
http://axis.apache.org/axis2/java/core/api/org/apache/axis2/ServiceObjectSupplier.html
[2] - http://axis.apache.org/axis2/java/core/docs/spring.html
[3] - http://ssagara.blogspot.de/2009/05/guice-axis2-integration.html

Thanks !

>
> Thanks,
> Shameera.
>
>
> --
> Best Regards,
> Shameera Rathnayaka.
>
> email: shameera AT apache.org , shameerainfo AT gmail.com
> Blog : http://shameerarathnayaka.blogspot.com/
>



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

Reply via email to