Odd ServiceValidationException in bsh script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd ServiceValidationException in bsh script

madppiper-2
Hey everyone.

I created a service of my own and tested it carefully within the webtools component, where no errors occured (only 1 parameter is needed for input). Unfortunately, when I try to run the very same service from within my bsh script, it generates the following ServiceValidationException:

Message: Type check failed for field [runSolrQuery.queryResult]; expected type is [org.apache.solr.common.SolrDocumentList]; actual type is [org.apache.solr.common.SolrDocumentList]Type check failed for field [runSolrQuery.queryHeader]; expected type is [org.apache.solr.common.util.SimpleOrderedMap]; actual type is [org.apache.solr.common.util.SimpleOrderedMap]



I thought that was very unusual, since the actual type matches the expected type...

Does anybody have an idea on what I am doing wrong?
The bsh script looks as the following:

[...]
String searchString = request.getParameter("SEARCH_STRING");
Map query = dispatcher.runSync("runSolrQuery",UtilMisc.toMap("query",searchString));
[...]


And the service requires the following parameters:
[...]
                <attribute mode="IN" name="query" optional="false"
                        type="String" />               
   <attribute name="queryResult" type="org.apache.solr.common.SolrDocumentList" mode="OUT" optional="true"/>
   <attribute name="queryHighlight" type="Map" mode="OUT" optional="true"/>
   <attribute name="queryDebugMap" type="org.apache.solr.common.SolrDocumentList" mode="OUT" optional="true"/>
   <attribute name="queryExplainMap" type="org.apache.solr.common.SolrDocumentList" mode="OUT" optional="true"/>
   <attribute name="queryFacetQuery" type="Map" mode="OUT" optional="true"/>
  <attribute name="queryElapsedTime" type="Long" mode="OUT" optional="true"/>
   <attribute name="queryQTime" type="Integer" mode="OUT" optional="true"/>
<attribute name="queryHeader" type="org.apache.solr.common.util.SimpleOrderedMap" mode="OUT" optional="true"/>
[...]
Reply | Threaded
Open this post in threaded view
|

Re: Odd ServiceValidationException in bsh script

madppiper-2
hmm,

I tried to trace this back a little further and hoped that perhaps I only missed out on placing the dependent libs into the ofbiz common lib directory, but the error remains...

Any thought would reaaaaally be appreciated. This entire affair doesn't make any sense to me. Why would the very same service run within the webtools component but not through the runsync command?!


Just upgraded to the latest trunk version btw...
Reply | Threaded
Open this post in threaded view
|

Re: Odd ServiceValidationException in bsh script

Adrian Crum
Try using standard Java interfaces in your service description instead
of concrete class names.

-Adrian

madppiper wrote:
> hmm,
>
> I tried to trace this back a little further and hoped that perhaps I only
> missed out on placing the dependent libs into the ofbiz common lib
> directory, but the error remains...
>
> Any thought would reaaaaally be appreciated. This entire affair doesn't make
> any sense to me. Why would the very same service run within the webtools
> component but not through the runsync command?!