[owl-s] grounding:xsltTransformation

Juergen Zimmer jzimmer at inf.ed.ac.uk
Thu Mar 9 08:18:31 EST 2006


Hi,

Njål Arne Gjermundshaug wrote:

> Hi
>
> The way I've done it is to have the web services themselves return 
> RDF/XML strings directly (the wsdl file for these web services state 
> that they return Strings, while the OWL-S specification states that 
> the service returns an ontology class of some kind). 

This is exacly what I'm doing in my project. And I also had to fiddle
around with the WSDLOperation class to get what I wanted. Good to know
that I'm not the only one with that problem.
However, I still need XSLT transformations in case the RDF/XML returned 
by a service
contains two OWL individuals that I want to assign to two different 
OWL-S output
parameters. I had to use this trick because I simply couldn't get a Web 
Service with
more than one output running (and described in WSDL).

Cheers
    Juergen


Njål Arne Gjermundshaug wrote:

> Hi
>
> The way I've done it is to have the web services themselves return 
> RDF/XML strings directly (the wsdl file for these web services state 
> that they return Strings, while the OWL-S specification states that 
> the service returns an ontology class of some kind). Try this 
> http://win.telenor.gjermundshaug.no:8080/Genesis/Composer?wsdl and 
> you'll see what I mean. The corresponding OWL-S description can be 
> found at http://idi.ntnu.no/~njalarne/getUser.owl.
>
>
> Since the Web Service is making the RDF/XML directly, I don't have to 
> specify anything in the <grounding:xsltTransformation> tag in the 
> OWL-S description - the result of the service is already in RDF/XML 
> format.
>
>  I think this is much easier, than writing obscure transformations in 
> xslt, but if you're making an OWL-S description of a Web Service that 
> you haven't written yourself, you'll probably have to use the 
> <grounding:xsltTransformation>.
>
> But - If you are using OWL-S API to execute the service, there is a 
> small problem. OWL-S API replaces < > and " with &gt; &lt; &quot; - so 
> it is unable to parse the result.
>
>
> I omitted this problem by adding some lines of code to the end of the 
> processResult method of the WSDLOperation class (in the OWL-S API).
>
> //extracting escaped xml
> if(e.getChildElements().hasNext()){
> output.setValue(e.getChildElements().next());
> output.setTextValue(e.getChildElements().next().toString());
> }
>
>
>
> Cheers,
>
> Njål
>
>
>
>
> Andras Balogh wrote:
>
>> Hi Njal,
>>
>> Thank you for the reply. My web service returns no XML/RDF but a 
>> single String.
>> The settings for my service are:
>> rpcliteral, useonewayoperations, strict
>>
>> I thought it would be good for me if I have a simple String in my 
>> reply (actually all web services return a string value ) and I would 
>> need the OWL classes only for the matchmaking engine to be able to 
>> make a difference between the I/Os of the different services. Is it a 
>> bad idea? And do I neew a trafo in such a situation, also?
>>
>> Do you advise to have always XML in the reply and "parse" or rather 
>> transform the proper variable out from the reply?
>>
>> Is there some howto available how to realize such a wsdl-owls 
>> parameter (and owls-wsdl) trafo?
>>
>> Thank you,
>> Andras
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Njål Arne Gjermundshaug [mailto:njalarne at stud.ntnu.no]
>> Gesendet: Donnerstag, 9. März 2006 10:11
>> An: Andras Balogh
>> Betreff: Re: [owl-s] grounding:xsltTransformation
>>
>> Hi Andreas
>>
>> Do you have a web service that returns XML/RDF directly ? (Such as this
>> one - http://win.telenor.gjermundshaug.no:8080/Genesis/Composer?wsdl )
>>
>> When you use it with <xsd:string as datatype - are < > and " replaced
>> with &gt; &lt; &quot; ??
>>
>>
>> I had kind of the same problem, might be able to help you
>>
>>
>> Cheers,
>>
>> Njal Gjermundshaug
>> Norwegen
>>
>>
>>
>>
>>
>> Andras Balogh wrote:
>> >
>> > Hi!
>> >
>> > Does somebody have experience with <grounding:xsltTransformation tag
>> > in owl-s? I guessed out, that if I use OWL classes as return value I
>> > might need an xml transformation. Am I right? (Owl-s tab in protégé
>> > doesn't do it for me...)
>> >
>> > Is it possible to have a simple "identity-trafo" in this tag? (Because
>> > I use strings and I need to use classes only because of the
>> > matchmaking...).
>> >
>> > Is there any tool that would help me create that xslt trafo if it is
>> > necessary?
>> >
>> > I use mindswap´s WebService Composer and it gives the exception:
>> >
>> > Executing...- urn:owl-s-api:baseOntology[1:1]: {E301} Content is not
>> > allowed in prolog.
>> >
>> > com.hp.hpl.jena.rdf.arp.ParseException: {E301} Content is not allowed
>> > in prolog.
>> >
>> > at 
>> com.hp.hpl.jena.rdf.arp.XMLHandler.parseWarning(XMLHandler.java:221)
>> >
>> > If I use the service IOPs only with <xsd:string datatype, it's 
>> working.
>> >
>> > Thank you,
>> >
>> > Andras Balogh
>> >
>> > 
>> ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > OWL-S mailing list
>> > OWL-S at lists.mindswap.org
>> > http://lists.mindswap.org/mailman/listinfo/owl-s
>> >  
>>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>OWL-S mailing list
>OWL-S at lists.mindswap.org
>http://lists.mindswap.org/mailman/listinfo/owl-s
>  
>

-- 
Jürgen Zimmer
AG Siekmann
Fachbereich Informatik (FB 14)
Gebäude E 1.1; Raum 208                 Phone:  +49-(0)681-302-4163
Universität des Saarlandes              FAX:    +49-(0)681-302-5076
D-66041 Saarbrücken                     E-mail: jzimmer at ags.uni-sb.de
----------------------------------------------------------------



More information about the OWL-S mailing list