Hi Jouni,
Sorry for the late reply!
See
http://svn.apache.org/viewcvs.cgi/incubator/muse/branches/v0.5/src/site/content/tutorial/disk/requests/query.soap?rev=157124&view=markup
for an example of a QueryRPs request.
At a glance, your code for building up the request looks ok. The problem
could be that the server is expectiong the XPath to not be wrapped in an
element, i.e.:
<wsrp:QueryExpression
dialect=".../REC-xpath-19991116">*</wsrp:QueryExpression>
as opposed to:
<wsrp:QueryExpression
dialect=".../REC-xpath-19991116"><my:XPath>*</my:XPath></wsrp:QueryExpression>
Unfortanately, I'm not sure if the Axis-generated QueryExpressionType will
allow you to directly add a text node (i.e. set_any takes a
MessageElement , not a NodeIml).
I'd highly recommend that you upgrade to Muse 1.0, which implements MUWS
1.0 and is being actively developed. We just released a beta last week
[1]. Besides implementing MUWS 1.0 (which is now an official OASIS
standard), it provides more features and better error messages. For
example, if you send a request that is schema-invalid, the server will
return a SOAP fault that describes exactly what part(s) of the request are
not valid and why. If you do upgrade, we can point you at some good
examples of building up requests programmatically using XmlBeans-generated
types.
Good luck and let us know if you have any problems.
Regards,
Ian
[1] http://cvs.apache.org/dist/incubator/muse/1.0-beta/
[EMAIL PROTECTED] wrote:
Hi!
I'm developing a simple wsdm application with muse-0.5 for my Msc
thesis. I've ran into problems with creating a
QueryResourcePropertiesRequest to my wsdm application. How exactly i am
supposed to build the request object?
This is the code snipped that i'm trying to get to work:
--------------------
QueryResourcePropertiesRequest request = new
QueryResourcePropertiesRequest();
QueryExpressionType query = new QueryExpressionType();
MessageElement[] queryString = new MessageElement[1];
queryString[0] = new MessageElement();
queryString[0].addTextNode("*");
query.setDialect(new URI("http://www.w3.org/TR/1999/REC-xpath-19991116"));
query.set_any(queryString);
request.setQueryExpression(query);
Object response = getService().queryResourceProperties(request);
-----------------------
getService() returns the service stub.
I couldn't find samples for queries in the tutorial. Thanks in advance
for your reply.
Jouni Renfors
Metso Automation
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]