| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() |
![]() |
Building the input HTMLOur HTML document will begin with standard HTML tags. Our HTML form will begin as follows: 1 <HTML> 2 <HEAD> 3 <TITLE>Submitting data to the webMethods Platform</TITLE> 4 </HEAD> 5 <BODY> Next, we create our Note that the ACTION is the exact namespace of the webMethods Flow we created earlier. Also, notice that we are using the "POST" method to send the data. There are other acceptable values for the METHOD attribute, but this article is not intended to be a tutorial for HTML. The HTML input form is created with the following line of code: 6 <FORM ACTION=http://serverhost:serverport/invoke/wMUsers/htmlReply METHOD=POST> Next, we create the input fields. Note that our text input is named "htmlInput". When submitting the data inside the Notice that the On the same line, we have included a generic "Submit" button. The TYPE attribute controls the display of the form The above referenced HTML is as follows: 7 User input <INPUT TYPE=TEXT NAME=htmlInput> <INPUT TYPE=SUBMIT> We next close out the The HTML is as follows: 8 </FORM> 9 </BODY> 10 </HTML> Save the HTML document to disk and open it using your favorite browser. The document will resemble the following:
The complete HTML input form is below for your convenience: 1 <HTML> 2 <HEAD> 3 <TITLE>Submitting data to the webMethods Platform</TITLE> 4 </HEAD> 5 <BODY> 6 <FORM ACTION=http://serverhost:serverport/invoke/wMUsers/htmlReply METHOD=POST> 7 User input <INPUT TYPE=TEXT NAME=htmlInput> <INPUT TYPE=SUBMIT> 8 </FORM> 9 </BODY> 10 </HTML> Designing the output DSPThe DSP output will look very similar to the HTML input form. DSP is only different from HTML in that it is a server-side language which means that the webMethods Platform will examine it line-by-line for instructions before sending the document as HTML to the user's browser. DSP can perform very complex operations but in our example, we will apply it to substitute values only. As expected, our DSP output template will begin as follows: 1 <HTML> 2 <HEAD> 3 <TITLE>Submitting data to the webMethods Platform</TITLE> 4 </HEAD> 5 <BODY> Next, we will substitute the webMethods Flow into our template using the DSP tag 6 %value outputValue% Then, we close our DSP using the following code: 7 </BODY> 8 </HTML> The complete DSP output template is below for your convenience: 1 <HTML> 2 <HEAD> 3 <TITLE>Submitting data to the webMethods Platform</TITLE> 4 </HEAD> 5 <BODY> 6 %value outputValue% 7 </BODY> 8 </HTML> Using DSP to format the Flow outputThe last step is to add the DSP output template to the webMethods Flow. This will format the HTML output for the user. In the Flow In the pop-up box, paste the DSP code above. Your template will resemble the following:
This is plain vanilla HTML so we will expect the user's browser to display the substituted Select "Save" and save your Flow. We are now ready to test our HTML form against the Flow and DSP output tempate. Testing our workWith our HTML form, our Flow and DSP template in place, we are ready to test.
The HTML reply will display only the returned output value, as expected. The browser will resemble the following:
If you browser is empty, examine your DSP template for proper case structure on your substituted variable names. If everything checks out, you lost the output variable from your pipeline. Go back and Unit Test until everything is in working order. Go Deeper on the Subject: The wMUsers Discussion Forums Dan Green is the Founder and Director of the wMUsers. He can be reached via email at . |
| © All Rights Reserved, 2001-2008. |