<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
  xmlns:service="http://www.daml.org/services/daml-s/0.7/Service.daml#"
  xmlns:process="http://www.daml.org/services/daml-s/0.7/Process.daml#"
  xmlns:profile="http://www.daml.org/services/daml-s/0.7/Profile.daml#"
  xmlns:grounding="http://www.daml.org/services/daml-s/0.7/Grounding.daml#"
  xmlns:fla="http://www.flacp.fujitsulabs.com/~mhgrove/services/FLACP-ServiceOnt.daml#"
  xmlns:profileHierarchy="http://www.mindswap.org/2002/services/MindswapProfileHierarchy.daml#"
  xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>

<!-- Service description -->

<service:Service rdf:ID="TemperatureServiceService">
  <service:presents rdf:resource="#TemperatureServiceProfile" />  
  <service:describedBy rdf:resource="#TemperatureServiceProcessModel" />  
  <service:supports rdf:resource="#TemperatureServiceGrounding" />
</service:Service>

<!-- Profile description -->

<profileHierarchy:WeatherService rdf:ID="TemperatureServiceProfile">       
  <service:isPresentedBy rdf:resource="#TemperatureServiceService"/>
  <profile:textDescription></profile:textDescription>
  <profile:serviceName>Get Temperature</profile:serviceName>

  <profile:input> 
    <profile:ParameterDescription rdf:ID="profileInput"> 
      <profile:parameterName>zipcode</profile:parameterName>
      <profile:restrictedTo rdf:resource="http://www.mindswap.org/2002/services/concepts.daml#ZipCode"/>
      <profile:refersTo rdf:resource="#processInput"/>
    </profile:ParameterDescription>
  </profile:input>
  
  <profile:output> 
    <profile:ParameterDescription rdf:ID="profileOutput"> 
      <profile:parameterName>return</profile:parameterName>
      <profile:restrictedTo rdf:resource="http://www.mindswap.org/2002/services/concepts.daml#Fahrenheit"/>
      <profile:refersTo rdf:resource="#processOutput"/>
    </profile:ParameterDescription>
  </profile:output>

</profileHierarchy:WeatherService>

<!-- Process Model description -->

<process:ProcessModel rdf:ID="TemperatureServiceProcessModel">
  <service:describes rdf:resource="#TemperatureServiceService" /> 
  <process:hasProcess rdf:resource="#TemperatureServiceProcess" /> 
</process:ProcessModel>

<daml:Class rdf:ID="TemperatureServiceProcess">
  <rdfs:subClassOf rdf:resource="http://www.daml.org/services/daml-s/0.7/Process.daml#AtomicProcess" /> 
  <rdfs:subClassOf>
    <daml:Restriction daml:cardinality="1">
      <daml:onProperty rdf:resource="#processInput" /> 
    </daml:Restriction>
  </rdfs:subClassOf>  
</daml:Class>

<rdf:Property rdf:ID="processInput">
  <rdfs:subPropertyOf rdf:resource="http://www.daml.org/services/daml-s/0.7/Process.daml#input" /> 
  <rdfs:domain rdf:resource="#TemperatureServiceProcess" /> 
  <rdfs:range rdf:resource="http://www.mindswap.org/2002/services/concepts.daml#ZipCode"/>
</rdf:Property>

<rdf:Property rdf:ID="processOutput">
  <rdfs:subPropertyOf rdf:resource="http://www.daml.org/services/daml-s/0.7/Process.daml#output" /> 
  <rdfs:domain rdf:resource="#TemperatureServiceProcess" /> 
  <rdfs:range rdf:resource="http://www.mindswap.org/2002/services/concepts.daml#Fahrenheit"/>
</rdf:Property>

<!-- Grounding description -->

<grounding:WsdlGrounding rdf:ID="TemperatureServiceGrounding">
  <service:supportedBy rdf:resource="#TemperatureServiceService" />
  <grounding:hasAtomicProcessGrounding rdf:resource="#TemperatureServiceProcessGrounding" /> 
</grounding:WsdlGrounding> 

<grounding:WsdlAtomicProcessGrounding rdf:ID="TemperatureServiceProcessGrounding"> 
  <grounding:damlsProcess rdf:resource="#TemperatureServiceProcess"/>
  <grounding:wsdlOperation rdf:resource="getTemp"/>

  <grounding:wsdlInputMessage rdf:resource="getTempRequest"/>
  <grounding:wsdlInputMessageParts rdf:parseType="Collection">
	<grounding:wsdlMessageMap>
      <grounding:damlsParameter rdf:resource="#processInput"/>
      <grounding:wsdlMessagePart rdf:resource="zipcode"/>

    </grounding:wsdlMessageMap>
  </grounding:wsdlInputMessageParts>

  <grounding:wsdlOutputMessage rdf:resource="getTempResponse"/>
  <grounding:wsdlOutputMessageParts rdf:parseType="Collection">
	<grounding:wsdlMessageMap>
      <grounding:damlsParameter rdf:resource="#processOutput"/>
      <grounding:wsdlMessagePart rdf:resource="return"/> 
<fla:xsltTransformation rdf:parseType="Literal">
<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:concepts="http://www.mindswap.org/2002/services/concepts.daml#"
xmlns="urn:org:mindswap:services">
<xsl:template match="/">  
<xsl:variable name="X1" select="/return"/>
<xsl:value-of select="round($X1)" />
</xsl:template>
</xsl:stylesheet>
</fla:xsltTransformation>
	</grounding:wsdlMessageMap>  
  </grounding:wsdlOutputMessageParts>

  <grounding:wsdlReference>http://www.w3.org/TR/2001/NOTE-wsdl-20010315</grounding:wsdlReference>
  <grounding:otherReference>http://www.w3.org/TR/2001/NOTE-wsdl-20010315 http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/soap/http/</grounding:otherReference>
  <grounding:wsdlDocument>http://www.xmethods.net/sd/2001/TemperatureService.wsdl</grounding:wsdlDocument>
</grounding:WsdlAtomicProcessGrounding>

</rdf:RDF>

