cancel
Showing results for 
Search instead for 
Did you mean: 

help needed for sending a query using webservice

pmarreddy
Champ in-the-making
Champ in-the-making
hi,

i am trying to send a query using repository webservice
like this

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:rep="http://www.alfresco.org/ws/service/repository/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
 
   <soap:Body>
      <rep:query>
   <store>
      <scheme>workspace</scheme>   
      <address>SimpleExampleWithContent</address>
   </store>
   <query>
      <language>lucene</language>
      <statement> @ques\\:mcquestion:c is a procedural language</statement>
   </query>
   <includeMetaData>false</includeMetaData>
   </rep:query>
   </soap:Body>
</soap:Envelope>

i m not getting any results, the same query i tries using serchservice i got 2 results. the store name is right , the only thing i am not sure about is about the query. do i need to send the header for query.

i have entered the content using eclipse environment and i am trying to get(search) it using webservices client through (tomacat). does this affect in any way.

am i getting this right or am i missing some thing.

if i want to debug webservices how do i do that, i cannot print to the screen, i think we have to do that to a log file, if we debug to the logfile wher is the log file saved.

adv thanks prasanth.
2 REPLIES 2

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

If you are happy that the store and query string are correct then the XML looks ok.

Are you using Java to connect to the web services? 

Perhaps you could share the code that executes the web service query?

You don't need the query header unless you want to batch the results from the query.

To get debug output from the server you need to update the log4j properties file with :


log4j.logger.org.alfresco.repo.webservice=debug

Hope this helps,
Roy

pmarreddy
Champ in-the-making
Champ in-the-making
yuo i got it there is a problem with my query it self, it is same as we using alfresco api.

thanks prasanth