axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [Axis2] JSR181 and ServiceObjectSupplier
Date Mon, 26 Apr 2010 03:49:02 GMT
Hi Martin,

Guice code came from maven central, but should be the same as your link, yes.

org.apache.axis2.ServiceObjectSupplier is in axis2-1.5.1.jar, so from

My implementation of ServiceObjectSupplier is 
GuiceServiceObjectSupplier (attached).  We also need a web.xml and some 
glue classes for the guice/servlet integration (attached).  This 
approach is very similar to that at .

Finally, we add <parameter name="ServiceClass" 
        <parameter name="ServiceObjectSupplier" 
     to the services.xml (as per

Our service class com.example.Api can now use google injections.

So, my question is: In the case when I use jsr181 annotations, and 
deploy my annotated pojo, as at I don't 
have a services.xml.  How then can I tell axis2 to use my 

Hope you can now track what I'm trying to do - let me know if I've 
missed any details.



Quoting Martin Gainty <>:

> Hi Bruce
> experiencing difficulty tracking your guice injection effort
> did you get your Guice code here?
> can you provide the link for the jars or source which contain 
> ServiceObjectSupplier?
> thanks!
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede 
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. 
> Diese Nachricht dient lediglich dem Austausch von Informationen und 
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten 
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den 
> Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes 
> pas le destinataire prévu, nous te demandons avec bonté que pour 
> satisfaire informez l'expéditeur. N'importe quelle diffusion non 
> autorisée ou la copie de ceci est interdite. Ce message sert à 
> l'information seulement et n'aura pas n'importe quel effet légalement 
> obligatoire. Étant donné que les email peuvent facilement être sujets 
> à la manipulation, nous ne pouvons accepter aucune responsabilité 
> pour le contenu fourni.
>> Date: Sun, 25 Apr 2010 23:46:08 +0100
>> From:
>> To:
>> Subject: [Axis2] JSR181 and ServiceObjectSupplier
>> Hi,
>> I'm using axis2-1.5.1.  What is the JSR181 equivalent of the parameter
>> "ServiceObjectSupplier" in services.xml?  Is it sensible to write a
>> custom POJODeployer?
>> I'm trying to integrate Google Guice and Axis2 using JSR181 annotated
>> POJOs to define my web service.
>> a) I can make Guice inject dependencies into my services by adding the
>> parameter
>>   <parameter name="ServiceObjectSupplier" locked="false">
>> com.example.guiceintegration.GuiceServiceObjectSupplier
>>   </parameter>
>>        to my services.xml, where
>> com.example.guiceintegration.GuiceServiceObjectSupplier is an
>> implementation of org.apache.axis2.ServiceObjectSupplier which supplies
>> instances of the service object obtained from the Guice injector.
>> b) I can deploy JSR181 annotated POJOs by putting the .class in the
>> directory specified in <deployer extension=".class" directory="pojo"
>> class="org.apache.axis2.deployment.POJODeployer"/> in my axis2.xml
>> What is the best way to combine a) and b)?
>> Either
>> 1) Is there an annotation which does the job of the
>> ServiceObjectSupplier parameter?  I would like something like
>> @WebService(name="foo",
>> serviceobjectsupplier=GuiceServiceObjectSupplier.class).
>> or
>> 2) Can I achieve the effect I want by writing a custom POJODeployer?
>> I'm not very familiar with the axis2 codebase - is there a hook for
>> creating service objects?
>> might be good approaches.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> _________________________________________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from 
> your inbox.

View raw message