[owl-s] Working example with array as parameter
Demetris G
demetris at ece.neu.edu
Mon Oct 30 00:21:56 EST 2006
Hey Jakub,
returning back to this after a while - if this was a bug in the API
did you
file a bug report or did anyone ever decide to fix this in the API ? I
am sure
a lot of people would be interested in trusting transformations in grounding
and not running into a month long project like you had the unfortunate luck
to do. Any leads in how this can be fixed ?
Thanks
Jakub Moskal wrote:
>Hi,
>
>I finally managed to solve my problem where I wanted to ground OWL-S
>service to a WSDL service which used string arrays in one of it's
>operations as the input parameters. Below I post the crucial parts of
>the code, maybe someone will find this helpful in future. Notice in
>the xsltTransformationString the "<anything>" node - I believe it's a
>bug in the API. This node can be named anyhow, but is necessary to
>create the proper SOAP message. This one line is bascially what took
>me so long to solve my problem. Also, make sure that the "j.0"
>namespace points to the OWL document which defines the OWL class that
>is your input parameter.
>
>Jakub.
>
>WSDL
>-----------
>[Schema, array defined]
><element name="getCurrent">
> <complexType>
> <sequence>
> <element maxOccurs="unbounded" name="categories" type="xsd:string"/>
> </sequence>
> </complexType>
></element>
>
>[Message]
><wsdl:message name="getCurrentRequest">
> <wsdl:part element="impl:getCurrent" name="parameters"/>
></wsdl:message>
>
>[Operation]
><wsdl:operation name="getCurrent">
> <wsdl:input message="impl:getCurrentRequest" name="getCurrentRequest"/>
> <wsdl:output message="impl:getCurrentResponse" name="getCurrentResponse"/>
></wsdl:operation>
>
>
>OWL (class which is the Input in OWL-S)
>-------------------------------------------------------------
><owl:Class rdf:ID="Order"/>
><owl:DatatypeProperty rdf:ID="Category">
> <rdfs:domain rdf:resource="#Order"/>
> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
></owl:DatatypeProperty>
>
>
>OWL-S xsltTransformationString
>-----------------------------------------------
><grounding:xsltTransformationString>
> <![CDATA[
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:j.0="http://localhost:8888/Provider/owl/Provider.owl#">
> <xsl:template match="//j.0:Order">
> <anything>
> <xsl:for-each select="j.0:Category">
> <categories><xsl:value-of select="."/></categories>
> </xsl:for-each>
> </anything>
> </xsl:template>
> </xsl:stylesheet>
> ]]>
></grounding:xsltTransformationString>
>_______________________________________________
>OWL-S mailing list
>OWL-S at lists.mindswap.org
>http://lists.mindswap.org/mailman/listinfo/owl-s
>
>
>
>
More information about the OWL-S
mailing list