You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Jo...@proalpha.de on 2007/10/17 13:59:39 UTC
Hivemind can't find hivemodule.xml with Axis2
Hello!
I have a problem with Hivemind and Axis2.
Hivemind can't find the hivemodule.xml to configure my service.
I have a hivemind service bundled to a jar.
Then I made a POJO - Wrapper class and deployed this POJO as a web
service with Axis2.
The wrapper class is like this:
public class QueryLuceneIndex {
private IndexService idxService;
public QueryLuceneIndex() {
Registry registry =
RegistryBuilder.constructDefaultRegistry();
idxService = (IndexService)
registry.getService(IndexService.class);
}
/**
* Delegate to <em>queryLuceneIndex</em> in
*
<link>com.proalpha.java.util.lucene.services.IndexService</link>
* Must convert from Axis2-XML-Format to DOM.
* @param queryId
* @param xmlQuery
* @return Hits as a string in XML-Format
*/
public String queryLuceneIndex(String queryId, OMElement xmlQuery)
{
try {
Element elem = SAAJUtil.toDOM(xmlQuery);
return idxService.queryLuceneIndex(queryId,
elem.getOwnerDocument());
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
}
Axis2 is installed as a TomCat WebApp.
Directory structure on Tomcat is like this (not complete, just the
interesting directories):
Tomcat 5.5
Webapps
Axis2
Axis2-web
META-INF
WEB-INF
Services
Webservice.aar
Lib
Hivemind-service.jar
Hivemind-service.jar is my hivemind service.
Webservice.aar is the POJO exposed as web service.
Now I want to contribute some configurations to my hivemind service.
First thought was: put a hivemodule.xml either in META-INF or in WEB-INF
of the Axis web application.
This failed.
Putting the hivemodule.xml in META-INF in webservice.aar failed, too.
So: where do I have to put my hivemodule.xml?
Thank you for any advice!
Regards,
Jochen
AW: Hivemind can't find hivemodule.xml with Axis2
Posted by Jo...@proalpha.de.
Thank you, that works :-)
Regards,
Jochen
-----Ursprüngliche Nachricht-----
Von: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com] Im Auftrag von James Carman
Gesendet: Mittwoch, 17. Oktober 2007 14:38
An: user@hivemind.apache.org; Zimmermann, Jochen
Betreff: Re: Hivemind can't find hivemodule.xml with Axis2
Try putting it in WEB-INF/classes/META-INF.
On 10/17/07, Jochen.Zimmermann@proalpha.de
<Jo...@proalpha.de> wrote:
>
>
>
>
> Hello!
>
>
>
> I have a problem with Hivemind and Axis2.
>
> Hivemind can't find the hivemodule.xml to configure my service.
>
>
>
> I have a hivemind service bundled to a jar.
>
>
>
> Then I made a POJO - Wrapper class and deployed this POJO as a web service
> with Axis2.
>
> The wrapper class is like this:
>
>
>
> public class QueryLuceneIndex {
>
>
>
> private IndexService idxService;
>
>
>
> public QueryLuceneIndex() {
>
>
>
> Registry registry =
> RegistryBuilder.constructDefaultRegistry();
>
> idxService = (IndexService)
> registry.getService(IndexService.class);
>
> }
>
>
>
> /**
>
> * Delegate to <em>queryLuceneIndex</em> in
>
> *
> <link>com.proalpha.java.util.lucene.services.IndexService</link>
>
> * Must convert from Axis2-XML-Format to DOM.
>
> * @param queryId
>
> * @param xmlQuery
>
> * @return Hits as a string in XML-Format
>
> */
>
> public String queryLuceneIndex(String queryId, OMElement xmlQuery) {
>
>
>
> try {
>
> Element elem = SAAJUtil.toDOM(xmlQuery);
>
> return idxService.queryLuceneIndex(queryId,
> elem.getOwnerDocument());
>
> } catch (Exception e) {
>
> e.printStackTrace();
>
> }
>
>
>
> return "";
>
> }
>
>
>
> }
>
>
>
> Axis2 is installed as a TomCat WebApp.
>
>
>
> Directory structure on Tomcat is like this (not complete, just the
> interesting directories):
>
>
>
> Tomcat 5.5
>
> Webapps
>
> Axis2
>
> Axis2-web
>
> META-INF
>
> WEB-INF
>
> Services
>
> Webservice.aar
>
> Lib
>
> Hivemind-service.jar
>
>
>
> Hivemind-service.jar is my hivemind service.
>
> Webservice.aar is the POJO exposed as web service.
>
>
>
> Now I want to contribute some configurations to my hivemind service.
>
> First thought was: put a hivemodule.xml either in META-INF or in WEB-INF of
> the Axis web application.
>
>
>
> This failed.
>
> Putting the hivemodule.xml in META-INF in webservice.aar failed, too.
>
>
>
> So: where do I have to put my hivemodule.xml?
>
>
>
> Thank you for any advice!
>
>
>
> Regards,
>
> Jochen
>
>
>
>
Re: Hivemind can't find hivemodule.xml with Axis2
Posted by James Carman <ja...@carmanconsulting.com>.
Try putting it in WEB-INF/classes/META-INF.
On 10/17/07, Jochen.Zimmermann@proalpha.de
<Jo...@proalpha.de> wrote:
>
>
>
>
> Hello!
>
>
>
> I have a problem with Hivemind and Axis2.
>
> Hivemind can't find the hivemodule.xml to configure my service.
>
>
>
> I have a hivemind service bundled to a jar.
>
>
>
> Then I made a POJO – Wrapper class and deployed this POJO as a web service
> with Axis2.
>
> The wrapper class is like this:
>
>
>
> public class QueryLuceneIndex {
>
>
>
> private IndexService idxService;
>
>
>
> public QueryLuceneIndex() {
>
>
>
> Registry registry =
> RegistryBuilder.constructDefaultRegistry();
>
> idxService = (IndexService)
> registry.getService(IndexService.class);
>
> }
>
>
>
> /**
>
> * Delegate to <em>queryLuceneIndex</em> in
>
> *
> <link>com.proalpha.java.util.lucene.services.IndexService</link>
>
> * Must convert from Axis2-XML-Format to DOM.
>
> * @param queryId
>
> * @param xmlQuery
>
> * @return Hits as a string in XML-Format
>
> */
>
> public String queryLuceneIndex(String queryId, OMElement xmlQuery) {
>
>
>
> try {
>
> Element elem = SAAJUtil.toDOM(xmlQuery);
>
> return idxService.queryLuceneIndex(queryId,
> elem.getOwnerDocument());
>
> } catch (Exception e) {
>
> e.printStackTrace();
>
> }
>
>
>
> return "";
>
> }
>
>
>
> }
>
>
>
> Axis2 is installed as a TomCat WebApp.
>
>
>
> Directory structure on Tomcat is like this (not complete, just the
> interesting directories):
>
>
>
> Tomcat 5.5
>
> Webapps
>
> Axis2
>
> Axis2-web
>
> META-INF
>
> WEB-INF
>
> Services
>
> Webservice.aar
>
> Lib
>
> Hivemind-service.jar
>
>
>
> Hivemind-service.jar is my hivemind service.
>
> Webservice.aar is the POJO exposed as web service.
>
>
>
> Now I want to contribute some configurations to my hivemind service.
>
> First thought was: put a hivemodule.xml either in META-INF or in WEB-INF of
> the Axis web application.
>
>
>
> This failed.
>
> Putting the hivemodule.xml in META-INF in webservice.aar failed, too.
>
>
>
> So: where do I have to put my hivemodule.xml?
>
>
>
> Thank you for any advice!
>
>
>
> Regards,
>
> Jochen
>
>
>
>