On normal conditions, the output value is computed as follows:
- the web service returns a result XML message,
- the XSLT document extract the Farenheit temperature from the result XML message,
- the OK LInk connection the RequestResponse Unit to the Entry Unit couples the XSLT output parameter holding the temperature to the Field that will show it on page.
It is possible that the web service call is somehow failing silently, causing the application to fallback to the starting page. Although not required by the wiki example, try adding the following:
- add an Error page with a MultiMessage Unit on it,
- connect the RequestResponse Unit to the MultiMessage Unit by using a KO Link,
- on the KO Link, couple the output error message to the input Shown Messages of the MultiMessage Unit.
By doing this, should the web service call be failing, you will be redirected to an error page with information about what problem occurred.
EDIT
If you are sure that the OK Link is indeed the one being navigated, the problem is probably in the parameters coupling on the OK Link itself.
The wiki article does not require to specify output parameters because they are automatically extracted from the XSLT file that you have to provide in order to process the web service response and extract parameters from it.
- First, ensure that you have an XSLT file like the one described in the wiki article placed under WebContent/WEB-INF/descr path of your Web Project. As you can see, the XSLT code contains a
<out:output-param name=""Farenheit""/>
node at root level: this is what the RequestResponse Unit uses to know that there will be an output parameter named Farenheit.
- Specify the XSLT file as value of the Output Transformation property of the RequestResponse Unit.
- Ensure that the Field you are going to use for showing the result has its Preloaded property checked: that means the application will be able to fill in a value automatically.
- Finally, edit the coupling of the OK Link: it should be possible to couple the Farenheit source parameter (inferred from the XSLT file) to the Field you have marked as Preloaded.
EDIT
In the end, the RequestResponse Unit configuration should look like this:
![]()
If there are still problems, another option is inspecting the application logs. First ensure that the log level of the generated application is set to DEBUG
by following this wiki article. Next, execute the web service call and check the Runtime Log file by any of the following means:
- by directly opening WEB-INF/log/RTX.log with a text editor;
- in WebRatio, by using the Runtime Log View (found in Window > Show View > Other).
Whatever the option you choose, you may want to take a look at how to read logs.
EDIT
Yet another option is placing a Script Unit after the RequestResponse Unit and use it to print out the XML documents to the web server console.
- Add a Script Unit.
- Enter the following a Script Text:
#input Document response
#input Document output
println ""Web Service response: "" + response.asXML()
println ""Transformed Output: "" + output.asXML()
- Connect the OK Link exiting the RequestResponse Unit to the Script Unit instead; couple parameters as follows:
- Output XML Document to output,
- Response XML Document to response.
- Connect the Script Unit to the Page with another OK Link.
- Connect the RequestResponse Unit to the Entry Unit with a Transport Link, and use it to couple the Farenheit output value to the relevant field.
After generating the full application and attempting the web service call again, the web server console should display both the XML response received by the server and the XML computing by transforming the response using the XSLT file. On my machine, it looks like this:
Web Service response: <?xml version=""1.0"" encoding=""UTF-8""?>
<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<m:CelciusToFahrenheitResponse xmlns:m=""http://webservices.daehosting.com/temperature"">
<m:CelciusToFahrenheitResult>33.8</m:CelciusToFahrenheitResult>
</m:CelciusToFahrenheitResponse>
</soap:Body>
</soap:Envelope>
Transformed Output: <?xml version=""1.0"" encoding=""UTF-8""?>
<result xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:w=""http://www.webml.org/webservices"" xmlns:out=""http://www.webml.org/webservices/output"" xmlns:m=""http://webservices.daehosting.com/temperature"">
<out:output-param name=""Fahrenheit"" value=""33.8""/>
</result>
The Transformed Output should be a document with a root result
element containing a single out:output
element. The latter is what the RequestResponse Unit uses to extract the output value that is then passed along the Transport Link to the page.