Composition WS

Hello People,
 I've composed three web services (Addition, Subtraction, Multiplication)
into a service called Calculator. The goal is that I sent A, B parameters to
Calculator Service, and than it passes to Addition, after it passes A,B to
Subtraction. The results of Addition (c) and Subtraction (c') I passed to
the Multiplication service respectively.

 I am using OWL-S API, all things works all right but not allways. I didn't
change anything and only execute my RunService.java(the same as in Zip Code
example). One time it works, and in a second time it didn't work and says
that the Parameter B in Subtraction is missing.

 Did anybody else have the same problem?
I put here my Calculator.owl:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:owl=          "http://www.w3.org/2002/07/owl#"
  xmlns:rdfs=         "http://www.w3.org/2000/01/rdf-schema#"
  xmlns:rdf=          "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:factbook=     "http://www.daml.org/2003/09/factbook/factbook-ont#"
  xmlns:service=      "http://www.daml.org/services/owl-s/1.0/Service.owl#"
  xmlns:process=      "http://www.daml.org/services/owl-s/1.0/Process.owl#"
  xmlns:profile=      "http://www.daml.org/services/owl-s/1.0/Profile.owl#"
  xmlns:grounding=
"http://www.daml.org/services/owl-s/1.0/Grounding.owl#"
  xml:base=           "http://localhost:8080/ws/Calculator.owl"
>

	<owl:Ontology rdf:about="">
		<owl:imports rdf:resource="http://localhost:8080/ws/Addition.owl"/>
		<owl:imports rdf:resource="http://localhost:8080/ws/Subtraction.owl"/>
		<owl:imports rdf:resource="http://localhost:8080/ws/Multiplication.owl"/>
	</owl:Ontology>

<!-- Service description -->
<service:Service rdf:ID="CalculatorService">
	<service:presents rdf:resource="#CalculatorProfile"/>

	<service:describedBy rdf:resource="#CalculatorProcessModel"/>

	<service:supports rdf:resource="#CalculatorGrounding"/>
</service:Service>

<!-- Profile description -->
<profile:Profile rdf:ID="CalculatorProfile">
	<service:isPresentedBy rdf:resource="#CalculatorService"/>

	<profile:serviceName xml:lang="en">Calculator</profile:serviceName>
	<profile:textDescription xml:lang="en">Returns the calculator of A e B in
all operations</profile:textDescription>

	<profile:hasInput rdf:resource="#a"/>
	<profile:hasInput rdf:resource="#b"/>
	<profile:hasOutput rdf:resource="#c"/>
</profile:Profile>

<!-- Process Model description -->
<process:ProcessModel rdf:ID="CalculatorProcessModel">
	<service:describes rdf:resource="#CalculatorService"/>
	<process:hasProcess rdf:resource="#CalculatorProcess"/>
</process:ProcessModel>

<process:CompositeProcess rdf:ID="CalculatorProcess">
	<process:hasInput rdf:resource="#a"/>
	<process:hasInput rdf:resource="#b"/>
	<process:hasOutput rdf:resource="#c"/>

	<process:composedOf>
		<process:Sequence>
			<process:components rdf:parseType="Collection">
				<process:AtomicProcess
rdf:about="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
				<process:AtomicProcess
rdf:about="http://localhost:8080/ws/Subtraction.owl#SubtractionProcess"/>
				<process:AtomicProcess
rdf:about="http://localhost:8080/ws/Multiplication.owl#MultiplicationProcess
"/>
			</process:components>
		</process:Sequence>
	</process:composedOf>
<!--Passa o valor A da calculator para A da Addition -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter rdf:resource="#a"/>
			<process:atProcess rdf:resource="#CalculatorProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Addition.owl#a"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor B da calculator para B da Addition -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter rdf:resource="#b"/>
			<process:atProcess rdf:resource="#CalculatorProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Addition.owl#b"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor A da Addition para A da Subtraction -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Addition.owl#a"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Subtraction.owl#a"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Subtraction.owl#SubtractionProcess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor B da Addition para B da Subtraction -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Addition.owl#b"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Subtraction.owl#b"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Subtraction.owl#SubtractionProcess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor C da Subtracao para A da Multiplicacao -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Subtraction.owl#c"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Subtraction.owl#SubtractionProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Multiplication.owl#a"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Multiplication.owl#MultiplicationProc
ess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor C da Adicao para B da Multiplicacao -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Addition.owl#c"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Multiplication.owl#b"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Multiplication.owl#MultiplicationProc
ess"/>
		</process:ValueOf>
	</process:sameValues>

<!--Passa o valor C da Multiplicacao para C da Calculator -->
	<process:sameValues rdf:parseType="Collection">
		<process:ValueOf>
			<process:theParameter
rdf:resource="http://localhost:8080/ws/Multiplication.owl#c"/>
			<process:atProcess
rdf:resource="http://localhost:8080/ws/Multiplication.owl#MultiplicationProc
ess"/>
		</process:ValueOf>
		<process:ValueOf>
			<process:theParameter rdf:resource="#c"/>
			<process:atProcess rdf:resource="#CalculatorProcess"/>
		</process:ValueOf>
	</process:sameValues>
</process:CompositeProcess>


<process:Input rdf:ID="a">
	<process:parameterType
rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
	<rdfs:label>Calc A</rdfs:label>
</process:Input>

<process:Input rdf:ID="b">
	<process:parameterType
rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
	<rdfs:label>Calc B</rdfs:label>
</process:Input>

<process:Output rdf:ID="c">
	<process:parameterType
rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
	<rdfs:label>Calc Result</rdfs:label>
</process:Output>


<!-- Grounding description -->
<grounding:WsdlGrounding rdf:ID="CalculatorGrounding">
	<!-- service:supportedBy rdf:resource="#BabelFishTranslatorService"/-->
	<grounding:hasAtomicProcessGrounding
rdf:resource="http://localhost:8080/ws/Addition.owl#AdditionProcessGrounding
"/>
	<grounding:hasAtomicProcessGrounding
rdf:resource="http://localhost:8080/ws/Subtraction.owl#SubtractionProcessGro
unding"/>
	<grounding:hasAtomicProcessGrounding
rdf:resource="http://localhost:8080/ws/Multiplication.owl#MultiplicationProc
essGrounding"/>
</grounding:WsdlGrounding>

</rdf:RDF>
***********************
Here also the runnig application when it works, and when it dos not works:
Service:Calculator
Values:{Calc A=5, Calc B=3}
Start executing process CalculatorProcess
   Start executing process AdditionProcess
   [DONE]
   Start executing process SubtractionProcess
   [DONE]
   Start executing process MultiplicationProcess
   [DONE]
[DONE]
Executed service 'Calculator'
A   = 5
B  = 3
Output =
16
********************
Service:Calculator
Values:{Calc A=5, Calc B=3}
Start executing process CalculatorProcess
   Start executing process AdditionProcess
   [DONE]
   Start executing process SubtractionProcess
Exception in thread "main" java.lang.Exception: Value of input parameter
'Sub B'
 is not set!
        at
org.mindswap.owls.grounding.impl.WSDLAtomicGroundingImpl.invoke(WSDLA
tomicGroundingImpl.java:134)
        at
org.mindswap.owls.process.execution.impl.ProcessExecutionEngineImpl.e
xecuteAtomic(ProcessExecutionEngineImpl.java:117)
        at
org.mindswap.owls.process.execution.impl.ProcessExecutionEngineImpl.e
xecute(ProcessExecutionEngineImpl.java:104)
        at
org.mindswap.owls.process.execution.impl.ProcessExecutionEngineImpl.e
xecuteOrdered(ProcessExecutionEngineImpl.java:147)
        at
org.mindswap.owls.process.execution.impl.ProcessExecutionEngineImpl.e
xecuteConstruct(ProcessExecutionEngineImpl.java:122)
        at
org.mindswap.owls.process.execution.impl.ProcessExecutionEngineImpl.e
xecute(ProcessExecutionEngineImpl.java:107)
        at examples.RunService2.runZipCode(RunService2.java:84)
        at examples.RunService2.main(RunService2.java:101)

For these two I did not change anything.


Thanks in advance,
Daniela

Received on Friday, 24 September 2004 08:04:15 UTC