Hi Pradeep, thanks for replying.
I have read about pojo deployment, and I understand what you are saying. My
problem is, that I find the literature on this matter, inconsistent.
For example, articles describing the deployment of pojo, mention to place it in
the pojo directory and if the pojo is under a package modify axis2.xml to have
<deployer extension=".jar" directory="pojo"
class="org.apache.axis2.deployment.POJODeployer"/>
None of the articles though, mentions the need for a services.xml
Indeed the pojo in this way is deployed, but when I tried to see the WSDL I get
in the browser:
<description>Unable to generate WSDL 1.1 for this service</description>
<reason>
If you wish Axis2 to automatically generate the WSDL 1.1, then please set
useOriginalwsdl as false in your services.xml
</reason>
So it seems to me, that although, not mentioned, a services.xml is needed in
the
pojo deployment as well and not only if you deploy the WS as .aar. Otherwise
the
error message is misleading and also how can I see the WSDL in this case????
This behavior is consistent though with
http://axis.apache.org/axis2/java/core/docs/pojoguide.html which for some
reason
Deepal, says it is outdated.
Additionally, if I want to have custom deployers or group my pojos under a
single directory, I can do it like it is mentioned in the article you reffed me
to.
But if I simply dropped the jar in WEB-INF/lib, is this not a valid method? The
pojo would be in axis2 classpath right? So it would be deployed, right??
If you could help me understand the internals on this (than simply mechanically
do it) would be great!
Thank you!
________________________________
From: Pradeep Fernando <[email protected]>
To: [email protected]
Sent: Fri, January 28, 2011 12:14:58 PM
Subject: Re: Axis2 deployment mechanism for POJOs
hi
comments inline,
On Thu, Jan 27, 2011 at 1:17 PM, am am <[email protected]> wrote:
> Hi Deepal thanks for reply:
>>Only at the starting time or does it work runtime as well?
> What do you mean? If the clients can use the service? I can see the wsdl and
> I tried a service call and it works.
> Also is a services.xml needed for pojos?
> Now that I think about it, I guess it makes sense. The jar containing the
> pojo, since it is in lib it is in the classpath of axis2 and so axis2 can
> find it to initialize it. Right? Is this how it works???
hope you are already familiar with a the deployment architecture of
axis2. if not refer [1]
the pojoDeployer is responsible for deploying the pojo classes. you
can define your own deployer to deploy a service. you will see set of
registered deployers in the axis2 xml. there we have define,
<deployer extension=".class" directory="pojo"
class="org.apache.axis2.deployment.POJODeployer"/>
so that any .class file put in to directory named pojo will be
deployed by the pojoDeployer.
[1] http://wso2.org/library/3708
--Pradeep
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]